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 “image”
imageUrl
string
requis
URL publique de l’image
caption
string
Légende de l’image

Formats supportés

  • JPG / JPEG
  • PNG
  • GIF
  • WebP
Taille maximum : 10 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": "image",
    "imageUrl": "https://example.com/image.jpg",
    "caption": "Belle image ! 📸",
    "isCampaign": false
  }
}
'

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