POST
/
messages
Send Message
curl --request POST \
  --url https://api.usecobalt.com/v1/messages \
  --header 'Content-Type: application/json' \
  --header 'access_token: <api-key>' \
  --header 'client_id: <api-key>' \
  --header 'client_secret: <api-key>' \
  --data '{
  "provider": "<string>",
  "subject": "<string>",
  "message": "<string>"
}'
{
  "success": true,
  "message": "<string>",
  "data": {
    "message_id": "<string>"
  }
}

Example Request

curl -X POST https://api.usecobalt.com/v1/messages \
-H 'Content-Type: application/json' \
-H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
-H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
-H 'access_token: 493JKLHIU98789hLKH9HHJH' \
-d '{
    "provider": "123456789",
    "subject": "Test Message",
    "message": "This is a test message content."
}'

Example Response

{
    "success": true,
    "message": "Message sent successfully",
    "data": {
        "message_id": "msg_123456789"
    }
}

Request Parameters

The /messages endpoint requires the following fields:
  • provider (required): The EHR provider ID to send the message to
  • subject (required): The subject line for the message
  • message (required): The content of the message to be sent

Authorizations

client_id
string
header
required
client_secret
string
header
required
access_token
string
header
required

Body

application/json

Response

200 - application/json

Successful response

The response is of type object.