Skip to main content
cURL

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string
required
Pattern: ^[A-Za-z0-9_-]{8,128}$

Path Parameters

chatId
string
required

Body

application/json

text needs text. File types need base64 data and filename; maximum decoded 5 MiB. replyTo must refer to an available same-chat message. Optional agent context requires explicit agent delegation, agents:use and messages:bot. Bot-only keys cannot omit it to become ordinary senders.

type
enum<string>
required
Available options:
text,
pdf,
image,
document,
audio,
video
text
string
Required string length: 1 - 4000
data
string
filename
string
Maximum string length: 120
caption
string
Maximum string length: 1000
replyTo
string
Maximum string length: 512
agent
object
mentions
string[]

Text messages in groups only. Exact IDs of current group members; include @number for each ID in text. No implicit everyone mention.

Maximum array length: 20

Response

Completed repeat of the same request. The saved result is returned with replayed: true; nothing is sent again.

requestId
string
required
state
enum<string>
required
Available options:
sent,
unknown
messageId
string | null
required
replayed
boolean
required
error
string

Present only when state is unknown. Inspect the original request before any new send.