Source: https://datafa.st/docs/api/website/bot-traffic/settings/update
Markdown source: https://datafa.st/docs/api/website/bot-traffic/settings/update.md
Description: Update one or more Bot traffic settings for a website. Prefer incremental company and crawler fields so an agent does not overwrite exclusions it did not intend to change.

# Update Bot traffic settings

`PATCH https://datafa.st/api/v1/admin/websites/{websiteId}/bot-traffic/settings`

Update one or more Bot traffic settings for a website. Prefer incremental company and crawler fields so an agent does not overwrite exclusions it did not intend to change.

MCP equivalent: `datafast_bot_traffic_settings_update`. MCP requires `confirm: true` before verification, authentication, or ingestion changes because rejected future requests cannot be recovered.

> **Related:** [Get Bot traffic settings](/docs/api/website/bot-traffic/settings/retrieve) · [Create Bot traffic token](/docs/api/website/bot-traffic/authentication-token/create)

## Request

#### Path parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `websiteId` | string | Yes | Website ObjectId used by account tokens to choose which website to query or manage. Website ObjectId. Get it from the dashboard or the List websites API. |

#### Body parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `verifiedOnly` | boolean | No | `true` accepts only IP-verified crawlers. `false` also accepts user-agent-only matches. |
| `requireAuthToken` | boolean | No | `true` rejects requests without the website Bot traffic token. Create a token first. |
| `disableCompanies` | string[] | No | Disable every known agent for these exact company names. |
| `enableCompanies` | string[] | No | Enable every known agent for these exact company names. |
| `disableCrawlerIds` | string[] | No | Disable exact agent IDs returned by Get settings. |
| `enableCrawlerIds` | string[] | No | Enable exact agent IDs returned by Get settings. |
| `excludedCrawlerIds` | string[] | No | Replace the complete exclusion list. Do not combine with incremental enable or disable fields. |
| `hiddenCrawlers` | string[] | No | Replace crawler IDs hidden from charts only. Does not reduce ingestion or usage. |
| `hideDashboardCard` | boolean | No | Hide or show the Bot traffic dashboard card. |
| `groupBy` | string | No | `crawlers` or `pages`. |
| `pageFilterIds` | string[] | No | Replace dashboard page-filter IDs. |

Changing `hiddenCrawlers`, `hideDashboardCard`, `groupBy`, or `pageFilterIds` affects display only. Changing verification, authentication, companies, or agents affects future ingestion. Requests rejected by those settings are not stored and cannot be recovered.

## 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[].websiteId` | string | Website ObjectId used by account tokens to choose which website to query or manage. |
| `data[].domain` | string | Tracked domain. |
| `data[].settings` | object | Complete normalized settings after the update. |
| `data[].crawlerCatalog` | array | Complete company and agent catalog after the update. |

## Authentication

Requires an owner `dft_` account token with `settings:write`. Website API keys (`df_`) cannot call this endpoint.

The token must be allowed to access the website in the path, and that website must belong to the token owner.

The account must have active DataFast API access. Read [authentication and scopes](/docs/api/authentication) for token creation and permissions.

### Errors

**400** — Invalid website ID or JSON, unknown fields, invalid field types, conflicting exclusion updates, or enabling token enforcement before a token exists.

**404** — Website not found or the caller is not its owner.

**413** — Request body exceeds 8 KB.

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 PATCH "https://datafa.st/api/v1/admin/websites/{websiteId}/bot-traffic/settings" \
  -H "Authorization: Bearer dft_xxx" \
  -H "Content-Type: application/json" \
  -d '{"disableCompanies":["Meta"],"enableCrawlerIds":["OpenAI::ChatGPT-User::answer_fetch"],"verifiedOnly":true}'
```

### Success response

```json
{
  "status": "success",
  "data": [{
    "websiteId": "665f0b3c4d2e1a0012345678",
    "domain": "example.com",
    "settings": {
      "hiddenCrawlers": [],
      "excludedCrawlerIds": [
        "Meta::meta-externalagent::training"
      ],
      "verifiedOnly": true,
      "hideDashboardCard": false,
      "groupBy": "crawlers",
      "pageFilterIds": [],
      "requireAuthToken": false
    },
    "crawlerCatalog": []
  }]
}
```
