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

# List Domains

> Retrieve all domains associated with your Demomatic account.

Returns all domains on your account. Use the `id` from each domain when generating videos via `POST /v1/videos/:domain_id`.

## Endpoint

```
GET /v1/domains
```

## Authentication

<ParamField header="Authorization" type="string" required>
  Bearer token. Pass your API key: `Authorization: Bearer <api_key>`
</ParamField>

## Response

<ResponseField name="data" type="object" required>
  <Expandable title="properties" defaultOpen>
    <ResponseField name="domains" type="object[]" required>
      Array of domain objects.

      <Expandable title="domain properties">
        <ResponseField name="id" type="number" required>
          Unique domain identifier. Use this value as the `domain_id` path parameter when generating videos.
        </ResponseField>

        <ResponseField name="application_name" type="string" required>
          Display name of the application associated with this domain.
        </ResponseField>

        <ResponseField name="url" type="string" required>
          The base URL of the application.
        </ResponseField>

        <ResponseField name="description" type="string">
          Optional description of the application.
        </ResponseField>

        <ResponseField name="primary_color" type="string">
          Primary brand color as a hex string (e.g. `#4F46E5`).
        </ResponseField>

        <ResponseField name="secondary_color" type="string">
          Secondary brand color as a hex string.
        </ResponseField>

        <ResponseField name="framework" type="string">
          Detected frontend framework (e.g. `React`, `Vue`).
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

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

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.demomatic.tech/v1/domains", {
    headers: {
      Authorization: "Bearer YOUR_API_KEY",
    },
  });

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

### Response

```json 200 theme={null}
{
  "data": {
    "domains": [
      {
        "id": 45,
        "application_name": "My SaaS App",
        "url": "https://app.mycompany.com",
        "description": "Main product application",
        "primary_color": "#4F46E5",
        "secondary_color": "#818CF8",
        "framework": "React"
      }
    ]
  }
}
```

<Tip>
  Pass a domain's `id` as the `domain_id` path parameter when generating a new video with `POST /v1/videos/:domain_id`.
</Tip>
