Skip to main content
POST
Create a message

Example Request

Example Response

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
provider
string
required

EMR provider ID to send the message to. A string of digits only (e.g. "12345").

Example:

"12345"

subject
string
required

Message subject.

Example:

"Lab results"

message
string
required

Message body text.

Example:

"Your recent lab results are ready to view."

callback_urls
string[]

URLs to receive the completion webhook for this message, in addition to the account webhook.

Example:
expires_at
string<date-time> | null

Optional ISO 8601 timestamp with an explicit timezone offset, in the future when submitted. Cobalt starts no new operation attempt after this deadline and reports reasons[].code EXPIRED. An attempt already in progress, including write reconciliation, may finish after it.

Example:

"2027-06-15T14:30:00Z"

Response

Message queued for creation

success
boolean
required
Example:

true

message
string
required
Example:

"Message queued for creation"

message_id
string
required
Example:

"f47ac10b58cc4372a5670e02b2c3d479"

job_id
required
Example:

12345