Skip to main content
POST
/
api
/
events
/
lead
Track Lead
curl --request POST \
  --url https://api.example.com/api/events/lead

Endpoint

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

Authentication

Request Body

FieldTypeRequiredDescription
trackingIdstringThe ta_tid from the cookie or URL parameter
customerobjectCustomer information
customer.externalIdstringYour internal user/customer ID
customer.emailstringCustomer’s email address
customer.firstnamestringCustomer’s first name
customer.lastnamestringCustomer’s last name
customer.phoneNumberstringCustomer’s phone number
customer.avatarUrlstringURL to customer’s avatar image
metadataobjectAdditional custom data (key-value pairs)

Examples

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"
    }
  }'

Response

{
  "ok": true
}

Error Codes

HTTP CodeErrorDescription
400Invalid payloadRequest body validation failed
400Missing customer.externalIdRequired field not provided
401Invalid API keyAPI key is invalid or revoked
401Hostname not in allowed listOrigin not whitelisted (client-side)
403This click does not belong to your workspacetrackingId is for a different workspace
404Click not found for this trackingIdtrackingId doesn’t exist or has expired