Skip to content
Core API
Esc
navigateopen⌘Jpreview
On this page

Export leads with registrant details

Filter sponsor leads, include the captured registrant and creator, and follow every result page.

Read the lead records and explicitly request the related registrant objects. A token’s association allowlist and the request’s include parameter do different jobs.

Configure access

The leads scope needs Read access to the event. Select the lead fields you need, enable the sponsor_id query filter, and allow the registrant and created_by_registrant associations with their desired fields. A sponsor restriction on the scope is the authorization boundary; a query filter alone does not restrict the token’s access.

Build the first page

The request uses include=registrant,created-by-registrant. The latter is the dashed relationship name; created_by_registrant is the scope configuration name.

Build a read request

Generates an example. No request is sent.

GET
Destination

Filters only apply when enabled in the token scope. Allowed relationships also need an explicit include request.

curl --fail-with-body --silent --show-error --globoff --max-time 30 --request GET \
  --url "${BRELLA_API_BASE_URL}"'/api/core/organizations/123/events/456/leads?sponsor_id=103705&include=registrant%2Ccreated-by-registrant&page%5Bnumber%5D=1&page%5Bsize%5D=50' \
  --header "Accept: application/vnd.brella.v4+json" \
  --header "Brella-API-Access-Token: ${BRELLA_API_ACCESS_TOKEN}"

For each lead, resolve relationships.registrant.data against included using both type and id. Resolve relationships.created-by-registrant.data the same way. Keep the lead even when creator linkage is null; this can be valid for a lead created without a creator registrant.

The association permits external-id, first-name, last-name and email. It does not expose arbitrary registrant fields. If you specifically need the imported external_* identity values, use a separately authorized registrant read and join by registrant ID; do not silently substitute profile values.

See what the scope changes

A fictional lead response. Toggle the scope settings and the request separately.

Token scope
API request

Allowing an association gives relationship linkage. Requesting it with include adds the permitted related object.

200 OKIllustrative response
/leads
{
  "data": [
    {
      "id": "901",
      "type": "lead",
      "attributes": {
        "notes": "Requested a follow-up",
        "registrant-id": 1201
      },
      "relationships": {
        "registrant": {
          "data": {
            "id": "1201",
            "type": "event-registrant"
          }
        }
      }
    }
  ],
  "meta": {
    "total_count": 1,
    "total_pages": 1,
    "current_page": 1
  }
}

Export every page

Start at page 1, process data and included together, then increment page[number] until meta.current_page reaches meta.total_pages. Page size is at most 100. Deduplicate by lead ID if restarting an export, and preserve one output row per lead.

A multi-page export is not a database snapshot; records can change while you read. For routine exports, keep a fixed time window using authorized created_from and created_to filters. Dates should be explicit ISO 8601 values.

Keep exported contact data in the customer’s intended destination. On 429, respect Retry-After; see retry guidance.