◆ Sapport for developers API reference Error catalog OpenAPI
Sections

Leads

Methods in this section: 2. All methods

MethodPathDescriptionScopesStatus
GET/leadsList leadsleads:readAvailable PII
GET/leads/{id}Get a leadleads:readAvailable PII
GET /leads Available PII

#List leads

Tenant leads in ascending updated_at order, paged by cursor. Archived leads are not returned by default. include_deleted=true currently returns 422 not_supported: deleted leads (tombstones) are not stored. The response contains the contact personal data: every disclosure is recorded in the disclosure log; on RU an IP allowlist and recipient country RU are required (otherwise 403 pii_transfer_not_allowed).

Scopes
leads:read
Rate limit
read
Idempotency
not required
Successful response
200 A page of leads.

Parameters

FieldTypeDescription
limitinteger
optional
In: query. Page size: 1 to 100, default 25.
cursorstring
optional
In: query. The next_cursor value from the previous response. Valid for 24 hours; start over when filters change.
statusstring
optional
In: query. Canonical status.
archivedboolean
optional
In: query. true — archived only; default false — non-archived only.
updated_sincestring
optional
In: query. Leads updated at or after this moment. ISO 8601: a date or a date-time with a zone.
updated_afterstring
optional
In: query. The same, strictly after the moment (for walking on from the last seen one). Not together with updated_since.
sourcestring
optional
In: query. Exact lead source value.
include_deletedboolean
optional
In: query. true — also return tombstones {id, deleted_at} of deleted records (kept for 30 days).

Response body

FieldTypeDescription
dataarray<Lead>
required
next_cursorstring
required, may be null
Cursor of the next page; null — the list is exhausted. Valid for 24 hours.

Examples

Request
curl -X GET 'https://wfacademy.org/api/public/v1/leads' \
  -H 'Authorization: Bearer '"$SAPPORT_API_KEY"
Response 200
{
  "data": [
    {
      "id": "EXAMPLE_ID",
      "external_id": null,
      "external_url": null,
      "version": null,
      "etag": "string",
      "status": "new",
      "archived": false,
      "archived_reason": null,
      "owner": "internal",
      "title": null,
      "source": null,
      "assigned_to": null,
      "value": null,
      "product_id": null,
      "course_slug": null,
      "contact": null,
      "conversation_id": null,
      "attribution": null,
      "score": null,
      "flags": null,
      "intent": null,
      "ai_summary": null,
      "next_action": null,
      "next_action_at": null,
      "lost_reason": null,
      "qualified_at": null,
      "won_at": null,
      "lost_at": null,
      "last_activity_at": null,
      "created_at": "2026-10-11T09:00:00Z",
      "updated_at": "2026-10-11T09:00:00Z"
    }
  ],
  "next_cursor": "EXAMPLE_CURSOR"
}
Error example
{
  "type": "https://wfacademy.org/developers/errors#scope_missing",
  "title": "Scope is missing",
  "status": 403,
  "code": "scope_missing",
  "detail": "EXAMPLE",
  "request_id": "req_EXAMPLE"
}

Examples are illustrative: the key in them is a placeholder (EXAMPLE), field values are made up.

Possible errors

invalid_api_key wrong_cell integration_inactive tenant_inactive ip_not_allowed feature_not_in_plan rate_limited wallet_suspended service_unavailable internal_error scope_missing pii_transfer_not_allowed validation_failed

GET /leads/{id} Available PII

#Get a lead

A lead card: contact, attribution, score (value, grade A–D, reason, flags), version. The ETag header equals the etag field. The response contains the contact personal data: every disclosure is recorded in the disclosure log; on RU an IP allowlist and recipient country RU are required (otherwise 403 pii_transfer_not_allowed).

Scopes
leads:read
Rate limit
read
Idempotency
not required
Successful response
200 The lead.

Parameters

FieldTypeDescription
idstring
required
In: path. Lead id (uuid).

Response body

FieldTypeDescription
idstring
required
Lead id.
external_idstring
required, may be null
The id in an external CRM; null until an external CRM is connected.
external_urlstring
required, may be null
versioninteger
required, may be null
Version for If-Match; null while the database has no version column — use etag.
etagstring
required
The version tag (equals the ETag header of the card).
statusstring
required
One of six canonical statuses. Archive is the archived flag, not a status.
Values: new qualified proposal negotiation won lost
archivedboolean
required
The lead is archived.
archived_reasonstring
required, may be null
Archive reason, for example ai_not_client.
ownerstring
required
Where the lead lives: internal — in our CRM.
Values: internal external
titlestring
required, may be null
sourcestring
required, may be null
assigned_tostring
required, may be null
Id of the responsible employee.
valueMoney
required, may be null
product_idstring
required, may be null
course_slugstring
required, may be null
contactLeadContact
required, may be null
conversation_idstring
required, may be null
attributionLeadAttribution
required, may be null
scoreLeadScore
required, may be null
flagsLeadFlags
required, may be null
intentstring
required, may be null
ai_summarystring
required, may be null
next_actionstring
required, may be null
next_action_atstring
required, may be null
ISO 8601 UTC.
lost_reasonstring
required, may be null
qualified_atstring
required, may be null
ISO 8601 UTC.
won_atstring
required, may be null
ISO 8601 UTC.
lost_atstring
required, may be null
ISO 8601 UTC.
last_activity_atstring
required, may be null
ISO 8601 UTC.
created_atstring
required
Created. ISO 8601 UTC.
updated_atstring
required
Updated. ISO 8601 UTC.

Examples

Request
curl -X GET 'https://wfacademy.org/api/public/v1/leads/EXAMPLE_ID' \
  -H 'Authorization: Bearer '"$SAPPORT_API_KEY"
Response 200
{
  "id": "EXAMPLE_ID",
  "external_id": "EXAMPLE_ID",
  "external_url": "https://example.com/hooks/sapport",
  "version": 0,
  "etag": "string",
  "status": "new",
  "archived": false,
  "archived_reason": "string",
  "owner": "internal",
  "title": "string",
  "source": "string",
  "assigned_to": "string",
  "value": {
    "amount": "123.45",
    "currency": "GBP"
  },
  "product_id": "EXAMPLE_ID",
  "course_slug": "string",
  "contact": {
    "id": "EXAMPLE_ID",
    "first_name": null,
    "last_name": null,
    "email": null,
    "phone": null,
    "tags": [
      null
    ],
    "geo_country": null,
    "geo_city": null
  },
  "conversation_id": "EXAMPLE_ID",
  "attribution": {
    "utm_source": null,
    "utm_medium": null,
    "utm_campaign": null,
    "first_page": null,
    "referrer": null
  },
  "score": {
    "score": 0,
    "grade": "A",
    "reason": null,
    "flags": null,
    "source": null,
    "model": null,
    "scored_at": null
  },
  "flags": {
    "buy_intent": null,
    "support": null,
    "supplier": null
  },
  "intent": "string",
  "ai_summary": "string",
  "next_action": "string",
  "next_action_at": "2026-10-11T09:00:00Z",
  "lost_reason": "string",
  "qualified_at": "2026-10-11T09:00:00Z",
  "won_at": "2026-10-11T09:00:00Z",
  "lost_at": "2026-10-11T09:00:00Z",
  "last_activity_at": "2026-10-11T09:00:00Z",
  "created_at": "2026-10-11T09:00:00Z",
  "updated_at": "2026-10-11T09:00:00Z"
}
Error example
{
  "type": "https://wfacademy.org/developers/errors#scope_missing",
  "title": "Scope is missing",
  "status": 403,
  "code": "scope_missing",
  "detail": "EXAMPLE",
  "request_id": "req_EXAMPLE"
}

Examples are illustrative: the key in them is a placeholder (EXAMPLE), field values are made up.

Possible errors

invalid_api_key wrong_cell integration_inactive tenant_inactive ip_not_allowed feature_not_in_plan rate_limited wallet_suspended service_unavailable internal_error scope_missing pii_transfer_not_allowed not_found