Returns all CTA form submissions collected across every video in the specified domain, sorted from newest to oldest.
This endpoint aggregates leads from all videos in the domain. To retrieve leads for a single video, use GET /v1/videos/:id/leads.
Endpoint
GET /v1/domains/:domain_id/leads
Authentication
Bearer token. Pass your API key: Authorization: Bearer <api_key>
Path parameters
The numeric ID of the domain. Retrieve domain IDs from GET /v1/domains.
Response
Array of lead objects ordered most-recent-first.
Unique identifier for the lead submission.
ID of the video the lead was submitted from.
Key-value pairs captured from the CTA form. The exact fields depend on your domain’s CTA configuration.
ISO 8601 timestamp of when the form was submitted.
Internal name of the video the lead came from.
Error responses
| Status | Condition |
|---|
400 Bad Request | domain_id is not a valid number. |
404 Not Found | Domain does not exist or does not belong to your account. |
Example
curl --request GET \
--url https://api.demomatic.tech/v1/domains/45/leads \
--header "Authorization: Bearer YOUR_API_KEY"
Response
{
"data": {
"leads": [
{
"id": 101,
"video_id": 7,
"response_data": {
"name": "Bob Jones",
"email": "bob@example.com",
"company": "Widgets Inc"
},
"submitted_at": "2024-01-20T14:22:00.000Z",
"internal_name": "Feature Demo - Jan 2024"
}
]
}
}