GET/ tickets/
Get tickets
You can return a list of all your tickets or return tickets which have specific status.
Returns up to 100 tickets per page. To get the rest, follow next (see Response pagination).
Parameters names that are possible to get tickets with specifc status are - active, closed, archived and draft.
Request
- cURL
- JavaScript
- PHP
- Python
curl -X GET "https://<your_app_subdomain>.user.com/api/public/tickets/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2"
const response = await fetch(
"https://<your_app_subdomain>.user.com/api/public/tickets/",
{
method: "GET",
headers: {
Authorization: "Token <your_64_char_api_key>",
Accept: "*/*; version=2",
},
},
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://<your_app_subdomain>.user.com/api/public/tickets/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Token <your_64_char_api_key>",
"Accept: */*; version=2",
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
response = requests.get(
"https://<your_app_subdomain>.user.com/api/public/tickets/",
headers={
"Authorization": "Token <your_64_char_api_key>",
"Accept": "*/*; version=2",
},
)
print(response.json())
Response examples
- 200 OK
{"count": 2,"next": null,"previous": null,"results": [{"id": 3,"status": "draft","name": "Example name","description": "Example description","created_at": "2026-06-15T13:46:57.769040Z","updated_at": "2026-06-15T13:46:57.769057Z","due_date": null,"assigned_to": ,3 fields"user_id": null,"company_id": null,"priority": null,"participants": [],"segments": ,1 item"attachments": null,"agent_id": 3 fields},{"id": 2,"status": "draft","name": "Example name","description": "Example description","created_at": "2025-04-09T11:22:15.307585Z","updated_at": "2025-04-09T11:22:15.307608Z","due_date": null,"assigned_to": null,"user_id": null,"company_id": null,"priority": null,"participants": [],"segments": ,1 item"attachments": null,"agent_id": null}]}Response fields
Fields returned in the 200 OK response body.
- count
- Number of results across all pages. It can lag behind recent changes; see Response pagination.
- next
- URL of the next page of results. null on the last page.
- previous
- URL of the previous page of results. null on the first page.
- results
- Results on this page.
- results[].
id - A unique identifier for the ticket which is given by User automatically.
- results[].
status - A current status of the ticket (draft, active, closed or archived).
- results[].
name - A ticket name.
- results[].
description - A ticket description.
- results[].
created_at - When the ticket was created, ISO 8601.
- results[].
updated_at - When the ticket was last updated, ISO 8601.
- results[].
due_date - A date in the future by which the task should be completed. Compliance with ISO 8601 standard format.
- results[].
assigned_to - A unique identifier for the agent which is given by User automatically.
- results[].
assigned_to. id - A unique identifier for the ticket which is given by User automatically.
- results[].
assigned_to. name - A ticket name.
- results[].
assigned_to. avatar - URL of the agent group's avatar; a default image if it has none.
- results[].
- results[].
user_id - A unique identifier for the user which is given by User automatically.
- results[].
company_id - A unique identifier for the company which is given by User automatically.
- results[].
priority - A priority of your ticket.
- results[].
priority. id - A unique identifier for the ticket which is given by User automatically.
- results[].
priority. name - A ticket name.
- results[].
priority. order - Sort position of the priority, up to
1000. - results[].
priority. description - A ticket description.
- results[].
- results[].
participants - A list of users' ids.
- results[].
segments - Ticket segments the ticket is in, each with
id,nameanddescription.- results[].
segments[]. id - A unique identifier for the ticket which is given by User automatically.
- results[].
segments[]. name - A ticket name.
- results[].
segments[]. description - A ticket description.
- results[].
- results[].
attachments - An attachment for a ticket (gif, jpg, pdf).
- results[].
agent_id - Agent group of the agent who created the ticket, with
id,nameandavatar;nullif not set.- results[].
agent_id. id - A unique identifier for the ticket which is given by User automatically.
- results[].
agent_id. name - A ticket name.
- results[].
agent_id. avatar - URL of the creator's agent group avatar; a default image if it has none.
- results[].
- results[].
note
Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.