Source: https://datafa.st/docs/api/website/analytics/metadata
Markdown source: https://datafa.st/docs/api/website/analytics/metadata.md
Description: Return website metadata used to configure custom dashboards.

# Get metadata

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

Return website metadata used to configure custom dashboards.

## Request

### Authentication

- `df_` website API key for one website.
- `dft_` account token with `analytics:read`. Pass `websiteId` as a query parameter.


### Query parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `fields` | string | No | Controls which website metadata fields are returned. Possible values: `domain`, `timezone`, `name`, `logo`, `kpiColorScheme`, `kpi`, `currency`. Example: `fields=domain,timezone,currency`. |

## Response

Returns a JSON object with `status` and endpoint-specific fields.

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

### Errors

Common errors include `400` for invalid input, `401` for missing or invalid tokens, `403` for missing permission or suspended tracking, `404` for missing resources, and `500` for server errors.

## 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"
  }]
}
```
