Skip to content

Server API: Support

Your users’ conversations and tickets, read, started and written in their name by your servers.

What it doesRoute
List a person’s conversationsGET /server/v1/contacts/{external_id}/conversations
Start a conversation for a personPOST /server/v1/contacts/{external_id}/conversations
Read a person’s conversationGET /server/v1/contacts/{external_id}/conversations/{conversation_id}
Write in a person’s conversationPOST /server/v1/contacts/{external_id}/conversations/{conversation_id}/messages
List a person’s ticketsGET /server/v1/contacts/{external_id}/tickets
Open a ticket for a personPOST /server/v1/contacts/{external_id}/tickets
Read a person’s ticketGET /server/v1/contacts/{external_id}/tickets/{ticket_id}
Write on a person’s ticketPOST /server/v1/contacts/{external_id}/tickets/{ticket_id}/messages
List the ticket formsGET /server/v1/ticket-forms

GET /server/v1/contacts/{external_id}/conversations

Newest first, a page at a time, as the person sees them in the messenger. Needs the conversations scope.

Needs: a server key (Authorization: Bearer crm_sk_…). See Connect your backend.

Parameters

NameInDescription
external_id (required)pathYour id for the person: 1 to 200 characters, the same id your users’ tokens carry as their subject.
beforequeryWhere the page starts: the next_before (or before) of the page before it.
limitqueryHow many to answer, at most.

Answers

StatusBodyMeaning
200ConversationPageOK
400problemThe request could not be read: the problem names the field.
401problemNo credential, or one that is not right.
403problemRefused: the app is switched off, or this is not allowed.
404problemNot found, or the part is switched off.
429problemToo many requests: wait for Retry-After.

POST /server/v1/contacts/{external_id}/conversations

Starts a conversation in the person’s name with their first message, as they would from the messenger: from a form on your own site, say. A person PurrCRM has not seen is made. Needs the conversations scope.

Needs: a server key (Authorization: Bearer crm_sk_…). See Connect your backend.

Parameters

NameInDescription
external_id (required)pathYour id for the person: 1 to 200 characters, the same id your users’ tokens carry as their subject.
Idempotency-KeyheaderYour own id for this send (at most 200 bytes): sent again after a timeout, it is kept once.

Body (application/json): StartBody

FieldTypeDescription
attachment_idsarray of string
buttonstringThe id of the opening’s button the guest tapped, with no words or pictures; empty when they wrote.
openingOpeningRefThe opening the guest was shown when they wrote or tapped; nil for none.
text (always)string

Answers

StatusBodyMeaning
201ConversationMade
400problemThe request could not be read: the problem names the field.
401problemNo credential, or one that is not right.
403problemRefused: the app is switched off, or this is not allowed.
404problemNot found, or the part is switched off.
409problemRefused as things stand: the problem says why.
422problemA value that is not right: the problem says which.
429problemToo many requests: wait for Retry-After.

GET /server/v1/contacts/{external_id}/conversations/{conversation_id}

The conversation with every part the person may see. Needs the conversations scope.

Needs: a server key (Authorization: Bearer crm_sk_…). See Connect your backend.

Parameters

NameInDescription
external_id (required)pathYour id for the person: 1 to 200 characters, the same id your users’ tokens carry as their subject.
conversation_id (required)pathThe conversation’s id.

Answers

StatusBodyMeaning
200ConversationOK
400problemThe request could not be read: the problem names the field.
401problemNo credential, or one that is not right.
403problemRefused: the app is switched off, or this is not allowed.
404problemNot found, or the part is switched off.
429problemToo many requests: wait for Retry-After.

POST /server/v1/contacts/{external_id}/conversations/{conversation_id}/messages

Adds a message in the person’s name. Needs the conversations scope.

Needs: a server key (Authorization: Bearer crm_sk_…). See Connect your backend.

Parameters

NameInDescription
external_id (required)pathYour id for the person: 1 to 200 characters, the same id your users’ tokens carry as their subject.
conversation_id (required)pathThe conversation’s id.
Idempotency-KeyheaderYour own id for this send (at most 200 bytes): sent again after a timeout, it is kept once.

Body (application/json): MessageBody

FieldTypeDescription
attachment_idsarray of stringPictures uploaded through an AttachmentUpload and not yet sent.
text (always)string

Answers

StatusBodyMeaning
201PartMade
400problemThe request could not be read: the problem names the field.
401problemNo credential, or one that is not right.
403problemRefused: the app is switched off, or this is not allowed.
404problemNot found, or the part is switched off.
409problemRefused as things stand: the problem says why.
422problemA value that is not right: the problem says which.
429problemToo many requests: wait for Retry-After.

GET /server/v1/contacts/{external_id}/tickets

Needs the tickets scope.

Needs: a server key (Authorization: Bearer crm_sk_…). See Connect your backend.

Parameters

NameInDescription
external_id (required)pathYour id for the person: 1 to 200 characters, the same id your users’ tokens carry as their subject.

Answers

StatusBodyMeaning
200SupportTicketPageOK
400problemThe request could not be read: the problem names the field.
401problemNo credential, or one that is not right.
403problemRefused: the app is switched off, or this is not allowed.
404problemNot found, or the part is switched off.
429problemToo many requests: wait for Retry-After.

POST /server/v1/contacts/{external_id}/tickets

Opens a ticket from one of the ticket forms in the person’s name, as they would themselves. A person PurrCRM has not seen is made. Needs the tickets scope.

Needs: a server key (Authorization: Bearer crm_sk_…). See Connect your backend.

Parameters

NameInDescription
external_id (required)pathYour id for the person: 1 to 200 characters, the same id your users’ tokens carry as their subject.
Idempotency-KeyheaderYour own id for this send (at most 200 bytes): sent again after a timeout, it is kept once.

Body (application/json): NewTicketBody

FieldTypeDescription
fieldsarray of TicketField
textstring
title (always)string
type_id (always)string

Answers

StatusBodyMeaning
201SupportTicketMade
400problemThe request could not be read: the problem names the field.
401problemNo credential, or one that is not right.
403problemRefused: the app is switched off, or this is not allowed.
404problemNot found, or the part is switched off.
409problemRefused as things stand: the problem says why.
422problemA value that is not right: the problem says which.
429problemToo many requests: wait for Retry-After.

GET /server/v1/contacts/{external_id}/tickets/{ticket_id}

The ticket, where it has got to, and its conversation. Needs the tickets scope.

Needs: a server key (Authorization: Bearer crm_sk_…). See Connect your backend.

Parameters

NameInDescription
external_id (required)pathYour id for the person: 1 to 200 characters, the same id your users’ tokens carry as their subject.
ticket_id (required)pathThe ticket’s id.

Answers

StatusBodyMeaning
200SupportTicketOK
400problemThe request could not be read: the problem names the field.
401problemNo credential, or one that is not right.
403problemRefused: the app is switched off, or this is not allowed.
404problemNot found, or the part is switched off.
429problemToo many requests: wait for Retry-After.

POST /server/v1/contacts/{external_id}/tickets/{ticket_id}/messages

Adds a message in the person’s name. Needs the tickets scope.

Needs: a server key (Authorization: Bearer crm_sk_…). See Connect your backend.

Parameters

NameInDescription
external_id (required)pathYour id for the person: 1 to 200 characters, the same id your users’ tokens carry as their subject.
ticket_id (required)pathThe ticket’s id.
Idempotency-KeyheaderYour own id for this send (at most 200 bytes): sent again after a timeout, it is kept once.

Body (application/json): MessageBody

FieldTypeDescription
attachment_idsarray of stringPictures uploaded through an AttachmentUpload and not yet sent.
text (always)string

Answers

StatusBodyMeaning
201PartMade
400problemThe request could not be read: the problem names the field.
401problemNo credential, or one that is not right.
403problemRefused: the app is switched off, or this is not allowed.
404problemNot found, or the part is switched off.
409problemRefused as things stand: the problem says why.
422problemA value that is not right: the problem says which.
429problemToo many requests: wait for Retry-After.

GET /server/v1/ticket-forms

The kinds of ticket a person may open, with the fields each asks for. Needs the tickets scope.

Needs: a server key (Authorization: Bearer crm_sk_…). See Connect your backend.

Answers

StatusBodyMeaning
200TicketFormsOK
400problemThe request could not be read: the problem names the field.
401problemNo credential, or one that is not right.
403problemRefused: the app is switched off, or this is not allowed.
404problemNot found, or the part is switched off.
429problemToo many requests: wait for Retry-After.