GET/ tickets/ :id/
Get ticket
You can return specific ticket details.
Attributes
Optional unless marked required
- id
- A unique identifier for the ticket which is given by User automatically.
Request
- cURL
- JavaScript
- PHP
- Python
curl -X GET "https://<your_app_subdomain>.user.com/api/public/tickets/:id/" \
-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/:id/",
{
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/:id/",
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/:id/",
headers={
"Authorization": "Token <your_64_char_api_key>",
"Accept": "*/*; version=2",
},
)
print(response.json())
Response examples
- 200 OK
- 404 Not Found
{"id": 398,"status": "draft","name": "Login page error","description": "Login page error: reported through the REST API.","created_at": "2026-11-10T13:24:16.935160Z","updated_at": "2026-11-10T13:24:16.935173Z","due_date": "2026-11-24T13:24:16Z","assigned_to": {"id": 9,"name": "Jane Agent","avatar": "https://<your_app_subdomain>.user.com/avatars/Roman_yAGMXC4.jpg"},"user_id": {"id": 1909,"name": "jane-doe","avatar": null},"company_id": {"id": 778,"name": "Northwind Traders"},"priority": {"id": 1,"name": "High","order": 1,"description": null},"participants": [],"segments": [],"attachments": null,"agent_id": null}{
"detail": "No Ticket matches the given query."
}
Response fields
Fields returned in the 200 OK response body.
- id
- A unique identifier for the ticket which is given by User automatically.
- status
- A current status of the ticket (draft, active, closed or archived).
- name
- A ticket name.
- description
- A ticket description.
- created_at
- When the ticket was created, ISO 8601.
- updated_at
- When the ticket was last updated, ISO 8601.
- due_date
- A date in the future by which the task should be completed. Compliance with ISO 8601 standard format.
- assigned_to
- A unique identifier for the agent which is given by User automatically.
- assigned_to.
id - A unique identifier for the ticket which is given by User automatically.
- assigned_to.
name - A ticket name.
- assigned_to.
avatar - URL of the agent group's avatar; a default image if it has none.
- assigned_to.
- user_id
- A unique identifier for the user which is given by User automatically.
- user_id.
id - A unique identifier for the ticket which is given by User automatically.
- user_id.
name - A ticket name.
- user_id.
avatar - URL of the contact's avatar, or
nullif there is none.
- user_id.
- company_id
- A unique identifier for the company which is given by User automatically.
- company_id.
id - A unique identifier for the ticket which is given by User automatically.
- company_id.
name - A ticket name.
- company_id.
- priority
- A priority of your ticket.
- priority.
id - A unique identifier for the ticket which is given by User automatically.
- priority.
name - A ticket name.
- priority.
order - Sort position of the priority, up to
1000. - priority.
description - A ticket description.
- priority.
- participants
- A list of users' ids.
- segments
- Ticket segments the ticket is in, each with
id,nameanddescription. - attachments
- An attachment for a ticket (gif, jpg, pdf).
- agent_id
- Agent group of the agent who created the ticket, with
id,nameandavatar;nullif not set.
note
Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.