External API
Reply to a ticket by email
Reply to the customer on a ticket by email from your own system, as one of your live agents.
Replies to the customer on a ticket by email from your own system, as one of your live agents – for example, to send an update when their refund is processed. The reply appears in the ticket in Proto, and the customer’s answer comes back to the same ticket. Not sure how to send a request? See Make your first request.
Request
Send a POST request to:
https://v3-api.proto.cx/api/platform/v1/conversations/YOUR_TEAMSPACE_ID/YOUR_TICKET_ID/send-outbound-message
In the body, send the email and the live agent it comes from. In the address and the body, replace anything starting with YOUR_ with your own – YOUR_TICKET_ID is the ticket’s id, such as the one Create a ticket returns, not its short number:
{
"user_id": "YOUR_USER_ID",
"content": "<p>Hi Amara,</p><p>Your refund for order 1042 is on its way.</p>",
"subject": "Your refund for order 1042",
"email_template_id": "YOUR_EMAIL_TEMPLATE_ID",
"attachment_ids": ["YOUR_FILE_ID"]
}
| Field | Required | What it is |
|---|---|---|
user_id | Yes | The user ID of the live agent the email comes from, from List users by status |
content | Yes | The email, in HTML |
subject | No | The email’s subject. Defaults to [Ticket #short_id] and the ticket’s subject, with Re: in front if the customer has had an email already. |
email_template_id | No | An email template to send instead of content. You still need to send content. |
attachment_ids | No | IDs of files already attached in Proto |
Important: the ticket is assigned to this live agent if it isn’t already.
Response
Proto replies 200 OK:
{ "success": true }
success is always true. It means the email is queued, not sent. If the reply isn’t in the ticket after a minute, check that:
- the ticket isn’t Resolved
- the live agent can manage this ticket
- the customer has a valid email address
- your workspace hasn’t reached its interaction limit
Errors
| You get | What it means |
|---|---|
400 | The conversation is a livechat, not a ticket, or it’s closed. |
403 | Your workspace has an unpaid invoice, or has reached its interaction limit. |
404 | The ticket, user or email template isn’t found. |
For errors any request can return, see If something goes wrong.