Endpoint
Body
| Champ | Type | Requis | Description |
|---|---|---|---|
instanceId | UUID | oui | Instance source |
to | string | oui | Numéro E.164 |
type | enum | oui si pas de templateId | text, image, video, audio, document, voice_note, location, contact |
templateId | UUID | oui si pas de type | Template à rendre |
text | string | selon type | Corps du message |
mediaUrl | string | selon type | URL publique du media |
latitude | number | si location | Latitude |
longitude | number | si location | Longitude |
locationName | string | non | Nom du lieu |
locationAddress | string | non | Adresse |
contactId | UUID | non | Contact partagé ou contexte template |
variables | object | non | Valeurs custom.* |
Exemple de requête
Réponse succès 201
Erreurs courantes
| HTTP | Code | Quand |
|---|---|---|
400 | VALIDATION_ERROR | Body invalide |
400 | TEMPLATE_INVALID | Template invalide |
400 | TEMPLATE_VARIABLES_MISSING | Variables requises manquantes |
400 | TEMPLATE_CONTEXT_UNAVAILABLE | Contact ou instance de contexte invalide |
403 | SUBSCRIPTION_INACTIVE | Souscription non exploitable |
404 | NOT_FOUND | Instance, contact ou template introuvable |
429 | MONTHLY_OUTBOUND_QUOTA_EXCEEDED | Quota d’envoi épuisé |