Skip to main content
POST
Send agent message (SSE stream)

Autorizações

X-Api-Key
string
header
obrigatório

Parâmetros de caminho

agentPublicId
string<uuid>
obrigatório

Agent public ID

Corpo

application/json

Body for sending a message to an agent (sync or streaming).

attachments
object[]

Optional attachments to include with this message (max 10).

Maximum array length: 10
content
string

Message text. May be empty when at least one attachment is provided.

Maximum string length: 32000
Exemplo:

"Hi, can you summarize my latest invoices?"

conversationId
string<uuid>

Continue this conversation. Omit to create a new conversation or reuse one for the externalUserId.

Exemplo:

"9c3a4d22-1a8d-4b3f-9b1e-7a0f0c4f3e21"

externalUserId
string

Stable end-user identifier. Auto-generated UUID if omitted on a new conversation.

Maximum string length: 255
Exemplo:

"user_42"

isTest
boolean

Only honored when CREATING a new conversation. true excludes the conversation from the Studio inbox. Ignored when continuing an existing conversation.

Exemplo:

false

metadata
object

Arbitrary JSON metadata; stored on the conversation (first message only).

timeoutSeconds
integer<int32>

Sync-only: max wall-clock seconds to block before returning 408. Ignored by the stream endpoint.

Intervalo necessário: 1 <= x <= 300
Exemplo:

60

Resposta

SSE stream begins