Ticket folders
These operations label tickets with folders. Each label is a pair of a ticket and a folder: you add pairs in bulk, remove one pair, or remove every folder from a set of tickets. Changes show in the Replyco inbox straight away. Get folder ids from Folders and ticket ids from the ticket lists in Tickets.
Fields that matter
Section titled “Fields that matter”| Field | Meaning |
|---|---|
threadId |
The ticket to label. |
folderId |
The folder to put it in. |
Putting tickets in folders
Section titled “Putting tickets in folders”POST /openapi/folderthreads/assignfolderstothreads takes an array of pairs. One call can put one ticket in several
folders, several tickets in one folder, or any mix.
curl -X POST https://open-api.replyco.com/openapi/folderthreads/assignfolderstothreads \ -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" \ -d '[{"threadId": "7e9a1b3c-5d2f-4e6a-8b0c-1d2e3f4a5b6c", "folderId": "0b4e6c1d-2f3a-4b5c-9d8e-7f6a5b4c3d2e"}]'[ { "threadId": "7e9a1b3c-5d2f-4e6a-8b0c-1d2e3f4a5b6c", "folderId": "0b4e6c1d-2f3a-4b5c-9d8e-7f6a5b4c3d2e" }, { "threadId": "7e9a1b3c-5d2f-4e6a-8b0c-1d2e3f4a5b6c", "folderId": "8c2f4a6b-1d3e-4f5a-9b7c-6d8e0f1a2b3c" }]- A pair the ticket already has is skipped, so sending the same array again is safe.
- Pairs are applied in order. When a folder or a ticket does not exist, the call stops there with 404, and the pairs before it stay applied. Fix the array and send all of it again; the pairs already applied are skipped.
- An empty array changes nothing.
Taking tickets out of folders
Section titled “Taking tickets out of folders”DELETE /openapi/folderthreads/deletefolderfromthread takes one ticket out of one folder; its other folders stay. Pass
both ids as query parameters. Removing a pair the ticket does not have changes nothing, so the call is safe to repeat.
curl -X DELETE "https://open-api.replyco.com/openapi/folderthreads/deletefolderfromthread?threadId=7e9a1b3c-5d2f-4e6a-8b0c-1d2e3f4a5b6c&folderId=0b4e6c1d-2f3a-4b5c-9d8e-7f6a5b4c3d2e" \ -H "Authorization: Bearer $ACCESS_TOKEN"POST /openapi/folderthreads/removefoldersfromthreads takes every folder off the tickets whose ids you send. Send at
least one id.
["7e9a1b3c-5d2f-4e6a-8b0c-1d2e3f4a5b6c", "4a6c8e0b-2d4f-4a1c-9e3b-5d7f9a1c3e5b"]Operations
Section titled “Operations”| Method | Path | Summary | Scopes |
|---|---|---|---|
| POST | /openapi/folderthreads/assignfolderstothreads |
Assign multiple folders to multiple threads | — |
| DELETE | /openapi/folderthreads/deletefolderfromthread |
Delete a specific folder from a specific thread | — |
| POST | /openapi/folderthreads/removefoldersfromthreads |
Remove all folders from specified threads | — |
Errors
Section titled “Errors”| Status | Meaning | Returned by |
|---|---|---|
| 400 | Invalid request data; Invalid folder or thread ID; Invalid thread IDs | POST /openapi/folderthreads/assignfolderstothreads, DELETE /openapi/folderthreads/deletefolderfromthread, POST /openapi/folderthreads/removefoldersfromthreads |
| 401 | User is not authenticated | POST /openapi/folderthreads/assignfolderstothreads, DELETE /openapi/folderthreads/deletefolderfromthread, POST /openapi/folderthreads/removefoldersfromthreads |
| 404 | Association not found | DELETE /openapi/folderthreads/deletefolderfromthread |
Related
Section titled “Related”- Folders: the folder ids.
- Route and organise tickets: assign, label and snooze tickets.
- Automation rules: put new tickets in a folder automatically.