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 create a campaign.
To get it:
- call
GET /api/v1/instances - choose an instance with
status = "connected"when possible - copy
data[n].id - send this value in
instanceId
namewaNumber
Body
| Field | Type | Required | Description |
|---|---|---|---|
instanceId | UUID | yes | Technical identifier of the MsgFlash instance, obtained via GET /api/v1/instances |
name | string | yes | Nom interne |
schedule | ISO 8601 | yes | Date de démarrage |
repeat | string | no | noe, daily, weekly |
recipients | object | yes | Recipient selector |
templateId | UUID | yes si mode template | Template used |
variables | object | no | Variables custom.* globales |
type | enum | yes si mode direct | text, image, video, audio, document, voice_note, buttons |
body | string | depends on type | Obligatoire pour text, optionnel pour certains medias |
mediaUrl | string | depends on type | Obligatoire pour les types media |
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) |
Content rule
A campaign must have exactly one content mode:- soit
templateId - soit
type+ contenu direct
recipients
| Field | Type | Required | Description |
|---|---|---|---|
type | enum | yes | all, tags, explicit, group |
value | string[] | depends on type | Tags ou IDs de contacts |
groupId | UUID | if type=group | Target group |
Success response 201
In V1,
safety.decision is allow or warn. A warning does not prevent campaign creation.Common errors
| HTTP | Code | When |
|---|---|---|
400 | VALIDATION_ERROR | Empty campaign, missing body, missing media, invalid recipients |
403 | CAMPAIGNS_NOT_AVAILABLE_ON_PLAN | Plan trop faible |
403 | UNSUPPORTED_FEATURE | Unsupported feature (buttons without WhatsApp Business) |
404 | NOT_FOUND | Instance ou template not found |