Skip to main content
POST
Send a message into a conversation

Authorizations

Authorization
string
header
required

Agent Token (rly_live_…), shown once when the agent is created.

Headers

Idempotency-Key
string

A legacy way to carry message_id for clients that cannot put it in the body. It is read only when it is itself a msg_ id; any other value is ignored and the server mints the id.

Pattern: ^msg_[0-9a-hjkmnp-tv-z]{26}$

Path Parameters

chat_id
string
required
Pattern: ^cnv_[0-9a-hjkmnp-tv-z]{26}$

Body

application/json

The /v1 send body. Unknown fields are ignored rather than refused; /v2 refuses them.

parts
object[]
required

Ordered parts of one message. An absent or empty array returns 422.

Required array length: 1 - 32 elements
message_id
string

The client-minted canonical id and idempotency key. Omit it and Relay mints one, which makes the send non-idempotent.

Pattern: ^msg_[0-9a-hjkmnp-tv-z]{26}$
Example:

"msg_01k1m4q9vn2r7t9b4c6qdh8xwy"

reply_to
object | null

A reply target on a send: a message of this conversation, optionally one exact part of it.

text
string

Optional plain-language representation for notifications and search. Relay derives one when it is absent.

Response

The committed message, as an array of one.

messages
object[]
required
Required array length: 1 element