> ## 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.

# Get Video

> Retrieve a single video by ID.

Fetch a single video by its ID. The response includes the video's metadata, a pre-signed URL, and branding details from the associated domain. If a call-to-action (CTA) is enabled on the video, additional CTA configuration fields are included.

## Endpoint

```
GET /v1/videos/:id
```

## Authentication

Pass your API key as a Bearer token in the `Authorization` header.

<ParamField header="Authorization" type="string" required>
  Your API key. Format: `Bearer <api_key>`.
</ParamField>

## Path parameters

<ParamField path="id" type="number" required>
  The ID of the video to retrieve.
</ParamField>

## Response

<ResponseField name="data" type="object" required>
  <Expandable title="properties" defaultOpen>
    <ResponseField name="id" type="number" required>
      Unique video identifier.
    </ResponseField>

    <ResponseField name="domain_id" type="number" required>
      ID of the domain this video was generated for.
    </ResponseField>

    <ResponseField name="filename" type="string" required>
      Human-readable name of the video.
    </ResponseField>

    <ResponseField name="url" type="string" required>
      Pre-signed URL to stream or download the video file.
    </ResponseField>

    <ResponseField name="created_at" type="string" required>
      ISO 8601 timestamp when the video was created.
    </ResponseField>

    <ResponseField name="updated_at" type="string" required>
      ISO 8601 timestamp when the video was last updated.
    </ResponseField>

    <ResponseField name="organization_name" type="string">
      Your account's organization or company name. Present when available.
    </ResponseField>

    <ResponseField name="logo_url" type="string">
      Pre-signed URL for the domain's logo image. Present when a logo is configured.
    </ResponseField>

    <ResponseField name="cta_action_text" type="string">
      Button label for the CTA. Only present when `cta_enabled` is true.
    </ResponseField>

    <ResponseField name="cta_fields" type="object[]">
      Form field configuration for the CTA modal. Only present when `cta_enabled` is true and `cta_type` is `form`.
    </ResponseField>

    <ResponseField name="cta_modal_title" type="string">
      Title text for the CTA modal. Only present when `cta_enabled` is true.
    </ResponseField>

    <ResponseField name="cta_modal_description" type="string">
      Body text for the CTA modal. Only present when `cta_enabled` is true.
    </ResponseField>

    <ResponseField name="cta_use_organization_name" type="boolean">
      When `true`, the CTA displays your organization name instead of the domain's application name. Only present when `cta_enabled` is true.
    </ResponseField>

    <ResponseField name="cta_type" type="string">
      CTA type: `form` or `external_link`. Only present when `cta_enabled` is true.
    </ResponseField>

    <ResponseField name="cta_external_link" type="string">
      Destination URL for external link CTAs (e.g. a calendar booking page). Only present when `cta_enabled` is true and `cta_type` is `external_link`.
    </ResponseField>

    <ResponseField name="cta_modal_auto_open" type="boolean">
      When `true`, the CTA modal opens automatically after the video ends. Only present when `cta_enabled` is true.
    </ResponseField>

    <ResponseField name="domain_application_name" type="string">
      The application name from the domain. Only present when `cta_enabled` is true.
    </ResponseField>
  </Expandable>
</ResponseField>

## Error responses

| Status | Description                                          |
| ------ | ---------------------------------------------------- |
| `400`  | The provided `id` is not a valid number.             |
| `403`  | The video exists but belongs to a different account. |
| `404`  | No video found with the given ID.                    |

## Examples

<CodeGroup>
  ```bash curl theme={null}
  curl --request GET \
    --url https://api.demomatic.tech/v1/videos/123 \
    --header 'Authorization: Bearer YOUR_API_KEY'
  ```

  ```javascript JavaScript theme={null}
  const videoId = 123;

  const response = await fetch(`https://api.demomatic.tech/v1/videos/${videoId}`, {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
    },
  });

  const { data } = await response.json();
  console.log(data);
  ```
</CodeGroup>

### Response (no CTA)

```json 200 theme={null}
{
  "data": {
    "id": 123,
    "domain_id": 45,
    "filename": "Product Tour Q1 2024",
    "url": "https://signed-url.example.com/video.mp4",
    "created_at": "2024-01-15T10:00:00.000Z",
    "updated_at": "2024-01-15T10:05:00.000Z",
    "organization_name": "Acme Corp",
    "logo_url": "https://signed-url.example.com/logo.png"
  }
}
```

### Response (with CTA enabled)

```json 200 theme={null}
{
  "data": {
    "id": 123,
    "domain_id": 45,
    "filename": "Product Tour Q1 2024",
    "url": "https://signed-url.example.com/video.mp4",
    "created_at": "2024-01-15T10:00:00.000Z",
    "updated_at": "2024-01-15T10:05:00.000Z",
    "organization_name": "Acme Corp",
    "logo_url": "https://signed-url.example.com/logo.png",
    "cta_action_text": "Book a demo",
    "cta_fields": [
      { "key": "name", "label": "Name", "type": "text", "required": true },
      { "key": "email", "label": "Work email", "type": "email", "required": true }
    ],
    "cta_modal_title": "Interested?",
    "cta_modal_description": "Fill in your details and we'll be in touch.",
    "cta_use_organization_name": true,
    "cta_type": "form",
    "cta_external_link": null,
    "cta_modal_auto_open": false,
    "domain_application_name": "Acme App"
  }
}
```
