Enneo

Conversation

Store a new conversation

POST /ticket/{ticketId}/conversation/store

POST /ticket/{ticketId}/conversation/store

Store a new conversation without sending any messages

Path parameters

ticketIdintegerpathrequired

The ID of the ticket to store conversation for

Request body

processenumbodyDefault: batch

When to run AI logic for the conversation. Realtime=Run AI logic synchronously, even though this will take some time, Batch=Run AI logic after the conversation is created asynchronously, False=Do not run AI logic at all. Options: realtime, batch, false

directionenumbody

The direction of the conversation. Out=Outgoing to customer, In=Incoming from customer, Internal=Internal conversation, e.g. from an internal email address from another department. Options: in, out, internal

fromstringbody

From email address

fromNamestringbody

From name

tostring[]body

To email addresses

ccEmailsstring[]body

CC email addresses (can include names with email format like "Name <email@domain.com>")

bccEmailsstring[]body

BCC email addresses

subjectstringbody

Email subject line

bodystringbody

HTML body content

bodyPlainstringbody

Optional plain text body content. If not set, the body content will be used, stripped of HTML tags.

bodyCleanstringbody

Optional clean body content. This is the body content without any HTML tags. If not set, the body content will be used, stripped of HTML tags.

privatebooleanbodyDefault: false

Whether this is a private conversation (internal note by an agent)

subchannelIdintegerbody

Subchannel ID. Must correspond to a subchannel in the ticket's channel. A subchannel is e.g. a specific mailbox (for email tickets) or a specific chat channel (for chat tickets)

statusenumbody

Ticket status Options: open, pending, closed

createdAtstringbody

Creation timestamp (YYYY-MM-DD HH:MM:SS format) when the conversation was created. If not set, the current timestamp will be used.

firstResponseDueBystringbody

Optional first response due date (YYYY-MM-DD HH:MM:SS format). If set, the ticket will be updated with this first response due date.

dueBystringbody

Optional due date (YYYY-MM-DD HH:MM:SS format). If set, the ticket will be updated with this due date.

attachmentsobject[]body

File attachments (either url or base64 should be provided per attachment)

externalConversationIdstringbody

External conversation ID for tracking

rawDataobjectbody

Custom user-defined data object for additional metadata

typestringbodyDefault: html

The type of conversation

senderobjectbody

Sender information

contentobjectbody

Conversation content

intentIdsinteger[]body

Array of intent IDs

crmNotificationIdstringbody

Optional external CRM notification ID

contractIdstringbody

Contract ID

customerIdstringbody

Customer ID

agentIdintegerbody

Agent ID that authored the conversation

priorityenumbody

Optional ticket priority. If set, the ticket will be updated with this priority. Options: low, medium, high, urgent

Request Example

{
  "process": "batch",
  "direction": "in",
  "from": "john@smith.com",
  "fromName": "John Smith",
  "to": [
    "customer@web.de"
  ],
  "ccEmails": [
    "Michael Jackson <michael-test123@jack.s.on.com>"
  ],
  "bccEmails": [
    "string"
  ],
  "subject": "Ticket subject",
  "body": "Ticket body PART 2",
  "bodyPlain": "string",
  "bodyClean": "string",
  "private": false,
  "subchannelId": 4,
  "status": "open",
  "createdAt": "2024-03-01 00:00:00",
  "firstResponseDueBy": "2021-01-02 00:00:00",
  "dueBy": "2021-01-07 00:00:00",
  "attachments": [
    {
      "name": "myattachment1.png",
      "url": "https://framerusercontent.com/images/n1fjKCgnztVE5RhOJBPPaCIRw.png",
      "base64": "base-64-encoded-string-of-attachment-file"
    }
  ],
  "externalConversationId": "abc-123",
  "rawData": {
    "myObjectId": 123
  },
  "type": "html",
  "sender": null,
  "content": null,
  "intentIds": [
    1
  ],
  "crmNotificationId": "string"
}

Responses

201 — Conversation created successfully

Response Example

{
  "success": true,
  "conversationId": 1,
  "ticketId": 1,
  "conversation": {
    "id": 123,
    "ticketId": 123,
    "type": "html",
    "direction": "out",
    "private": false,
    "isDraft": false,
    "fromEmail": "service@enneo.ai",
    "fromEmailName": "Enneo Admin",
    "agentId": 1,
    "sender": {
      "id": 1,
      "name": "Enneo Admin",
      "email": "example@enneo.ai",
      "subchannelId": 1
    },
    "toEmail": [
      "to@gmail.com"
    ],
    "to": [
      "service@enneo.ai"
    ],
    "ccEmails": [
      "cc@gmail.com"
    ],
    "bccEmails": [
      "bcc@gmail.com"
    ],
    "channelId": "msg-123-abc",
    "content": {
      "message": "Thank you for your message, we can inform you that..."
    },
    "intentIds": [
      "ai_agent_meter_reading"
    ],
    "cortexRequestId": 123,
    "externalConversationId": "abc-123",
    "isRead": false,
    "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
        }
      }
    ],
    "interface": [],
    "createdAt": 1657056276,
    "modifiedAt": 1672756198
  },
  "eventId": 1
}

400 — Bad request - Invalid input

403 — Unauthorized

404 — Ticket not found

500 — Internal error