Passer au contenu principal
POST
/
api
/
events
/
lead
Suivre un Lead
curl --request POST \
  --url https://api.example.com/api/events/lead

Endpoint

POST https://track.taap.it/api/events/lead

Authentification

Utilisez votre clé API secrète :
Authorization: Bearer taapit_sk_xxxxxxxxxxxx

Corps de la requête

ChampTypeRequisDescription
trackingIdstringLe ta_tid du cookie ou paramètre URL
customerobjectInformations client
customer.externalIdstringVotre ID utilisateur/client interne
customer.emailstringAdresse email du client
customer.firstnamestringPrénom du client
customer.lastnamestringNom du client
customer.phoneNumberstringNuméro de téléphone du client
customer.avatarUrlstringURL de l’avatar du client
metadataobjectDonnées personnalisées (paires clé-valeur)

Exemples

curl -X POST https://track.taap.it/api/events/lead \
  -H "Authorization: Bearer taapit_sk_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "trackingId": "rLnWe1uz9t282v7g",
    "customer": {
      "externalId": "user_123",
      "email": "[email protected]",
      "firstname": "John",
      "lastname": "Doe"
    },
    "metadata": {
      "source": "signup-form"
    }
  }'

Réponse

{
  "ok": true
}

Codes d’erreur

Code HTTPErreurDescription
400Invalid payloadValidation du corps de requête échouée
400Missing customer.externalIdChamp requis non fourni
401Invalid API keyClé API invalide ou révoquée
401Hostname not in allowed listOrigine non autorisée (côté client)
403This click does not belong to your workspacetrackingId appartient à un autre workspace
404Click not found for this trackingIdtrackingId n’existe pas ou a expiré