Guest API: Tickets
The user’s support tickets, and writing on one.
| What it does | Route |
|---|---|
| List the user’s tickets | GET /guest/v1/tickets |
| Read a ticket | GET /guest/v1/tickets/{ticket_id} |
| Write on a ticket | POST /guest/v1/tickets/{ticket_id}/messages |
List the user’s tickets
Section titled “List the user’s tickets”GET /guest/v1/tickets
Needs: the app key (X-CRM-App-Key) and the signed-in user’s token (Authorization: Bearer …), or their id for an app with unverified sign-in. See From a website or web app.
Answers
| Status | Body | Meaning |
|---|---|---|
| 200 | SupportTicketPage | OK |
| 400 | problem | The request could not be read: the problem names the field. |
| 401 | problem | No credential, or one that is not right. |
| 403 | problem | Refused: the app is switched off, or this is not allowed. |
| 404 | problem | Not found, or the part is switched off. |
| 429 | problem | Too many requests: wait for Retry-After. |
Read a ticket
Section titled “Read a ticket”GET /guest/v1/tickets/{ticket_id}
The ticket, where it has got to, and its conversation.
Needs: the app key (X-CRM-App-Key) and the signed-in user’s token (Authorization: Bearer …), or their id for an app with unverified sign-in. See From a website or web app.
Parameters
| Name | In | Description |
|---|---|---|
ticket_id (required) | path | The ticket’s id. |
Answers
| Status | Body | Meaning |
|---|---|---|
| 200 | SupportTicket | OK |
| 400 | problem | The request could not be read: the problem names the field. |
| 401 | problem | No credential, or one that is not right. |
| 403 | problem | Refused: the app is switched off, or this is not allowed. |
| 404 | problem | Not found, or the part is switched off. |
| 429 | problem | Too many requests: wait for Retry-After. |
Write on a ticket
Section titled “Write on a ticket”POST /guest/v1/tickets/{ticket_id}/messages
Needs: the app key (X-CRM-App-Key) and the signed-in user’s token (Authorization: Bearer …), or their id for an app with unverified sign-in. See From a website or web app.
Parameters
| Name | In | Description |
|---|---|---|
ticket_id (required) | path | The ticket’s id. |
Idempotency-Key | header | Your own id for this send (at most 100 characters): sent again after a timeout, it is kept once. |
Body (application/json): MessageBody
| Field | Type | Description |
|---|---|---|
attachment_ids | array of string | Pictures uploaded through an AttachmentUpload and not yet sent. |
text (always) | string |
Answers
| Status | Body | Meaning |
|---|---|---|
| 201 | Part | Made |
| 400 | problem | The request could not be read: the problem names the field. |
| 401 | problem | No credential, or one that is not right. |
| 403 | problem | Refused: the app is switched off, or this is not allowed. |
| 404 | problem | Not found, or the part is switched off. |
| 409 | problem | Refused as things stand: the problem says why. |
| 422 | problem | A value that is not right: the problem says which. |
| 429 | problem | Too many requests: wait for Retry-After. |