Skip to main content
Use approved domains to restrict which origins can call an agent’s /completions endpoint. Each agent has a list of approved domains.
  • If the approved domains list is empty, requests from any origin are accepted.
  • If the approved domains list has entries, only requests whose Origin header or referrer matches an approved domain are accepted: all others receive a 403.

Approved domain matching

Approved domains are matched against the request’s Origin (or referrer) header: Matching is case-insensitive. An empty approved domains list stops the check for that agent.

Add approved domains

This operation requires an API key with the editSettings ACL. For example, to add a domain to an agent’s approved list:
Command line

Add multiple domains

For example:
Command line
The API skips duplicates for the same agent.

List approved domains

Command line

Response

JSON

Remove approved domains

Command line

Blocked requests

If a request’s Origin header or referrer doesn’t match an approved domain, the API returns a 403 response:
JSON
If the approved domains list has entries, requests without an Origin header or referrer are also blocked.
If you’re using the Algolia dashboard’s Agent Studio playground, add the dashboard domain (https://dashboard.algolia.com/) to the approved list. Otherwise, playground requests are blocked.

See also

Last modified on July 9, 2026