> ## Documentation Index
> Fetch the complete documentation index at: https://docs.demomatic.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Leads

> View and export form submissions captured from your demo video CTAs.

Leads are form submissions from viewers who filled in the CTA on one of your demo videos. Each lead captures the submitted field values along with which video it came from and when it was submitted.

<Note>
  Leads are only generated when `cta_type` is `form`. External link CTAs do not produce leads. To configure your CTA, see the [CTA setup guide](/guides/cta-setup).
</Note>

## Lead fields

<ResponseField name="id" type="number">
  Unique identifier for the lead.
</ResponseField>

<ResponseField name="video_id" type="number">
  The ID of the video the lead was submitted from.
</ResponseField>

<ResponseField name="response_data" type="object">
  An object containing the submitted form values, keyed by field name (for example, `name`, `email`, `company`). The exact keys depend on the fields you configured for your CTA form.
</ResponseField>

<ResponseField name="submitted_at" type="string">
  ISO 8601 timestamp of when the form was submitted.
</ResponseField>

<ResponseField name="internal_name" type="string">
  The internal name of the video the lead came from.
</ResponseField>

## Retrieving leads

Leads are always returned in reverse chronological order (most recent first).

<Tabs>
  <Tab title="Per video">
    Fetch all leads submitted on a specific video. Requires authentication.

    ```http theme={null}
    GET /videos/:video_id/leads
    ```
  </Tab>

  <Tab title="Per domain">
    Fetch all leads across every video in a domain. Requires authentication.

    ```http theme={null}
    GET /domains/:id/leads
    ```
  </Tab>

  <Tab title="API key">
    Fetch leads programmatically using an API key instead of a user session.

    ```http theme={null}
    GET /v1/videos/:id/leads
    GET /v1/domains/:domain_id/leads
    ```

    See [API keys](/guides/api-keys) for authentication details.
  </Tab>
</Tabs>

## Response format

All leads endpoints return the same structure:

```json theme={null}
{
  "data": {
    "leads": [
      {
        "id": 42,
        "video_id": 7,
        "response_data": {
          "name": "Alice Smith",
          "email": "alice@example.com",
          "company": "Acme Corp"
        },
        "submitted_at": "2024-01-15T10:30:00.000Z",
        "internal_name": "Product Tour - Q1 2024"
      }
    ]
  }
}
```

<Tip>
  The keys inside `response_data` match the field names you defined when setting up your CTA form. To add or change form fields, visit the [CTA setup guide](/guides/cta-setup).
</Tip>
