Concepts
This page defines the terms used throughout the documentation. For short definitions, see the glossary.
Account
Section titled “Account”An account is the tenant boundary. Users, providers, campaigns, leads, attempts and idempotency keys belong to one account. Registering in the app creates your account and your first user together. Every API request runs in the account of the token’s user, and resources that belong to another account return 404.
Provider
Section titled “Provider”A provider is a buyer endpoint. It stores the provider name, an enabled flag, an integration, and optional headers and secrets. A new provider is disabled until you enable it.
See Providers.
Integration
Section titled “Integration”An integration describes how Pingdex contacts a provider and reads its response. It is an object with a single legs array:
{ "legs": [ { "name": "post", "role": "commit", "request": { "...": "..." } } ] }See Integration specification and Integration object.
A leg is one request in an integration. Each leg has a stable name, a role, a request and, where relevant, a response mapping.
| Role | Meaning |
|---|---|
quote |
The ping. Obtains a bid and establishes eligibility. |
commit |
The post. Submits the lead for commercial acceptance. |
An integration is either one commit leg (direct post) or a quote leg followed by a commit leg (ping/post). See What is ping/post?.
Leg names cannot be changed once a provider has been saved.
Campaign
Section titled “Campaign”A campaign is the boundary for distributing leads inside an account. It holds a lead schema, a routing strategy and an ordered list of providers. A lead belongs to one campaign. A provider can belong to more than one campaign. A new campaign is disabled until you enable it, and a disabled campaign rejects new leads.
See Campaigns.
Schema
Section titled “Schema”A campaign’s schema is a list of fields. Each field has a name, a type and a required flag. The types are string, integer, number and boolean. Pingdex checks each lead’s payload against the schema before storing it. An empty schema accepts any JSON object.
See Lead schema.
Routing strategy
Section titled “Routing strategy”The routing strategy decides how Pingdex chooses a provider for a lead.
| Strategy | Behaviour | Required integration |
|---|---|---|
highest_bid |
Quotes every eligible provider and commits to the highest valid bid. Equal bids go to the lowest provider id. | Quote then commit |
priority |
Commits to the first eligible provider in assignment order. | Commit only |
A lead is one submission to one campaign. It has a campaign_id, an optional external_id, a JSON object payload, a status and a received_at time. Submitting a lead returns 202 with its id and status. Leads are read back as summaries. The API does not return payloads.
See Submit a lead.
Attempt
Section titled “Attempt”An attempt is one contact with a provider for one leg. It records the leg name and role (quote or commit) and an outcome status. A lead has one attempt per leg that Pingdex tried, so a ping/post delivery produces quote attempts for each eligible provider and one commit attempt for the winner.
See Attempts.
Commercial status and delivery status
Section titled “Commercial status and delivery status”Pingdex tracks two separate things about a lead.
Delivery status records what happened at the HTTP level.
| Status | Meaning |
|---|---|
received |
Pingdex stored the lead and has not yet started processing it. |
processing |
A worker has claimed the lead. |
delivered |
The commit received a successful HTTP response. |
failed |
Delivery stopped after an unsuccessful HTTP response, no eligible provider or no valid bid. |
indeterminate |
The commit received no HTTP response, so the outcome is unknown. |
Commercial status records whether the buyer accepted the lead, based on the provider’s commit response mapping.
| Status | Meaning |
|---|---|
accepted |
The buyer response matched a configured accepted value. |
rejected |
The buyer response matched a configured rejected value. |
unknown |
Acceptance could not be established from the response. |
Commercial status is empty when the provider has no commit response mapping, or when the commit did not receive a successful HTTP response.
Secrets and headers
Section titled “Secrets and headers”A provider can store headers and secrets for each leg.
- Headers are sent with a leg’s request. Set them per leg, for example to send an
Authorizationheader. - Secrets are named values that a field mapping refers to by name, using a mapping of type
secret. The integration stores the name only, never the value.
Header values and secret values are stored encrypted and are never returned by the API. Provider responses report only whether headers are stored and the names of stored secrets. Omitting headers or secrets on an update keeps the stored values.
See Authentication.
Idempotency key
Section titled “Idempotency key”An idempotency key lets you repeat a lead submission safely. Send it in the Idempotency-Key header of POST /api/v1/leads.
- The same key with the same request returns the original lead and does not process it again.
- The same key with a different
campaign_id,external_idor payload returns409. - Without the header, every request creates a new lead, even if
external_idrepeats.
Keys are scoped to your account and must be non-empty and no longer than 255 characters. See Idempotency.
Webhook
Section titled “Webhook”An account can register one https webhook URL with a signing secret. When a lead reaches delivered, failed or indeterminate, Pingdex sends a signed request describing the event: lead.delivered, lead.failed or lead.indeterminate. The body contains metadata only and never the lead payload. Delivery is at least once, so receivers should de-duplicate on event_id.
See Webhooks and Account webhooks.
API key
Section titled “API key”API requests authenticate with a bearer token created under Settings, API keys. Each key carries scopes that limit what it can do.
| Scope | Allows |
|---|---|
leads:ingest |
Submit leads. |
leads:read |
List and read leads and their attempts. |
providers:manage |
Create and manage providers. |
campaigns:manage |
Create and manage campaigns. |
leads:ingest does not grant read access. See API authentication and API keys.