Zum Hauptinhalt springen
PATCH
/
ticket
Update a few tickets at once
curl --request PATCH \
  --url https://demo.enneo.ai/api/mind/ticket \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "id": 376189,
    "direction": "in",
    "from": "tom@gmail.com",
    "fromName": "Tom Mustermann",
    "to": [
      "service@energy.com"
    ],
    "ccEmails": [
      "secondlevel@enneo.ai"
    ],
    "bccEmails": [
      "archive@enneo.ai"
    ],
    "replyCcEmails": [
      "jsmith@example.com"
    ],
    "replyRecipients": {
      "to": [
        "customer@example.com"
      ],
      "cc": [
        "manager@example.com"
      ],
      "bcc": []
    },
    "subchannelId": 123,
    "externalTicketId": "EXT-12345",
    "sentiment": "positive",
    "language": "English",
    "languageCode": "en",
    "autoExecuteAt": "2023-11-07T05:31:56Z",
    "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",
    "bodyPlain": "Sehr geehrter Kundenservice,\n\nkönnten Sie bitte den beiliegenden Zählerstand meines Zählers in Ihr System eintragen und mir eine Zwischenrechnung zukommen lassen? Außerdem würde ich gerne zu meiner neuen Adresse Hugo-Junkers-Str. 5 in 82031 Grünwald wechseln. Ich ziehe nächsten Donnerstag ein. Können Sie meinen alten Vertrag zum 1. November für mich kündigen?\n\nIch danke Ihnen, Tom",
    "body": "<p>Sehr geehrter Kundenservice,</p><p>k&#246;nnten Sie bitte den beiliegenden Z&#228;hlerstand meines Z&#228;hlers in Ihr System eintragen und mir eine Zwischenrechnung zukommen lassen? Au&#223;erdem w&#252;rde ich gerne zu meiner neuen Adresse Hugo-Junkers-Str. 5 in 82031 Gr&#252;nwald wechseln. Ich ziehe n&#228;chsten Donnerstag ein. K&#246;nnen Sie meinen alten Vertrag zum 1. November f&#252;r mich k&#252;ndigen?</p><p>Ich danke Ihnen, Tom</p>",
    "bodyClean": "Sehr geehrter Kundenservice, könnten Sie bitte den beiliegenden Zählerstand meines Zählers in Ihr System eintragen und mir eine Zwischenrechnung zukommen lassen?",
    "isEscalated": false,
    "createdAt": "2022-12-13 22:18:06",
    "modifiedAt": null,
    "firstResponseDueBy": "2022-12-14 22:18:06",
    "dueBy": "2022-12-15 22:18:06",
    "closedAt": null,
    "customer": {
      "id": 83771,
      "emailMatches": true,
      "business": false,
      "company": null,
      "firstname": "Tom",
      "lastname": "Mustermann",
      "address": "Hugo-Junkers-Str. 5",
      "phone": 49123456789,
      "email": "tom@mustermann.de",
      "tags": [
        {
          "id": 2,
          "color": "green",
          "name": "VIP"
        }
      ],
      "contracts": [
        {
          "id": 746839,
          "orderId": 123,
          "tenant": null,
          "customerId": "123",
          "signupDate": 1661126400,
          "status": "active",
          "statusCode": 5000,
          "statusCodeTitle": "active",
          "energy": "electricity",
          "energyTypeId": 1,
          "energySubTypeId": 1,
          "email": "johndoe@example.com",
          "firstname": "John",
          "lastname": "Doe",
          "deliveryAddress": "Hugo-Junkers-Str. 5, 82031 Grünwald",
          "iban": "DE89370400440532013000",
          "monthlyDeposit": 53,
          "startDate": 1661990400,
          "endDate": null,
          "consumption": 3477,
          "counterNumber": "1ESY1160669167",
          "productId": 1,
          "productName": "Flex 24",
          "productCode": "flx_24",
          "campaignId": 1,
          "salesChannelId": 1,
          "unpaidDebt": 109.21,
          "vatRate": 0.09,
          "basePrice": 0.09,
          "workingPrice": 0.09,
          "billingAddress": "Rechnungssstraße 24, 10587 Berlin",
          "business": false,
          "phone": 491721041689,
          "gridOperatorName": "E.ON Bayern AG",
          "gridOperatorCode": 1000000000000,
          "registers": [
            {}
          ],
          "erpUrls": [
            {
              "url": "https://erp-system.com/contract/123",
              "logo": "powercloud"
            }
          ],
          "rawData": null,
          "agentPreview": [
            {
              "label": "Tarif",
              "value": "Flex 24",
              "tooltip": "AP: 28.5 ct/kWh\nGP: 149.88 €/Jahr",
              "url": "https://erp.example.com/contract/123"
            }
          ],
          "tabPreview": {
            "color": "green",
            "icon": "electricity"
          }
        }
      ],
      "additionalData": {}
    },
    "customerId": "123",
    "contractId": "746839",
    "partnerId": 123,
    "customerLegitimation": 30,
    "customerLegitimationMessage": "Customer could not be confirmed",
    "responderId": null,
    "agentId": null,
    "agent": {
      "id": 1,
      "firstName": "Max",
      "lastName": "Mustermann",
      "email": "demo@enneo.dev",
      "phone": "+49 123 456789",
      "image": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=",
      "password": 123456,
      "lastSeen": "2022-08-12 12:21:21",
      "type": "enneo",
      "isSsoOnly": 0,
      "lang": "de",
      "nameAlias": "Johnny",
      "externalId": "EMP-12345"
    },
    "assignedAgentIds": [
      123
    ],
    "assignedAgents": [
      {
        "id": 1,
        "firstName": "Max",
        "lastName": "Mustermann",
        "email": "demo@enneo.dev",
        "phone": "+49 123 456789",
        "image": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=",
        "password": 123456,
        "lastSeen": "2022-08-12 12:21:21",
        "type": "enneo",
        "isSsoOnly": 0,
        "lang": "de",
        "nameAlias": "Johnny",
        "externalId": "EMP-12345"
      }
    ],
    "workedOnByIds": [
      123
    ],
    "workedOnBy": [
      {
        "id": 1,
        "firstName": "Max",
        "lastName": "Mustermann",
        "email": "demo@enneo.dev",
        "phone": "+49 123 456789",
        "image": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=",
        "password": 123456,
        "lastSeen": "2022-08-12 12:21:21",
        "type": "enneo",
        "isSsoOnly": 0,
        "lang": "de",
        "nameAlias": "Johnny",
        "externalId": "EMP-12345"
      }
    ],
    "attachments": [
      {
        "id": "103013960646,",
        "url": "https://storage.googleapis.com/enneo-attachments-public/a1/103013960646-4b1aa775/IMG_20230301_192712.jpg",
        "name": "IMG_20230301_192712.jpg",
        "size": 2292952,
        "width": 3120,
        "height": 4160,
        "inline": false,
        "fileEnding": "jpg",
        "contentType": "image/jpeg",
        "originalUrl": "https://storage.example.com/attachments/IMG_20230301_192712.jpg",
        "extractedData": null,
        "extractionStatus": "success",
        "extractionData": {
          "confidence": 0.815,
          "meterValue": 87870.5
        }
      }
    ],
    "additionalData": null,
    "template": "<p>Hallo {{customer.firstname}},</p><p>%MESSAGE%</p><p>Viele Grüße,<br>{{agent.firstName}}</p>",
    "tags": [
      {
        "id": 123,
        "name": "Complaint",
        "fullName": "Second Level: Complaint",
        "parent": 6,
        "reference": "ticket",
        "type": "skill",
        "visibility": "public",
        "color": "grey",
        "properties": [],
        "complexity": "moderate",
        "sla": 8,
        "priority": "do-not-change",
        "channels": [
          "email",
          "chat"
        ],
        "subchannels": [
          2,
          4
        ],
        "routingRelevance": true,
        "detectionDetails": {},
        "assignment": [
          "assignBySubchannel",
          "assignByCustomLogic"
        ],
        "testCase": {},
        "modifiedBy": "John Doe",
        "modifiedAt": "2024-08-29 14:38:12"
      }
    ],
    "tagIds": [
      62,
      61
    ],
    "addTagIds": [
      62
    ],
    "removeTagIds": [
      61
    ],
    "refresh": true,
    "refreshTags": true,
    "refreshMode": "tags",
    "agentSkillsMatch": true,
    "intents": [
      {
        "id": 1211221,
        "code": "process_meter_reading",
        "name": "Process a meter reading",
        "contractId": "746839",
        "status": "ready",
        "confidence": 0.95,
        "confidenceColor": "warning",
        "verified": false,
        "context": {},
        "messagePreview": "We have successfully processed your meter reading",
        "recipient": "john@smith.com",
        "data": {},
        "options": [
          {
            "type": "enter_into_system",
            "name": "Eintragen",
            "icon": "check",
            "recommended": true,
            "order": 1
          },
          {
            "type": "ignore",
            "name": "Ignorieren",
            "icon": "cancel",
            "recommended": false,
            "order": 2
          },
          {
            "type": "forward_to_vnb",
            "name": "An VNB verweisen",
            "icon": "questionMark",
            "recommended": false,
            "order": 3
          }
        ],
        "infos": [
          {
            "code": "USER_WARNING",
            "type": "warning",
            "message": "Reading is plausible",
            "extraInfo": "Expected reading was 421 kWh. Plausbible because difference to 317 kWh is below threshold of 200 kWh"
          }
        ],
        "extraInfo": null,
        "outcome": {
          "aiAgentId": 1,
          "success": true,
          "messageLocalized": "Powercloud accepted meter reading",
          "internalData": {
            "requestEndpoint": "saveReadingByContractId",
            "requestParams": "readingValue=21;date=2022-12-31"
          },
          "executedAt": "2022-12-13 22:18:06",
          "userId": 1,
          "sent": true,
          "ticketClosed": true,
          "recipient": "john@smith.com",
          "message": "We successfully processed your meter reading of 21 kWh dated Dec 31, 2022",
          "template": "<p>Dear John,</p><p>%MESSAGE%</p><i>Mike from your service team</i>",
          "sources": [
            {
              "type": "knowledgeSource",
              "id": 376189,
              "name": "Opening hours",
              "url": "https://company.com/faq/376189",
              "text": "Our service hours are from 8am to 5pm. We are closed on weekends. [...]"
            }
          ],
          "txId": "c916167c94"
        }
      }
    ],
    "rawData": null,
    "workitem": {}
  }
]
'
{
  "success": true
}

Autorisierungen

Authorization
string
header
erforderlich

JWT-based authentication

Abfrageparameter

includeInWorklog
boolean
Standard:true

Whether to include the ticket in time tracking, and thus worklog. Useful when a spam ticket should be closed, but it should not show up in the average handling time statistics

Body

application/json

A JSON object containing changes

id
integer
Beispiel:

376189

direction
enum<string>

Direction of the ticket

Verfügbare Optionen:
in,
out,
internal
Beispiel:

"in"

from

Sender of email. Used when channel is not call. Null is channel=system

Beispiel:

"tom@gmail.com"

fromName
string | null

Provided when customer's request included a Name, e.g. 'Tom Mustermann tom@mm.com' for an email or during the chat bot initialization. Null when not set

Beispiel:

"Tom Mustermann"

to

Recipent of request. Can be an array of email addresses, but also a phone number or chat group name depending on channel

E-Mail address, used when channel is email,portal,chat

ccEmails
string<email>[]
veraltet

⚠️ DEPRECATED: Use replyRecipients.cc instead. Any emails in CC. Used when channel=email, otherwise empty array

bccEmails
string<email>[]
veraltet

⚠️ DEPRECATED: Use replyRecipients.bcc instead. Any emails in BCC. Used when channel=email, otherwise empty array

replyCcEmails
string<email>[]
veraltet

⚠️ DEPRECATED: Use replyRecipients.cc instead. Any emails in CC for a reply. Used when channel=email, otherwise empty array

replyRecipients
object | null

Recommended recipients for replying to this ticket. Calculated based on channel, direction, latest conversation, and ERP data. Returns null for system tickets (cannot be replied to).

Beispiel:
{
  "to": ["customer@example.com"],
  "cc": ["manager@example.com"],
  "bcc": []
}
subchannelId
integer | null

ID of the subchannel

externalTicketId
string | null

Unique identifier from an external ticketing system.

Can be provided when creating a ticket via POST /ticket to prevent duplicates. If a ticket with this externalTicketId already exists, it will be updated instead of creating a new one.

Beispiel:

"EXT-12345"

sentiment
string | null

AI-detected sentiment

Beispiel:

"positive"

language
string | null

Detected language name

Beispiel:

"English"

languageCode
string | null

Detected language code

Beispiel:

"en"

autoExecuteAt
string<date-time> | null

When the ticket should be auto-executed

aiSupportLevel
enum<string>

Level of AI support for this ticket

Verfügbare Optionen:
unprocessed,
human,
bot,
automated
spamStatus
enum<string> | null

Spam classification status of the ticket. Primary marker for routing and backlog spam filters.

  • auto_spam / auto_clean / auto_programmatic: Set automatically (headers, Cortex). auto_programmatic = header rule marked programmatic.
  • manual_spam / manual_clean: Set manually via API. Manual statuses are not overwritten by automatic detection.

Spam statuses (auto_spam, auto_programmatic, manual_spam) exclude tickets from routing (ticketScope=skills). Backlog filter: t.spamStatus with in / not in and spam status values (not in includes NULL as not-spam).

Tickets marked as spam are skipped during automatic AI processing. A configured spamDetectionTagIds tag also marks spam at runtime (Ticket::isSpam()), but SQL filters use this column only.

Verfügbare Optionen:
auto_spam,
auto_clean,
auto_programmatic,
manual_spam,
manual_clean
Beispiel:

"auto_clean"

isCustomerActive
boolean

Whether the customer is currently active

interface
enum<string>

Name of the ticketing system interface

Verfügbare Optionen:
internal
Beispiel:

"internal"

priority
enum<string>

Priority of ticket

Verfügbare Optionen:
low,
medium,
high,
urgent
Beispiel:

"low"

channel
enum<string>

Channel of ticket

Verfügbare Optionen:
email,
portal,
phone,
letter,
system,
chat,
walkIn
Beispiel:

"email"

channelId
string | null

Unique ID of chat conversation. Used when channel=chat

Beispiel:

"32291c7e-1cce-4d4c-8269-15e6a6501466"

status
enum<string>

Status of ticket

Verfügbare Optionen:
open,
pending,
closed
Beispiel:

"open"

summary
string

Summary of request

Beispiel:

"I want to relocate and send you a meter reading"

subject
string

Subject of email

Beispiel:

"I want to relocate and send you a meter reading"

bodyPlain
string | null

Body of request in plain text form (no HTML).

⚠️ Only included in GET /ticket/{id}, NOT in POST /ticket/search responses. May be null if ticket has no body content.

Beispiel:

"Sehr geehrter Kundenservice,\n\nkönnten Sie bitte den beiliegenden Zählerstand meines Zählers in Ihr System eintragen und mir eine Zwischenrechnung zukommen lassen? Außerdem würde ich gerne zu meiner neuen Adresse Hugo-Junkers-Str. 5 in 82031 Grünwald wechseln. Ich ziehe nächsten Donnerstag ein. Können Sie meinen alten Vertrag zum 1. November für mich kündigen?\n\nIch danke Ihnen, Tom"

body
string | null

Body of request in originial form (incl. HTML).

⚠️ Only included in GET /ticket/{id}, NOT in POST /ticket/search responses. May be null if ticket has no body content.

Beispiel:

"<p>Sehr geehrter Kundenservice,</p><p>k&#246;nnten Sie bitte den beiliegenden Z&#228;hlerstand meines Z&#228;hlers in Ihr System eintragen und mir eine Zwischenrechnung zukommen lassen? Au&#223;erdem w&#252;rde ich gerne zu meiner neuen Adresse Hugo-Junkers-Str. 5 in 82031 Gr&#252;nwald wechseln. Ich ziehe n&#228;chsten Donnerstag ein. K&#246;nnen Sie meinen alten Vertrag zum 1. November f&#252;r mich k&#252;ndigen?</p><p>Ich danke Ihnen, Tom</p>"

bodyClean
string | null

Version of body without any footers, signatures or other non-relevant content. Used as input for AI models.

⚠️ Only included in GET /ticket/{id}, NOT in POST /ticket/search responses. May be null if ticket has no body content.

Beispiel:

"Sehr geehrter Kundenservice, könnten Sie bitte den beiliegenden Zählerstand meines Zählers in Ihr System eintragen und mir eine Zwischenrechnung zukommen lassen?"

isEscalated
boolean
Beispiel:

false

createdAt
string<DateTime>
Beispiel:

"2022-12-13 22:18:06"

modifiedAt
string<DateTime> | null

Last change of this ticket

Beispiel:

null

firstResponseDueBy
string<DateTime> | null

Latest date by when this ticket should be responded to, but not necessarily solved

Beispiel:

"2022-12-14 22:18:06"

dueBy
string<DateTime> | null

Latest date by when this ticket should be resolved

Beispiel:

"2022-12-15 22:18:06"

closedAt
string<DateTime> | null

Date when this ticket was closed/resolved

Beispiel:

null

customer
object

Customer information associated with this ticket.

⚠️ Format varies by endpoint:

  • POST /ticket/search: Compact format with limited properties
  • GET /ticket/{id}: Full Customer object with all properties
customerId
string | null

Associated primary customer id of that ticket. Null if not detected by AI or not set by user

Beispiel:

"123"

contractId
string | null

Associated primary contract id of that ticket. Null if not detected by AI or not set by user

Beispiel:

"746839"

partnerId
integer | null

Associated partner id of that ticket. Null if not detected by AI or not set by user

Beispiel:

123

customerLegitimation
integer

Customer legitimation score:

  • 0 = No customer identified or no contract associated
  • 10 = Default confidence for email/portal/chat channels when no other criteria match
  • 12 = Email not found in ERP system
  • 13 = Matching contract/customer ID and lastname found in message
  • 15 = Matching contract and customer ID found in message
  • 20 = High confidence cases:
    • System channel or outgoing/internal messages
    • Sender email matches contract/customer email
    • For letters: address matches customer/contract address
  • 30 = Manually confirmed by agent or AI during chat
  • 40+ = Custom level that will be set by agent/chatbot for more strict customer verification
Beispiel:

30

customerLegitimationMessage
string | null

Human-readable message explaining the customer legitimation status. Only provided when customerLegitimation is between 10 and 19.

Beispiel:

"Customer could not be confirmed"

responderId
integer | null

User ID of agent that authored the latest response to this ticket.

Beispiel:

null

agentId
integer | null

Agent ID associated to this ticket (if any).

Beispiel:

null

agent
object

Agent profile associated to this ticket. Null if no agent is assigned.

assignedAgentIds
integer[]

Array of agent IDs that are assigned to this ticket

Agent ID

assignedAgents
object[]

Array of agents that are assigned to this ticket

workedOnByIds
integer[]

Array of agent IDs that worked on this ticket in last hour

Agent ID

workedOnBy
object[]

Array of agent IDs that worked on this ticket in last hour

attachments
object[]

Attachments associated with this ticket (filtered: non-inline attachments or PDFs only).

⚠️ Only included in GET /ticket/{id}, NOT in POST /ticket/search responses.

additionalData
object | null

Client-specific data objects can be included here

Beispiel:

null

template
string | null

Generic email template with placeholders like "Hello {{customer.firstname}}, %MESSAGE%, Best regards {{agent.firstName}}".

⚠️ Only included in GET /ticket/{id}, NOT in POST /ticket/search responses. May be null if no template is configured for this subchannel.

Beispiel:

"<p>Hallo {{customer.firstname}},</p><p>%MESSAGE%</p><p>Viele Grüße,<br>{{agent.firstName}}</p>"

tags
object[]

Tags loaded from intents

tagIds
integer[]

List of tag IDs. When updating, replaces all existing tags. Cannot be used together with addTagIds/removeTagIds

Beispiel:
[62, 61]
addTagIds
integer[]
write-only

List of tag IDs to add to existing tags (for bulk update). Cannot be used together with tagIds

Beispiel:
[62]
removeTagIds
integer[]
write-only

List of tag IDs to remove from existing tags (for bulk update). Cannot be used together with tagIds

Beispiel:
[61]
refresh
boolean
veraltet
write-only

Deprecated. Use refreshMode=full instead. Special flag for bulk update — if true, skips saving the ticket to database and webhooks execution, and schedules a full AI re-run.

Beispiel:

true

refreshTags
boolean
veraltet
write-only

Deprecated. Use refreshMode=tags instead. Special flag for bulk update — if true, only AI tag detection will be performed (faster than full processing). Skips saving to database and webhooks execution.

Beispiel:

true

refreshMode
enum<string>
write-only

Special flag for bulk update. Schedules a selective AI re-run and skips saving the ticket to database and webhooks execution.

  • full — re-run all AI checks (equivalent to the legacy refresh flag).
  • summaryAndText — re-run summary, body extraction, sentiment.
  • customer — re-detect customer; if a new customer is detected, AI agents re-run too.
  • tags — clear manual tags (auto-assigned tags are preserved) and re-detect via AI (equivalent to the legacy refreshTags flag).
  • tagsRuleBased — like tags but rule-based only (channel/subchannel/condition tags); no LLM or embedding calls.
  • agents — re-run AI agents only.
Verfügbare Optionen:
full,
summaryAndText,
customer,
tags,
tagsRuleBased,
agents
Beispiel:

"tags"

agentSkillsMatch
boolean

If false, the agent doesn't have the skills to handle the ticket

Beispiel:

true

intents
object[]

AI-detected intents for this ticket.

⚠️ Format varies by endpoint:

  • POST /ticket/search: Only {id, aiAgentId, name, confidenceColor, infos} properties are included
  • GET /ticket/{id}: Full Intent objects with all properties
rawData
object | null

Raw source data from the originating system in its proprietary format.

Only included if explicitly requested via includeRawData=true query parameter.

Beispiel:

null

workitem
object | null

Additional metadata for system-generated tickets (channel=system). Used internally for automated processes.

⚠️ Only included in GET /ticket/{id} AND only when channel=system. Returns null for all other tickets.

Antwort

Successful operation

Data format of Enneo success messages

success
boolean

Operation was successful

Beispiel:

true