Source: https://datafa.st/docs/api/website/analytics/metadata
Markdown source: https://datafa.st/docs/api/website/analytics/metadata.md
Description: Return website configuration metadata — domain, timezone, currency, KPI goal, and branding — for building custom dashboards or apps on top of the API. See [apps built on the API](/docs/apps-built-on-api) for examples.

# Get metadata

`GET https://datafa.st/api/v1/analytics/metadata`

Return website configuration metadata — domain, timezone, currency, KPI goal, and branding — for building custom dashboards or apps on top of the API. See [apps built on the API](/docs/api/apps-built-on-api) for examples.

This endpoint has no date range or filters. It always reflects current website settings.

> **Related:** [Apps built on the API](/docs/api/apps-built-on-api)

## Request

#### Query parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `websiteId` | string | Required with dft_ | Required with a `dft_` account token on Website API routes. Omit with a `df_` website key. Example: `?websiteId=665f0b3c4d2e1a0012345678`. |
| `fields` | string | No | Metadata fields to return. Values: `domain`, `timezone`, `name`, `logo`, `kpiColorScheme`, `kpi`, `currency`. Returns all when omitted. Example: `fields=domain,timezone,currency`. |

## Response

Returns a JSON object with `status: "success"` and endpoint-specific fields in `data` (and `pagination` when the endpoint is paginated).

#### Response fields

| Field | Type | Description |
| --- | --- | --- |
| `data[].domain` | string | Tracked website domain. |
| `data[].timezone` | string | Timezone used to interpret dates and group analytics buckets. Defaults to the website timezone. Default timezone used for dashboard periods and API aggregation. |
| `data[].name` | string\|null | Human-readable name for the resource or event. The exact meaning depends on the endpoint. |
| `data[].logo` | string\|null | Logo URL when configured. |
| `data[].kpiColorScheme` | string | Color scheme used for the KPI card in the dashboard. |
| `data[].kpi` | string\|null | Goal or metric configured as the website KPI. |
| `data[].currency` | string | Currency code for money values, such as `USD` or `EUR`. |

## Authentication

- **`df_` website API key:** The website is inferred from the key. You do not need a `websiteId` query parameter.
- **`dft_` account token:** Requires `analytics:read` permission and `?websiteId=` on every request. The token must be allowed to access that website.

Read [authentication and scopes](/docs/api/authentication) for token creation, permission lists, and scoped tokens.

### Errors

**400** — Invalid `fields` value.

**404** — Website not found.

See [API errors](/docs/api#errors) for the standard error envelope, auth failures, validation errors, permission errors, and rate limits.

## Code examples

### Example request

```bash
curl -X GET "https://datafa.st/api/v1/analytics/metadata" \
  -H "Authorization: Bearer df_xxx"
```

### Success response

```json
{
  "status": "success",
  "data": [{
    "domain": "example.com",
    "timezone": "America/New_York",
    "name": "Example",
    "logo": null,
    "kpiColorScheme": "orange",
    "kpi": "signup",
    "currency": "USD"
  }]
}
```
