Passer au contenu principal
POST
/
whatsapp
/
messages
/
send
curl --request POST \
  --url https://api.wachap.com/v1/whatsapp/messages/send \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "data": {
    "accountId": "account_xxx",
    "to": "+33612345678",
    "type": "text",
    "content": "Bonjour depuis WaChap !"
  }
}
'

Endpoint

/v1/whatsapp/messages/send

Headers

Authorization
string
requis
Bearer token avec votre Secret Key (format: Bearer sk_...)

Body Parameters

accountId
string
requis
ID du compte WhatsApp
to
string
requis
Numéro destinataire
type
string
requis
Doit être “video”
videoUrl
string
requis
URL publique de la vidéo
caption
string
Légende de la vidéo

Formats supportés

  • MP4
  • 3GP
  • MOV
  • AVI
Taille maximum : 16 MB

Exemples de requêtes

curl -X POST https://api.wachap.com/v1/whatsapp/messages/send \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer VOTRE_CLE_SECRETE" \
  -d '{
    "data": {
      "accountId": "account_123",
      "to": "+33612345678",
      "type": "video",
      "videoUrl": "https://example.com/demo.mp4",
      "caption": "Démo vidéo 🎥"
    }
  }'

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Corps

application/json
data
object

Réponse

OK