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.

AttributesTypeRequiredDescription
user_idintegernoA unique identifier for the user which is given by User.com automatically.
assigned_tointegernoA unique identifier for the agent which is given by User.com automatically.
attachmentsobjectnoAn attachment for a ticket (gif, jpg, pdf).
company_idintegernoA unique identifier for the company which is given by User.com automatically.
custom_idstringnoThe unique identifier for the ticket which is provided by the client.
descriptionstringyesA ticket description.
due_datestringyesA date in the future by which the task should be completed. Compliance with ISO 8601 standard format.
namestringyesA ticket name.
participantsintegernoA list of users' ids.
priorityintegernoA priority of your ticket.
statusstringnoA 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 'Content-Type: application/json'
-d '{
"name": "New Ticket",
"custom_id": "new-ticket",
"description": "Example from REST API",
"status": "draft",
"due_date": "2020-11-25T00:00:00Z",
"assigned_to": 1,
"person": 123,
"company": 134,
"participants": [1, 2, 3],
"priority": 1
}'

Response​

{
"id": 53,
"attributes": [],
"status_history": [
{
"entered_at": "2019-12-20T12:23:38.718116+00:00",
"status": "draft"
}
],
"created_at": "2019-12-20T12:28:55.123270Z",
"updated_at": "2019-12-20T12:28:55.123355Z",
"serialized_attributes": [],
"custom_id": "my custom id",
"status": "draft",
"token": "some-token",
"name": "my ticket",
"description": "my description",
"due_date": "2019-12-20T12:25:05.555624Z",
"closed_at": "2019-12-20T12:25:05.555624Z",
"attachments": null,
"assigned_to": 1,
"person": null,
"company": 1,
"priority": 1,
"participants": []
}