API referenceMessages

Send a message

POST
/v2/messages

Text, an approved template, buttons / a list, or a file (mediaId) on a connection, to a thread, a contact or a new recipient. 201 when the channel sent it now; 202 with status: queued when it is dispatched in the background (watch message.status_updated). Outside WhatsApp’s 24-hour window only a template may be sent (422 unsupported_channel_action, reason outside_24h_window). On WhatsApp Cloud a template sent with to or contactId starts the conversation (contact and thread created or reused); free text to someone with no conversation is 422 outside_24h_window. A template must be approved, in the given language and given exactly its variables (422, reason template_not_approved / template_language_not_found / template_variable_mismatch). A template with a header or buttons takes template.header (text, image, video, document or location; media by mediaId or a public https link) and template.buttons (by index: quick reply payload, dynamic URL suffix text, copy code text, flow payload), checked against the template (422, reason template_header_required / template_header_mismatch / template_button_not_found / template_button_mismatch / template_button_parameter_required). WhatsApp Web numbers have warm-up caps (429, reason whatsapp_web_daily_cap / whatsapp_web_minute_cap) and every response carries warnings: ["whatsapp_web_unofficial"]. The Idempotency-Key also de-duplicates the send itself, beyond the 24-hour replay window.

Authorization

ApiKey
headerAuthorizationBearer <token>

An API key from Developers → API keys: Authorization: Bearer gauge_live_… (or pulse_k_live_…).

Header Parameters

Gauge-Version?string

A dated version. Default 2026-10-21.

Idempotency-Key*string

Required on every POST. Retries with the same key replay the first response for 24 h.

Length1 <= length <= 255

Request Body

application/json
  1. body
connectionId*string
Formatuuid
to?string
Length3 <= length <= 320
contactId?string
Formatuuid
conversationId?string
Formatuuid
text?string
Lengthlength <= 4096
mediaId?string
Formatuuid
template?
interactive?|
replyTo?string
Formatuuid
metadata?

Response Body

The message, its status and any warnings.

application/json
  1. response
message*
conversationId*string
Formatuuid
status*string
warnings*array<>
Example Request
curl -X POST 'https://app.gauge.chat/api/v2/messages' \  -H 'Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{  "connectionId": "84b500d7-71c8-4b1f-adf4-f1eb0000973d"}'
Example Response
{  "message": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "conversationId": "ee6e55e8-45fe-4a3e-9bc8-4669f9fdf77a",    "type": "message",    "direction": "inbound",    "authorType": "string",    "authorMemberId": "76fc4ed4-930e-473e-a8fc-09f425f86e65",    "kind": "string",    "text": "string",    "status": "string",    "failureReason": "string",    "media": {      "mime": "string",      "filename": "string",      "mediaId": "5a8ffac5-2288-485d-b463-90c3cd9941ad"    },    "template": {      "name": "string",      "language": "string"    },    "via": "string",    "replyToMessageId": "666dd795-555f-462a-8c3b-fb8ab1fdc45f",    "metadata": {      "property1": "string",      "property2": "string"    },    "createdAt": "string"  },  "conversationId": "ee6e55e8-45fe-4a3e-9bc8-4669f9fdf77a",  "status": "string",  "warnings": [    "whatsapp_web_unofficial"  ]}