Ticket
Create a ticket
POST /ticket
POST /ticket
Create a new ticket.
Required fields:
- channel (only required field!)
Auto-generated if not provided:
- direction (default: 'in')
- status (default: 'open')
- priority (default: 'low')
- interface (default: 'internal')
- to, ccEmails, bccEmails (default: [])
- createdAt (default: current timestamp)
- aiSupportLevel (default: 'unprocessed')
- id (auto-generated by database)
Agent assignment:
- If
agentIdis set in the request, it is used as-is. - Otherwise the ticket is auto-assigned to the calling profile only when the
lastAgentRoutingsetting is enabled AND the caller is a human profile (user,enneo, orenneoPartner). Service workers, code executors, and system users never trigger auto-assignment. - When
lastAgentRoutingis disabled, the ticket stays unassigned regardless of direction.
Query parameters
processenumqueryrealtime = immediately run the AI logic synchronously; batch = process the AI asyncronously; false = not run pre-run AI agents. AI will be run on first user view;
Request body
Ticket object to create
fromstringbodyFor new tickets, the email/id of the requester, typically the customer name
fromNamestringbodyFor new Tickets: The original requester, typically the customer name For outgoing emails: The name of the sender, typically the name of the mailbox (null value). If provided, the name is used, e.g. if an agent wants to send a personalized mail in his own name.
subchannelIdintegerbodyDefault: nullThe ID of the subchannel (=mailbox) from which the ticket should be sent. The list of subchannels is available through the /settings/subchannel endpoint
agentIdintegerbodyDefault: nullOptional. Profile ID of the agent the ticket should be assigned to. If omitted, the ticket is auto-assigned to the calling profile only when the lastAgentRouting setting is enabled AND the caller is a human profile (user, enneo, enneoPartner). When the setting is disabled, the ticket stays unassigned.
tostring[]bodyFor new tickets: Optional, to which mailbox this was sent to. For outgoing emails: The email of the customer that the email should be sent to
ccstring[]bodyFor new tickets: Optional, to which mailbox this was sent to in cc. For outgoing emails: The cc emails that the email should be sent to
bccstring[]bodyOnly for outgoing emails: The bcc emails that the email should be sent to
priorityenumbodyPriority of ticket Options: low, medium, high, urgent
channelenumbodyChannel of ticket Options: email, portal, phone, letter, system, chat, walkIn
statusenumbodyStatus of ticket Options: open, pending, closed
subjectstringbodyNo description.
bodystringbodyCan be either HTML (preferred if available) or plaintext
createdAtstringbodyNo description.
firstResponseDueBystringbodyNo description.
dueBystringbodyNo description.
attachmentsobject[]bodyNo description.
tagsinteger[]bodyNo description.
contractIdstringbodyDefault: nullIf available, a contract id that was already identified for this ticket. If not set, enneo will attempt to auto-detect the contract
externalTicketIdstringbodyDefault: nullIf available, the unique identifier of a third-party ticketing system can be stored in enneo
rawDataobjectbodyAny raw source data from the originating system in the proprietary format. Any data passed here is stored for later use via API or user defined functions.
templateIdintegerbodyDefault: nullIf available, a template id to be rendered into ticket body using data provided in templateData parameter.
templateDataobjectbodyDefault: nullData to be used while rendering template into ticket body.
Request Example
{
"from": "string",
"fromName": null,
"subchannelId": 2,
"agentId": null,
"to": [
"customer@web.de"
],
"cc": [
"customer@web.de"
],
"bcc": [
"customer@web.de"
],
"priority": "low",
"channel": "email",
"status": "open",
"subject": "Ticket subject",
"body": "<p>Ticket body<p>",
"createdAt": "2021-01-01 00:00:00",
"firstResponseDueBy": "2021-01-02 00:00:00",
"dueBy": "2021-01-07 00:00:00",
"attachments": [
null
],
"tags": [
54
],
"contractId": null,
"externalTicketId": null,
"rawData": null,
"templateId": null,
"templateData": null
}Responses
200 — Successful operation
Response Example
{
"id": 376189,
"direction": "in",
"from": null,
"fromName": "Tom Mustermann",
"to": null,
"ccEmails": [
"secondlevel@enneo.ai"
],
"bccEmails": [
"archive@enneo.ai"
],
"replyCcEmails": [
"string"
],
"replyRecipients": {
"to": [
"customer@example.com"
],
"cc": [
"manager@example.com"
],
"bcc": []
},
"subchannelId": 1,
"externalTicketId": "EXT-12345",
"sentiment": "positive",
"language": "English",
"languageCode": "en",
"autoExecuteAt": "2026-01-01T12:00:00Z",
"aiSupportLevel": "unprocessed",
"spamStatus": "auto_clean",
"isCustomerActive": true,
"interface": "internal",
"priority": "low",
"channel": "email",
"channelId": "32291c7e-1cce-4d4c-8269-15e6a6501466",
"status": "open",
"summary": "I want to relocate and send you a meter reading",
"subject": "I want to relocate and send you a meter reading"
}403 — Unauthorized
500 — Internal error