Skip to main content
POST
Create a message

Authorizations

Authorization
string
header
required

Use a workspace API key in the Authorization header. Keys use pk_live_<key_id> for production and pk_test<key_id>_ for test mode.

Headers

Idempotency-Key
string

Optional retry key for safely replaying create requests. Reusing the same key with a different request body returns 409.

Required string length: 8 - 255
Example:

"8db8e596-7c1a-4fd5-a728-4d6c99f4e66b"

Path Parameters

conversationId
string
required
Example:

"conv_x6q5vl75f5d53m7oet2k4r5w6a"

Body

application/json

Requires body or at least one attachment.

externalId
string

Your stable id for this message.

Example:

"msg_123"

sender
enum<string>
default:customer
Available options:
customer,
agent,
ai,
system
body
string
Example:

"Hi, is this villa available for yearly rental?"

channel
string
default:api
Example:

"whatsapp"

attachments
object[]
metadata
object
Example:
internal
boolean
default:false

True for internal notes that should not be sent to the customer.

Response

Created message.

Every key is always present; optional fields are null when unset.

id
string
required
Example:

"msg_x6q5vl75f5d53m7oet2k4r5w6a"

externalId
string | null
required
Example:

"msg_123"

conversationId
string
required
Example:

"conv_x6q5vl75f5d53m7oet2k4r5w6a"

sender
enum<string>
required
Available options:
customer,
agent,
ai,
system
body
string
required
Example:

"Hi, is this villa available for yearly rental?"

channel
string
required
Example:

"whatsapp"

attachments
object[]
required
metadata
object
required
internal
boolean
required
createdAt
string<date-time>
required