POST
/
ticket
/
{ticketId}
/
conversation
/
store
Store a new conversation
curl --request POST \
  --url https://demo.enneo.ai/api/mind/ticket/{ticketId}/conversation/store \
  --header 'Content-Type: application/json' \
  --data '{
  "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": {},
  "content": {},
  "intentIds": [
    123
  ],
  "crmNotificationId": "<string>",
  "contractId": "<string>",
  "customerId": "<string>",
  "agentId": 123,
  "priority": "low"
}'
{
  "success": true,
  "conversationId": 123,
  "ticketId": 123,
  "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"
    },
    "toEmail": [
      "to@gmail.com"
    ],
    "ccEmails": [
      "cc@gmail.com"
    ],
    "body": "<div>Thank you for your message, we can inform you that...</div>",
    "bodyPlain": "Thank you for your message, we can inform you that...",
    "bodyClean": "Thank you for your message, we can inform you that...",
    "content": {
      "message": "Thank you for your message, we can inform you that..."
    },
    "intentIds": [
      "ai_agent_meter_reading"
    ],
    "cortexRequestId": 123,
    "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://s3.eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/103013960646/original/IMG_20230301_192712.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAS6FNSMY2XLZULJPI%2F20230315%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20230315T135902Z&X-Amz-Expires=300&X-Amz-SignedHeaders=host&X-Amz-Signature=863f16c0b29b34cde3331ef76954db3f9605d8187cfd042b11d623ea988b9e0d",
        "extractedData": null,
        "extractionStatus": "success",
        "extractionData": {
          "confidence": 0.815,
          "meterValue": 87870.5
        }
      }
    ],
    "crmNotificationId": 123,
    "createdAt": 1657056276,
    "modifiedAt": 1672756198,
    "deletedAt": 1672756198
  },
  "eventId": 123
}

Authorizations

connect.sid
string
cookie
required

Cookie-based authentication

Path Parameters

ticketId
integer
required

The ID of the ticket to store conversation for

Body

application/json
process
enum<string>
default: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.

Available options:
realtime,
batch,
false
direction
enum<string>

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.

Available options:
in,
out,
internal
from
string

From email address

Example:

"john@smith.com"

fromName
string

From name

Example:

"John Smith"

to
string[]

To email addresses

Example:
["customer@web.de"]
ccEmails
string[]

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

Example:
[
"Michael Jackson <michael-test123@jack.s.on.com>"
]
bccEmails
string[]

BCC email addresses

subject
string

Email subject line

Example:

"Ticket subject"

body
string

HTML body content

Example:

"Ticket body PART 2"

bodyPlain
string

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

bodyClean
string

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.

private
boolean
default:false

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

Example:

false

subchannelId
integer

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)

Example:

4

status
enum<string>

Ticket status

Available options:
open,
pending,
closed
Example:

"open"

createdAt
string

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

Example:

"2024-03-01 00:00:00"

firstResponseDueBy
string

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.

Example:

"2021-01-02 00:00:00"

dueBy
string

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

Example:

"2021-01-07 00:00:00"

attachments
object[]

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

externalConversationId
string

External conversation ID for tracking

Example:

"abc-123"

rawData
object

Custom user-defined data object for additional metadata

Example:
{ "myObjectId": 123 }
type
string
default:html

The type of conversation

sender
object

Sender information

content
object

Conversation content

intentIds
integer[]

Array of intent IDs

crmNotificationId
string

Optional external CRM notification ID

contractId
string

Contract ID

customerId
string

Customer ID

agentId
integer

Agent ID that authored the conversation

priority
enum<string>

Optional ticket priority. If set, the ticket will be updated with this priority.

Available options:
low,
medium,
high,
urgent

Response

Conversation created successfully

success
boolean
conversationId
integer
ticketId
integer
conversation
object

A conversation is an interaction to a ticket. Typically a reply or internal note to an email, or a chat message for a chat

eventId
integer