Skip to main content
POST
/
comms
/
chat
/
send-message
Create Message
curl --request POST \
  --url https://api.decodahealth.com/comms/chat/send-message \
  --header 'API-KEY: <api-key>' \
  --header 'Content-Type: multipart/form-data' \
  --header 'TENANT: <tenant>' \
  --form 'sender_id=<string>' \
  --form 'chat_id=<string>' \
  --form 'content=<string>' \
  --form 'message_uid=<string>' \
  --form 'quote_id=<string>' \
  --form 'files=<string>' \
  --form 'event_id=<string>' \
  --form message_type=REMINDER \
  --form files.0.items='@example-file'
{
  "id": "<string>",
  "chatId": "<string>",
  "status": "CREATED",
  "sender": {
    "id": "<string>",
    "type": "PROVIDER",
    "firstName": "<string>",
    "lastName": "<string>",
    "phoneNumber": "<string>",
    "email": "<string>",
    "locationId": "<string>"
  },
  "createdDate": "2023-11-07T05:31:56Z",
  "messageUid": "<string>",
  "content": "<string>",
  "errorMessage": "<string>",
  "sendoMessageId": "<string>",
  "functionCall": {},
  "files": [],
  "suggestedMessages": [
    {
      "id": "<string>",
      "chatId": "<string>",
      "fromMessageId": "<string>",
      "content": "<string>",
      "assistantId": "<string>",
      "isSelected": true,
      "createdDate": "2023-11-07T05:31:56Z"
    }
  ],
  "toolCalls": [
    {
      "id": "<string>",
      "toolName": "<string>",
      "toolArguments": {},
      "createdDate": "2023-11-07T05:31:56Z",
      "callId": "<string>",
      "messageId": "<string>",
      "alertId": "<string>",
      "toolCallId": "<string>",
      "result": {},
      "toolCallDescription": "<string>",
      "hasBeenCalled": false
    }
  ],
  "eventId": "<string>",
  "type": "REMINDER"
}

Headers

TENANT
string
required

The tenant you are making this request on behalf of

API-KEY
string
required

Your api key

Body

multipart/form-data
sender_id
string
required
chat_id
string
required
content
string | null
message_uid
string | null
quote_id
string | null
files
file[] | null
event_id
string | null
message_type
enum<string> | null
Available options:
REMINDER,
OVERRIDE,
FOLLOW_UP,
EXPIRED,
CONFIRMATION,
INTRODUCTORY,
CANCELLED,
UPDATE

Response

Successful Response

id
string
required
chatId
string
required
status
enum<string>
required
Available options:
CREATED,
QUEUED,
SCHEDULED,
SENDING,
SENT,
UNDELIVERED,
DELIVERED,
READ,
FAILED,
EXPIRED,
OPTED_OUT
sender
UserTiny · object
required
createdDate
string<date-time>
required
messageUid
string | null
content
string | null
errorMessage
string | null
sendoMessageId
string | null
functionCall
Functioncall · object
files
string[] | null
suggestedMessages
SuggestedMessageSummary · object[] | null
toolCalls
ToolCallSummary · object[] | null
eventId
string | null
type
enum<string> | null
Available options:
REMINDER,
OVERRIDE,
FOLLOW_UP,
EXPIRED,
CONFIRMATION,
INTRODUCTORY,
CANCELLED,
UPDATE