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 “location”
latitude
number
requis
Latitude (ex: 48.8566)
longitude
number
requis
Longitude (ex: 2.3522)
name
string
Nom du lieu
address
string
Adresse du lieu
NoteLes coordonnées doivent être valides :
  • Latitude: -90 à 90
  • Longitude: -180 à 180

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": "location",
      "latitude": 48.8566,
      "longitude": 2.3522,
      "name": "Tour Eiffel",
      "address": "Champ de Mars, 5 Avenue Anatole France, 75007 Paris"
    }
  }'

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