This is a beta feature according to Algolia’s Terms of Service (“Beta Services”).
/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
Originheader or referrer matches an approved domain are accepted: all others receive a403.
Approved domain matching
Approved domains are matched against the request’sOrigin (or referrer) header:
| Pattern | Example | Matches |
|---|---|---|
| Exact host | myapp.example.com | https://myapp.example.com |
| Full URL | https://myapp.example.com | Matches myapp.example.com |
| Wildcard | *.example.com | Any subdomain, for example https://sub.example.com |
Add approved domains
This operation requires an API key with theeditSettings 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
- Remove one domain
- Remove several domains
Command line
Blocked requests
If a request’sOrigin header or referrer doesn’t match an approved domain, the API returns a 403 response:
JSON
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.