Passer au contenu principal
POST
/
whatsapp
/
groups
/
send
Envoyer un message groupe
curl --request POST \
  --url https://api.wachap.com/v1/whatsapp/groups/send \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "accountId": "<string>",
  "groupJid": "<string>",
  "type": "text",
  "content": "<string>",
  "imageUrl": "<string>",
  "caption": "<string>"
}
'

Envoyer un message dans un groupe

Envoyez un message (texte, image, vidéo, etc.) dans un groupe WhatsApp.

Endpoint

/v1/whatsapp/groups/send

Headers

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

Body Parameters

accountId
string
requis
L’identifiant du compte WhatsApp
groupJid
string
requis
L’identifiant du groupe (format: [email protected])
type
string
requis
Type de message: text, image, video, document, audio, location, contact
content
string
Contenu du message texte (Requis si type=text)
imageUrl
string
URL de l’image (Requis si type=image)
caption
string
Légende pour image ou vidéo

Exemples de requêtes

curl -X POST https://api.wachap.com/v1/whatsapp/groups/send \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer VOTRE_CLE_SECRETE" \
  -d '{
    "accountId": "account_xxx",
    "groupJid": "[email protected]",
    "type": "text",
    "content": "Bonjour le groupe!"
  }'

Exemple de réponse

{
  "success": true,
  "message": "Message envoyé avec succès",
  "messageId": "3EB0123456789ABCDEF",
  "groupJid": "[email protected]"
}

Codes d’erreur

CodeDescription
400MISSING_ACCOUNT_ID, MISSING_GROUP_JID, MISSING_TYPE
401INVALID_SECRET_KEY - Clé secrète invalide
403NOT_MEMBER - Vous n’êtes pas membre du groupe
404ACCOUNT_NOT_FOUND, GROUP_NOT_FOUND

Autorisations

Authorization
string
header
requis

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

Corps

application/json
accountId
string
groupJid
string
type
enum<string>
Options disponibles:
text,
image,
video,
document,
audio,
location,
contact
content
string
imageUrl
string
caption
string

Réponse

200

OK