Passer au contenu principal
GET
/
contact-groups
/
{id}
/
contacts
Lister les contacts d'une liste
curl --request GET \
  --url https://api.wachap.com/v1/contact-groups/{id}/contacts \
  --header 'Authorization: Bearer <token>'

Endpoint

/v1/contact-groups/:id/contacts

Headers

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

URL Parameters

id
string
requis
L’identifiant de la liste

Query Parameters

limit
number
défaut:"50"
Nombre de contacts par page
offset
number
défaut:"0"
Position de départ pour la pagination

Exemples de requêtes

curl -X GET "https://api.wachap.com/v1/contact-groups/65f1234567890abcdef12345/contacts?limit=20&offset=0" \
  -H "Authorization: Bearer VOTRE_CLE_SECRETE"

Exemple de réponse

{
  "success": true,
  "listId": "65f1234567890abcdef12345",
  "contacts": [
    {
      "contactIndex": 0,
      "phone": "+22962861571",
      "name": "John Doe",
      "city": "Abidjan",
      "email": "[email protected]"
    },
    {
      "contactIndex": 1,
      "phone": "+33612345678",
      "name": "Marie Dupont",
      "city": "Paris",
      "email": "[email protected]"
    }
  ],
  "total": 150,
  "limit": 20,
  "offset": 0
}

Pagination

Pour naviguer à travers une grande liste :
  • Page 1 (0-49): ?limit=50&offset=0
  • Page 2 (50-99): ?limit=50&offset=50
  • Page 3 (100-149): ?limit=50&offset=100

Codes d’erreur

CodeDescription
401INVALID_SECRET_KEY - Clé secrète invalide
404Liste non trouvée
500GET_CONTACTS_ERROR - Erreur serveur

Autorisations

Authorization
string
header
requis

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

Paramètres de chemin

id
string
requis

Paramètres de requête

limit
integer
défaut:50
offset
integer
défaut:0

Réponse

200

OK