Skip to main content
POST
/
comms
/
chat
/
create
Create Chat
curl --request POST \
  --url https://api.decodahealth.com/comms/chat/create \
  --header 'API-KEY: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TENANT: <tenant>' \
  --data '
{
  "primaryPatientId": "<string>",
  "phoneNumber": "<string>",
  "status": "READ"
}
'
{
  "id": "<string>",
  "primaryPatientId": "<string>",
  "status": "READ",
  "patients": [
    {
      "id": "<string>",
      "firstName": "<string>",
      "lastName": "<string>",
      "primaryLocationId": "<string>"
    }
  ],
  "phoneNumber": "<string>",
  "createdDate": "2023-11-07T05:31:56Z",
  "optedOutOfSms": true,
  "latestMessageContent": "<string>",
  "latestMessageDate": "2023-11-07T05:31:56Z"
}

Headers

TENANT
string
required

The tenant you are making this request on behalf of

API-KEY
string
required

Your api key

Body

application/json
primaryPatientId
string
required
phoneNumber
string
required
status
enum<string>
default:READ
Available options:
READ,
UNREAD

Response

Successful Response

id
string
required
primaryPatientId
string | null
required
status
enum<string>
required
Available options:
READ,
UNREAD
patients
ChatPatient · object[]
required
phoneNumber
string
required
createdDate
string<date-time>
required
optedOutOfSms
boolean
required
latestMessageContent
string | null
latestMessageDate
string<date-time> | null