PUT/ tickets/ :id/
Update ticket
You can update a specific ticket.
Attributes
Optional unless marked required
- custom_id
- The unique identifier for the ticket which is provided by the client.
- id
- A unique identifier for the ticket which is given by User automatically.
- assigned_to
- A unique identifier for the agent which is given by User automatically.
- attachments
- An attachment for a ticket (gif, jpg, pdf).
- company_id
- A unique identifier for the company which is given by User automatically.
- description
- A ticket description.
- due_date
- A date in the future by which the task should be completed. Compliance with ISO 8601 standard format.
- name
- A ticket name.
- participants
- A list of users' ids.
- priority
- A priority of your ticket.
- status
- A current status of the ticket (draft, active, closed or archived).
- user_id
- A unique identifier for the user which is given by User automatically.
Request
- cURL
- JavaScript
- PHP
- Python
curl -X PUT "https://<your_app_subdomain>.user.com/api/public/tickets/:id/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2" \
-H "Content-Type: application/json" \
-d '{
"name": "Login page error on Safari",
"description": "Happens on Safari 17 only.",
"status": "active"
}'
const response = await fetch(
"https://<your_app_subdomain>.user.com/api/public/tickets/:id/",
{
method: "PUT",
headers: {
Authorization: "Token <your_64_char_api_key>",
Accept: "*/*; version=2",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Login page error on Safari",
description: "Happens on Safari 17 only.",
status: "active",
}),
},
);
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 => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Token <your_64_char_api_key>",
"Accept: */*; version=2",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"name" => "Login page error on Safari",
"description" => "Happens on Safari 17 only.",
"status" => "active",
]),
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
response = requests.put(
"https://<your_app_subdomain>.user.com/api/public/tickets/:id/",
headers={
"Authorization": "Token <your_64_char_api_key>",
"Accept": "*/*; version=2",
},
json={
"name": "Login page error on Safari",
"description": "Happens on Safari 17 only.",
"status": "active",
},
)
print(response.json())
Response examples
- 200 OK
- 404 Not Found
{"id": 398,"name": "Login page error on Safari","custom_id": "login-page-error","description": "Happens on Safari 17 only.","status": "active","due_date": "2026-11-24T13:24:16Z","assigned_to": 9,"user_id": 1909,"company_id": 778,"participants": [],"priority": 1}{
"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.
- name
- A ticket name.
- custom_id
- The unique identifier for the ticket which is provided by the client.
- description
- A ticket description.
- status
- A current status of the ticket (draft, active, closed or archived).
- 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.
- user_id
- A unique identifier for the user which is given by User automatically.
- company_id
- A unique identifier for the company which is given by User automatically.
- participants
- A list of users' ids.
- priority
- A priority of your ticket.
note
Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.