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
ticketIdintegerpathrequiredThe ID of the ticket to store conversation for
Request body
processenumbodyDefault: batchWhen 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
directionenumbodyThe 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
fromstringbodyFrom email address
fromNamestringbodyFrom name
tostring[]bodyTo email addresses
ccEmailsstring[]bodyCC email addresses (can include names with email format like "Name <email@domain.com>")
bccEmailsstring[]bodyBCC email addresses
subjectstringbodyEmail subject line
bodystringbodyHTML body content
bodyPlainstringbodyOptional plain text body content. If not set, the body content will be used, stripped of HTML tags.
bodyCleanstringbodyOptional 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: falseWhether this is a private conversation (internal note by an agent)
subchannelIdintegerbodySubchannel 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)
statusenumbodyTicket status Options: open, pending, closed
createdAtstringbodyCreation timestamp (YYYY-MM-DD HH:MM:SS format) when the conversation was created. If not set, the current timestamp will be used.
firstResponseDueBystringbodyOptional first response due date (YYYY-MM-DD HH:MM:SS format). If set, the ticket will be updated with this first response due date.
dueBystringbodyOptional due date (YYYY-MM-DD HH:MM:SS format). If set, the ticket will be updated with this due date.
attachmentsobject[]bodyFile attachments (either url or base64 should be provided per attachment)
externalConversationIdstringbodyExternal conversation ID for tracking
rawDataobjectbodyCustom user-defined data object for additional metadata
typestringbodyDefault: htmlThe type of conversation
senderobjectbodySender information
contentobjectbodyConversation content
intentIdsinteger[]bodyArray of intent IDs
crmNotificationIdstringbodyOptional external CRM notification ID
contractIdstringbodyContract ID
customerIdstringbodyCustomer ID
agentIdintegerbodyAgent ID that authored the conversation
priorityenumbodyOptional 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