Aller au contenu principal

API REST

Leads

Liste, crée et récupère les leads de ton compte.

Lister les leads

GET/api/v1/leads

Récupère la liste de tes leads avec pagination et filtres optionnels.

statusstringoptionnel

Filtre par statut : new, qualified, booked.

sourcestringoptionnel

Filtre par canal d'origine : instagram, whatsapp

pageintegeroptionnel

Numéro de page (défaut 1).

limitintegeroptionnel

Éléments par page (défaut 20, max 100).

curl -X GET https://settyn.com/api/v1/leads \
  -H "Authorization: Bearer YOUR_API_KEY"
Réponse
{
  "data": [
    {
      "id": "lead_abc123",
      "name": "Jean Dupont",
      "email": "jean@example.com",
      "score": 85,
      "status": "qualified",
      "source": "instagram",
      "createdAt": "2026-03-15T10:30:00Z"
    }
  ],
  "pagination": { "page": 1, "limit": 20, "total": 142 }
}

Créer un lead

POST/api/v1/leads

Crée un nouveau lead dans ton compte.

namestringrequis

Nom du lead.

emailstringoptionnel

Adresse email.

sourcestringoptionnel

Canal d'origine.

tagsstring[]optionnel

Étiquettes libres.

curl -X POST https://settyn.com/api/v1/leads \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Marie Martin",
    "email": "marie@example.com",
    "source": "website",
    "tags": ["prospect", "high-ticket"]
  }'
Cette page a-t-elle été utile ?