Skip to main content
PATCH
Update an access policy
0 credits Requires access_policies:write permission. See the guide for examples and usage.

Authorizations

Authorization
string
header
required

Send Authorization: Bearer <API_KEY>. Keys have full access unless restricted to scopes.

Path Parameters

policy_id
string
required

Access policy ID. Pass it in policies on any request.

Example:

"pol_3f9c2a7e5b8d4c1f9a6e0b2d7c4f8a1e"

Body

application/json
name
string

A name to recognize this policy.

Minimum string length: 1
Example:

"Research sources"

allowed_domains
string[]

Only these domains and their subdomains can be accessed. Send this or blocked_domains.

Example:
blocked_domains
string[]

These domains and their subdomains can't be accessed. Send this or allowed_domains.

Example:
applies_to
enum<string>

request applies when listed in policies. api_keys applies to every request made with api_key_ids. organization applies to every request.

Available options:
request,
api_keys,
organization
api_key_ids
string[]

API key IDs to apply this policy to. Required when applies_to is api_keys.

Example:

Response

Updated access policy

id
string
required

Access policy ID. Pass it in policies on any request.

Example:

"pol_3f9c2a7e5b8d4c1f9a6e0b2d7c4f8a1e"

name
string
required

A name to recognize this policy.

Minimum string length: 1
Example:

"Research sources"

allowed_domains
string[] | null
required

Only these domains and their subdomains can be accessed. Null for a blocklist.

Example:
blocked_domains
string[] | null
required

These domains and their subdomains can't be accessed. Null for an allowlist.

Example:

null

applies_to
enum<string>
required

request applies when listed in policies. api_keys applies to every request made with api_key_ids. organization applies to every request.

Available options:
request,
api_keys,
organization
api_key_ids
string[] | null
required

API keys this policy applies to. Null unless applies_to is api_keys.

Example:

null

created_at
string<date-time>
required

When the policy was created.

Example:

"2026-10-27T18:00:00.000Z"

updated_at
string<date-time>
required

When the policy was last changed.

Example:

"2026-10-27T18:00:00.000Z"

request_id
string<uuid>
required

Unique ID of this request, also in X-Request-Id. Include it when contacting support.

Example:

"3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91"

key_metadata
object

Credits this request used and your remaining balance.