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

# Get Domains

Use this API to retrieve the list of allowed domains for a workspace.

<Info>
  This endpoint uses **API-key-level auth**: pass `x-velt-api-key` and `x-velt-auth-token` as headers. You can obtain these from the [Get Auth Tokens](/api-reference/rest-apis/v2/workspace/authtokens-get) endpoint.
</Info>

# Endpoint

`POST https://api.velt.dev/v2/workspace/domains/get`

# Headers

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/security/auth-tokens).
</ParamField>

# Body

This endpoint does not require a request body.

<Note>
  The returned `allowedDomains` array contains bare domains (e.g., `"example.com"`, `"localhost"`). Protocols and `www` prefixes are stripped during storage.
</Note>

# Example Request

```JSON theme={null}
{
  "data": {}
}
```

# Example Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Allowed domains retrieved successfully.",
    "data": {
      "allowedDomains": [
        "localhost",
        "127.0.0.1",
        "example.com"
      ]
    }
  }
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "status": "PERMISSION_DENIED",
    "message": "Invalid API key."
  }
}
```

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "status": "success",
      "message": "Allowed domains retrieved successfully.",
      "data": {
        "allowedDomains": [
          "localhost",
          "127.0.0.1",
          "example.com"
        ]
      }
    }
  }
  ```
</ResponseExample>
