{
"id": "pol_3f9c2a7e5b8d4c1f9a6e0b2d7c4f8a1e",
"name": "Research sources",
"allowed_domains": [
"arxiv.org",
"*.gov"
],
"blocked_domains": null,
"applies_to": "request",
"api_key_ids": null,
"created_at": "2026-10-27T18:00:00.000Z",
"updated_at": "2026-10-27T18:00:00.000Z",
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"error_data": {
"is_authenticated": true,
"should_retry": false,
"retry_condition": "sufficient_credits",
"info_url": "https://context.dev/dashboard/subscription",
"credits_remaining": 1,
"credits_required": 1,
"is_credits_required_estimated": true,
"credits_charged": 1,
"next_refill_at": "2023-11-07T05:31:56Z",
"next_refill_credits": 123
},
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"error_data": {
"is_authenticated": true,
"should_retry": false,
"retry_condition": "sufficient_credits",
"info_url": "https://context.dev/dashboard/subscription",
"credits_remaining": 1,
"credits_required": 1,
"is_credits_required_estimated": true,
"credits_charged": 1,
"next_refill_at": "2023-11-07T05:31:56Z",
"next_refill_credits": 123
},
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"error_data": {
"is_authenticated": true,
"should_retry": false,
"retry_condition": "sufficient_credits",
"info_url": "https://context.dev/dashboard/subscription",
"credits_remaining": 1,
"credits_required": 1,
"is_credits_required_estimated": true,
"credits_charged": 1,
"next_refill_at": "2023-11-07T05:31:56Z",
"next_refill_credits": 123
},
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"message": "<string>",
"error_code": "RATE_LIMITED",
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"error_data": {
"is_authenticated": true,
"limit_type": "concurrency",
"limit": 1,
"remaining": 1,
"retry_after_seconds": 1,
"credits_charged": 0,
"should_retry": false,
"retry_condition": "available_concurrency",
"recovery_options": [
"wait_for_in_flight_requests"
],
"info_url": "https://context.dev/dashboard/subscription",
"credits_remaining": 1
},
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}Create an access policy
Create a list of domains your requests can or can’t access.
{
"id": "pol_3f9c2a7e5b8d4c1f9a6e0b2d7c4f8a1e",
"name": "Research sources",
"allowed_domains": [
"arxiv.org",
"*.gov"
],
"blocked_domains": null,
"applies_to": "request",
"api_key_ids": null,
"created_at": "2026-10-27T18:00:00.000Z",
"updated_at": "2026-10-27T18:00:00.000Z",
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"error_data": {
"is_authenticated": true,
"should_retry": false,
"retry_condition": "sufficient_credits",
"info_url": "https://context.dev/dashboard/subscription",
"credits_remaining": 1,
"credits_required": 1,
"is_credits_required_estimated": true,
"credits_charged": 1,
"next_refill_at": "2023-11-07T05:31:56Z",
"next_refill_credits": 123
},
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"error_data": {
"is_authenticated": true,
"should_retry": false,
"retry_condition": "sufficient_credits",
"info_url": "https://context.dev/dashboard/subscription",
"credits_remaining": 1,
"credits_required": 1,
"is_credits_required_estimated": true,
"credits_charged": 1,
"next_refill_at": "2023-11-07T05:31:56Z",
"next_refill_credits": 123
},
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"message": "<string>",
"error_code": "PROFILE_NOT_FOUND",
"error_data": {
"is_authenticated": true,
"should_retry": false,
"retry_condition": "sufficient_credits",
"info_url": "https://context.dev/dashboard/subscription",
"credits_remaining": 1,
"credits_required": 1,
"is_credits_required_estimated": true,
"credits_charged": 1,
"next_refill_at": "2023-11-07T05:31:56Z",
"next_refill_credits": 123
},
"required_permission": "logs:read",
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}{
"message": "<string>",
"error_code": "RATE_LIMITED",
"request_id": "3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91",
"error_data": {
"is_authenticated": true,
"limit_type": "concurrency",
"limit": 1,
"remaining": 1,
"retry_after_seconds": 1,
"credits_charged": 0,
"should_retry": false,
"retry_condition": "available_concurrency",
"recovery_options": [
"wait_for_in_flight_requests"
],
"info_url": "https://context.dev/dashboard/subscription",
"credits_remaining": 1
},
"key_metadata": {
"credits_consumed": 123,
"credits_remaining": 123
}
}access_policies:write permission. See the guide for examples and usage.Authorizations
Send Authorization: Bearer <API_KEY>. Keys have full access unless restricted to scopes.
Body
A name to recognize this policy.
1"Research sources"
Only these domains and their subdomains can be accessed. Send this or blocked_domains.
["arxiv.org", "*.gov"]
These domains and their subdomains can't be accessed. Send this or allowed_domains.
["facebook.com", "tiktok.com"]
request applies when listed in policies. api_keys applies to every request made with api_key_ids. organization applies to every request.
request, api_keys, organization API key IDs to apply this policy to. Required when applies_to is api_keys.
[
"ctxt_keyid_4b7e2f9a1c8d4e6fa3b5c7d9e1f20a4b"
]
Response
Access policy created
Access policy ID. Pass it in policies on any request.
"pol_3f9c2a7e5b8d4c1f9a6e0b2d7c4f8a1e"
A name to recognize this policy.
1"Research sources"
Only these domains and their subdomains can be accessed. Null for a blocklist.
["arxiv.org", "*.gov"]
These domains and their subdomains can't be accessed. Null for an allowlist.
null
request applies when listed in policies. api_keys applies to every request made with api_key_ids. organization applies to every request.
request, api_keys, organization API keys this policy applies to. Null unless applies_to is api_keys.
null
When the policy was created.
"2026-10-27T18:00:00.000Z"
When the policy was last changed.
"2026-10-27T18:00:00.000Z"
Unique ID of this request, also in X-Request-Id. Include it when contacting support.
"3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91"
Credits this request used and your remaining balance.
Show child attributes
Show child attributes
Was this page helpful?