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 “document”
documentUrl
string
requis
URL publique du document
fileName
string
requis
Nom du fichier
caption
string
Légende du document

Formats supportés

  • PDF
  • DOC / DOCX
  • XLS / XLSX
  • PPT / PPTX
  • TXT
  • ZIP
  • RAR
Taille maximum : 100 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": "document",
      "documentUrl": "https://example.com/rapport.pdf",
      "fileName": "rapport_mensuel.pdf",
      "caption": "Rapport du mois"
    }
  }'

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