Skip to main content
POST/tickets/

Create ticket

You can create a ticket. You can also set up any custom attribute of your choice. If a specified custom attribute doesn't exist yet it will be created.

Attributes

Optional unless marked required

user_idinteger
A unique identifier for the user which is given by User automatically.
assigned_tointeger
A unique identifier for the agent which is given by User automatically.
attachmentsobject
An attachment for a ticket (gif, jpg, pdf).
company_idinteger
A unique identifier for the company which is given by User automatically.
custom_idstring
The unique identifier for the ticket which is provided by the client.
descriptionstringrequired
A ticket description.
due_datestringrequired
A date in the future by which the task should be completed. Compliance with ISO 8601 standard format.
namestringrequired
A ticket name.
participantsinteger
A list of users' ids.
priorityinteger
A priority of your ticket.
statusstring
A current status of the ticket (draft, active, closed or archived).

Request​

curl -X POST "https://<your_app_subdomain>.user.com/api/public/tickets/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2" \
-H "Content-Type: application/json" \
-d '{
"name": "Login page error",
"custom_id": "login-page-error",
"description": "Login page error: reported through the REST API.",
"status": "draft",
"due_date": "2026-11-24T13:24:16Z",
"priority": 1,
"user_id": 1909,
"company_id": 778,
"assigned_to": 9
}'

Response examples​

{
"id": 398,
"name": "Login page error",
"custom_id": "login-page-error",
"description": "Login page error: reported through the REST API.",
"status": "draft",
"due_date": "2026-11-24T13:24:16Z",
"assigned_to": 9,
"user_id": 1909,
"company_id": 778,
"participants": [],
"priority": 1
}

Response fields​

Fields returned in the 201 Created response body.

idinteger
A unique identifier for the ticket which is given by User automatically.
namestring
A ticket name.
custom_idstring
The unique identifier for the ticket which is provided by the client.
descriptionstring
A ticket description.
statusstring
A current status of the ticket (draft, active, closed or archived).
due_datestring (date-time)
A date in the future by which the task should be completed. Compliance with ISO 8601 standard format.
assigned_tointegernullable
A unique identifier for the agent which is given by User automatically.
user_idintegernullable
A unique identifier for the user which is given by User automatically.
company_idintegernullable
A unique identifier for the company which is given by User automatically.
participantsarray
A list of users' ids.
priorityinteger
A priority of your ticket.
note

Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.