Passer au contenu principal
GET
/
contact-groups
Lister les listes de contacts
curl --request GET \
  --url https://api.wachap.com/v1/contact-groups \
  --header 'Authorization: Bearer <token>'

Endpoint

/v1/contact-groups

Headers

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

Exemples de requêtes

curl -X GET https://api.wachap.com/v1/contact-groups \
  -H "Authorization: Bearer VOTRE_CLE_SECRETE"

Exemple de réponse

{
  "success": true,
  "total": 3,
  "lists": [
    {
      "$id": "65f1234567890abcdef12345",
      "userId": "user_xxx",
      "name": "Clients Premium",
      "csvUrl": null,
      "status": "ready",
      "createdAt": "2024-03-15T10:00:00.000Z",
      "updatedAt": "2024-03-15T10:00:00.000Z",
      "totalContacts": 150
    },
    {
      "$id": "65f1234567890abcdef12347",
      "userId": "user_xxx",
      "name": "Import en cours",
      "csvUrl": "https://example.com/importing.csv",
      "status": "importing",
      "createdAt": "2024-03-16T11:00:00.000Z",
      "updatedAt": "2024-03-16T11:00:00.000Z",
      "totalContacts": 0
    }
  ]
}

Champs de la réponse

ChampTypeDescription
$idstringIdentifiant unique de la liste
namestringNom de la liste
statusstringStatut (ready, importing)
totalContactsnumberNombre de contacts dans la liste
createdAtstringDate de création

Codes d’erreur

CodeDescription
401INVALID_SECRET_KEY - Clé secrète invalide
500LIST_CONTACT_GROUPS_ERROR - Erreur lors de la récupération

Autorisations

Authorization
string
header
requis

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

Réponse

200

OK