WatificationDocs
Messages

Send a message

Queue a text, template, media, or structured message to an existing conversation, or to a contact or phone number on a channel connection. Requires the messages.send scope. Exactly one target form is allowed: conversationId, or contactId with channelConnectionId, or phone with channelConnectionId. senderId is only accepted together with channelConnectionId. A 202 means the message is queued; track it with GET /messages/{messageId} or the message.* webhooks. Button payloads, button ids and list row ids must not start with wtf:; such a send answers 422 MESSAGE_RESERVED_ID.

An optional Idempotency-Key returns the original acceptance body on completed repeats. Without a key, a repeat can send another message.

Responses

StatusMeaning and codes
202Accepted and queued.
400undefined
401undefined
403undefined
404undefined
409undefined
422undefined
429undefined

Success and handled error responses send Cache-Control: no-store and X-Correlation-ID (the resolved/generated UUID). Errors use application/problem+json and the reusable ProblemDetails schema below. Retry-After: 1 is sent only for RATE_LIMITED. Request examples read your key from a server environment variable; replace all fictional values.

Schemas and examples

POST
/messages

Authorization

ApiKey
headerAuthorizationBearer <token>

Server-side API key. publicId is 12 lowercase base32 characters (a-z, 2-7); secret is 43 base64url characters from 32 random bytes. Use Authorization: Bearer <complete key>. The API key determines the workspace; requests cannot select another workspace. All public routes share 20 requests per second per key. See API-key authentication.

Header Parameters

Idempotency-Key?string

Optional string of at most 128 characters. Empty string is accepted by validation; use a unique non-empty value per request. Save it and reuse it if you are unsure whether the request succeeded. See each operation for which values must match on repeated requests.

Lengthlength <= 128
X-Correlation-ID?string

Optional tracing ID. A UUID-shaped value is echoed in the response. Missing or invalid values are replaced with a generated UUID, not rejected.

Request Body

application/json
  1. body

Target rules are checked by the service. Use exactly one of conversationId, contactId with channelConnectionId, or phone with channelConnectionId.

conversationId?string
Formatuuid
contactId?string
Formatuuid
phone?string

E.164 number with the leading plus sign.

Match^\+[1-9]\d{1,14}$
channelConnectionId?string
Formatuuid
senderId?string

Only accepted together with channelConnectionId.

Length1 <= length <= 128
message*

Discriminated by type. Text and template messages, image, video, document, audio and sticker messages, and structured types such as buttons, list, location and reaction.

Response Body

Accepted and queued.

application/json
  1. response
messageId*string
Formatuuid
conversationId*string
Formatuuid
contactId*string
Formatuuid
status*"queued"
Value in"queued"