Skip to content

Submit a lead

You submit leads to Pingdex through the API. Pingdex validates the lead against the campaign’s schema, accepts it, and then processes and delivers it asynchronously.

POST https://api.pingdex.io/api/v1/leads

The API key you use must have the leads:ingest scope. See API keys and API authentication.

Field Type Required Notes
campaign_id string Yes The campaign to submit the lead to. The campaign must be enabled.
payload object Yes The lead data. Validated against the campaign schema.
external_id string No Your own reference for the lead. It is returned in webhooks and lets you match leads to your records. It does not prevent duplicates. See Idempotency.
Header Required Notes
Content-Type: application/json Yes The body must be JSON.
Idempotency-Key No Makes retries safe. See Idempotency.
Terminal window
curl https://api.pingdex.io/api/v1/leads \
--request POST \
--header "Authorization: Bearer $PINGDEX_API_KEY" \
--header "Content-Type: application/json" \
--header "Idempotency-Key: 5f0c2d9e-8a41-4b7c-9d3e-2a6b1c4f7e80" \
--data '{
"campaign_id": "3e1a7c52-9b04-4d68-a2f1-6c8d0e5b7a93",
"external_id": "web-2026-000123",
"payload": {
"email": "sam.example@example.com",
"postcode": "XX1 1XX",
"property_value": 325000,
"marketing_consent": true
}
}'

A successful submission returns 202 Accepted:

{
"id": "a91d3f6e-2b7c-4c85-8e10-d4f5a6b7c8d9",
"status": "received"
}

202 means Pingdex has received the lead, not that it has been delivered. The lead starts in the received status and moves on from there. See Lead lifecycle.

Keep the returned id. You can use it to look up the lead and its attempts through the API or the dashboard. See Leads API.

You have two options once a lead is accepted:

  • Webhooks: Pingdex calls your endpoint when the lead reaches a final outcome. See Webhooks.
  • Polling: read the lead through the API until its status is terminal.

Common causes are a disabled campaign, an API key without the leads:ingest scope, a payload that fails schema validation, or a reused idempotency key with a different body. See API errors and Troubleshooting.