Documentation Index
Fetch the complete documentation index at: https://docs.msgflash.com/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
Important — how to get instanceId
instanceId is required to send a message.
Do not use these instead:
namewaNumber
instanceId:
- call
GET /api/v1/instances - select the target instance
- copy
data[n].id - send this value in the
instanceIdfield
id= technical identifier required by the APIname= human-readable labelwaNumber= connected number shown to the user
Body
| Field | Type | Required | Description |
|---|---|---|---|
instanceId | UUID | yes | Technical identifier of the MsgFlash instance, obtained via GET /api/v1/instances |
to | string | yes | E.164 number |
type | enum | yes if no templateId | text, image, video, audio, document, voice_note, location, contact, buttons |
templateId | UUID | yes if no type | Template to render |
text | string | depends on type | Body du message |
mediaUrl | string | depends on type | Public media URL |
latitude | number | if location | Latitude |
longitude | number | if location | Longitude |
locationName | string | no | Location name |
locationAddress | string | no | Address |
contactId | UUID | no | Shared contact or template context |
variables | object | no | custom.* values |
title | string | if buttons | Button message title |
description | string | if buttons | Button message description |
footer | string | no | Button message footer |
buttons | array | if buttons | List of buttons (max 2) |
Buttons
Each button must follow this structure:Request example
Messages with buttons
Messages with buttons require a WhatsApp Business account. They let you add up to 2 interactive buttons.Supported button types
| Type | Description | Required fields |
|---|---|---|
reply | Quick reply button | displayText, id |
copy | Button to copy text | displayText, copyCode |
url | Button that opens a URL | displayText, url |
call | Button to call | displayText, phoneNumber |
pix | Pix payment button (Brazil) | displayText, currency, name, keyType, key |
Button message example
Success response 201
In V1, safety warnings do not block sending. They are informational only.
Common errors
| HTTP | Code | When |
|---|---|---|
400 | VALIDATION_ERROR | Invalid body |
400 | TEMPLATE_INVALID | Template invalid |
400 | TEMPLATE_VARIABLES_MISSING | Required variables missing |
400 | TEMPLATE_CONTEXT_UNAVAILABLE | Invalid contact or instance context |
403 | SUBSCRIPTION_INACTIVE | Subscription not usable |
403 | UNSUPPORTED_FEATURE | Unsupported feature (buttons without WhatsApp Business) |
404 | NOT_FOUND | Instance, contact, or template not found |
429 | MONTHLY_OUTBOUND_QUOTA_EXCEEDED | Sending quota exhausted |