curl --request PATCH \
--url https://{host}/api/v1/tickets/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assigned_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"body": "<string>",
"subject": "<string>",
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assigned_agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
body: JSON.stringify('<string>'),
subject: '<string>',
team_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://{host}/api/v1/tickets/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/api/v1/tickets/{id}"
payload = {
"assigned_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"body": "<string>",
"subject": "<string>",
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"body": "<string>",
"call_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_e164": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"priority": "low",
"ref": 123,
"resolved_at": "2023-11-07T05:31:56Z",
"source": "agent",
"status": "open",
"subject": "<string>",
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"update_count": 123,
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Update a ticket
resolved_at follows status rather than being set by the caller: two fields that must agree, only one of which anyone remembers to update.
curl --request PATCH \
--url https://{host}/api/v1/tickets/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assigned_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"body": "<string>",
"subject": "<string>",
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assigned_agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
body: JSON.stringify('<string>'),
subject: '<string>',
team_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://{host}/api/v1/tickets/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/api/v1/tickets/{id}"
payload = {
"assigned_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"body": "<string>",
"subject": "<string>",
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"body": "<string>",
"call_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_e164": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"priority": "low",
"ref": 123,
"resolved_at": "2023-11-07T05:31:56Z",
"source": "agent",
"status": "open",
"subject": "<string>",
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"update_count": 123,
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Authorizations
Every request sends Authorization: Bearer <token>. The token is either a panel session (a JWT from /auth/login, 12 hours) or an API key ft_<id>_<secret>. An API key is accepted only from an address on its IP allowlist (403 ip_not_allowed otherwise; 403 ip_allowlist_required for an old key that has none), is limited to its rate per minute (429 rate_limited with Retry-After; X-RateLimit-Limit/Remaining/Reset on every response), and at most 60 call placements a minute.
Body
Response
OK
low, normal, high, urgent Per-organisation, so a customer can read it out. Not a global sequence, which would leak one tenant's volume into another's numbering.
Who raised it: a model mid-call, a person in the panel, or an IVR flow node.
agent, human, flow open, pending, resolved, closed