Passer au contenu principal
POST
/
whatsapp
/
groups
/
update
/
subject
Modifier le nom du groupe
curl --request POST \
  --url https://api.wachap.com/v1/whatsapp/groups/update/subject \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "accountId": "<string>",
  "groupJid": "<string>",
  "subject": "<string>"
}
'
{
  "success": true,
  "message": "<string>",
  "newSubject": "<string>"
}

Endpoint

POST https://api.wachap.com/v1/whatsapp/groups/update/subject

Headers

ParamètreTypeRequisDescription
AuthorizationstringOuiBearer token avec votre Secret Key (format: Bearer sk_...)

Body Parameters

ParamètreTypeRequisDescription
accountIdstringOuiL’identifiant du compte WhatsApp
groupJidstringOuiL’identifiant du groupe (format: [email protected])
subjectstringOuiLe nouveau nom du groupe (max 100 caractères)

Exemple de requête

curl -X POST https://api.wachap.com/v1/whatsapp/groups/update/subject \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer VOTRE_CLE_SECRETE" \
  -d '{
    "accountId": "account_xxx",
    "groupJid": "[email protected]",
    "subject": "Nouveau nom du groupe"
  }'

Exemple de réponse

{
  "success": true,
  "message": "Nom du groupe modifié avec succès",
  "groupJid": "[email protected]",
  "newSubject": "Nouveau nom du groupe"
}

Notes

  • Vous devez être administrateur du groupe pour modifier son nom
  • Le nom du groupe ne peut pas dépasser 100 caractères

Codes d’erreur

CodeDescription
400MISSING_ACCOUNT_ID - accountId manquant
400MISSING_GROUP_JID - groupJid manquant
400SUBJECT_TOO_LONG - Le nom dépasse 100 caractères
401INVALID_SECRET_KEY - Clé secrète invalide
403NOT_ADMIN - Vous n’êtes pas administrateur du groupe
404ACCOUNT_NOT_FOUND - Compte WhatsApp non trouvé

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
subject
string

Nouveau nom du groupe (max 100 char)

Réponse

200 - application/json

OK

success
boolean
message
string
newSubject
string