Skip to content
Core API
Esc
↑↓navigate↵open⌘Jpreview
On this page

Leads

Leads: available fields, filters, associations, and API operations.

Operations

Event-level resource. Every operation requires an enabled Core API scope for this resource and access to the URL context.

GETList records

/api/core/organizations/123/events/456/leads

Permission: Read access. Readable fields, query filters and related objects must be selected in the scope.

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' \
  --header "Accept: application/vnd.brella.v4+json" \
  --header "Brella-API-Access-Token: ${BRELLA_API_ACCESS_TOKEN}"

Response: 200 OK. A JSON:API data array and pagination metadata. Default page size 30; maximum 100.

View response structure
{
  "data": [
    {
      "id": "1201",
      "type": "lead"
    }
  ],
  "meta": {
    "total_count": 1,
    "total_pages": 1,
    "current_page": 1
  }
}

Illustrative, with no additional response fields selected.

Errors: 400 for invalid parameter shapes; 403 for a missing/expired token or disallowed operation; 404 when the URL context, record or a referenced record is inaccessible; 429 for rate limits. Troubleshooting and retry guidance.

GETGet a record

/api/core/organizations/123/events/456/leads/1201

Permission: Read access. Readable fields, query filters and related objects must be selected in the scope.

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/1201' \
  --header "Accept: application/vnd.brella.v4+json" \
  --header "Brella-API-Access-Token: ${BRELLA_API_ACCESS_TOKEN}"

Response: 200 OK. A JSON:API data object; fields depend on the token scope.

View response structure
{
  "data": {
    "id": "1201",
    "type": "lead"
  }
}

Illustrative, with no additional response fields selected.

Errors: 400 for invalid parameter shapes; 403 for a missing/expired token or disallowed operation; 404 when the URL context, record or a referenced record is inaccessible; 429 for rate limits. Troubleshooting and retry guidance.

POSTCreate a record

/api/core/organizations/123/events/456/leads

Permission: Write access with the create action. Every request key must map to an allowed writable field; unconfigured inputs are ignored.

curl --fail-with-body --silent --show-error --globoff --max-time 30 --request POST \
  --url "${BRELLA_API_BASE_URL}"'/api/core/organizations/123/events/456/leads' \
  --header "Accept: application/vnd.brella.v4+json" \
  --header "Brella-API-Access-Token: ${BRELLA_API_ACCESS_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "registrant_id": 1201,
  "notes": "Requested pricing information"
}'

Response: 201 Created. Save data.id for later requests. Attributes come from Write-response fields.

View response structure
{
  "data": {
    "id": "1201",
    "type": "lead"
  }
}

Illustrative, with no additional response fields selected.

Errors: 400 for invalid parameter shapes; 403 for a missing/expired token or disallowed operation; 404 when the URL context, record or a referenced record is inaccessible; 422 for validation or business rules; 429 for rate limits. Troubleshooting and retry guidance.

PATCHUpdate a record

/api/core/organizations/123/events/456/leads/3898

Permission: Write access with the update action. Every request key must map to an allowed writable field; unconfigured inputs are ignored.

curl --fail-with-body --silent --show-error --globoff --max-time 30 --request PATCH \
  --url "${BRELLA_API_BASE_URL}"'/api/core/organizations/123/events/456/leads/3898' \
  --header "Accept: application/vnd.brella.v4+json" \
  --header "Brella-API-Access-Token: ${BRELLA_API_ACCESS_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "notes": "Requested pricing and a Q4 follow-up",
  "custom_fields_attributes": [
    {
      "sponsor_id": 103705,
      "question_id": 901,
      "values": [
        "Q4"
      ]
    }
  ]
}'

Response: 200 OK. Attributes come from Write-response fields; these can differ from readable fields.

View response structure
{
  "data": {
    "id": "1201",
    "type": "lead"
  }
}

Illustrative, with no additional response fields selected.

Errors: 400 for invalid parameter shapes; 403 for a missing/expired token or disallowed operation; 404 when the URL context, record or a referenced record is inaccessible; 422 for validation or business rules; 429 for rate limits. Troubleshooting and retry guidance.

PATCH changes supplied fields. Collection inputs can replace existing values; read the input notes before sending arrays.

DELETEDelete a record

/api/core/organizations/123/events/456/leads/1201

Permission: Write access with the delete action.

curl --fail-with-body --silent --show-error --globoff --max-time 30 --request DELETE \
  --url "${BRELLA_API_BASE_URL}"'/api/core/organizations/123/events/456/leads/1201' \
  --header "Accept: application/vnd.brella.v4+json" \
  --header "Brella-API-Access-Token: ${BRELLA_API_ACCESS_TOKEN}"

Response: 204 No Content, with an empty response body.

Errors: 400 for invalid parameter shapes; 403 for a missing/expired token or disallowed operation; 404 when the URL context, record or a referenced record is inaccessible; 422 for validation or business rules; 429 for rate limits. Troubleshooting and retry guidance.

Deletion can remove related data or be refused by resource constraints. Read the resource notes and confirm the target before using this operation.

Path: events/{event_id}/leads
Methods: GET collection/record, POST, PATCH, DELETE.

Fields, filters and associations

Browse 7 response fields

The scope chooses these response fields. id is always returned. Configuration names and response names can differ.

event-id
Scope field: event_id
sponsor-ids
Scope field: sponsor_ids
registrant-id
Scope field: registrant_id
created-by-registrant-id
Scope field: created_by_registrant_id
notes
Scope field: notes
created-at
Scope field: created_at
updated-at
Scope field: updated_at
  • Filters: sponsor_id, registrant_id, created_by_registrant_id, created_from, created_to, updated_from, updated_to.
  • Associations:
    • sponsors: linkage only;
    • registrant: external-id, first-name, last-name, email;
    • created_by_registrant → response created-by-registrant: external-id, first-name, last-name, email;
    • custom_fields → response custom-fields: definition-key, definition-title, field-type, values.
  • Row restriction: by the sponsors association.
GET .../leads?sponsor_id=103705&include=registrant,created-by-registrant,custom-fields

Leads without a sponsor

With no sponsor row restriction, collection and individual GET requests can return leads without a sponsor. The lead belongs to its registrant’s event and returns sponsor-ids: [] when sponsor_ids is selected in the scope’s readable fields.

Omit the sponsor_id query filter to include these leads in an event export. An enabled sponsor_id filter only returns leads owned by that sponsor. Sponsor-restricted scopes exclude leads without a sponsor from collections and return 404 for individual GET or PATCH requests targeting them.

Create and update

POST/PATCH inputs: registrant_id, created_by_registrant_id, notes, sponsor_id, custom_fields_attributes (raw JSON). The custom-field input is consumed on PATCH; lead creation does not process lead-scan answers.

To create a lead without a sponsor, use a scope with no sponsor row restriction and omit sponsor_id or send "sponsor_id": null:

{
  "registrant_id": 1201,
  "created_by_registrant_id": 1301,
  "notes": "Requested pricing information"
}

The target registrant and any supplied creator, sponsor, or lead-scan answers must belong to the URL event. Select sponsor_ids in Write-response fields to receive sponsor-ids: [] for a lead created without a sponsor.

To create a lead for a sponsor, supply sponsor_id. A scope with sponsor restrictions uses the first configured restricted sponsor when the input is omitted or null; a scope restricted to exactly one sponsor uses that sponsor. Supply an explicit allowed ID when choosing among several restricted sponsors. A sponsor outside the event or restricted set returns 404.

Omitting sponsor_id on PATCH preserves existing ownership. Sending null on PATCH returns 404; it does not remove sponsors. See the lead cookbook for ownership replacement rules and complete requests.

A sponsor-restricted scope cannot change created_by_registrant_id on PATCH. A lead created without a creator correctly returns created-by-registrant-id: null and a null relationship.

Lead-scan answers on PATCH use the configured request key for custom_fields_attributes and this raw shape:

{
  "custom_fields_attributes": [
    {
      "sponsor_id": 103705,
      "question_id": 901,
      "values": ["Q4"]
    }
  ]
}

Last updated on September 29, 2026