For AI agents: this page is also available as Markdown at /docs/access-control.md. Every docs page is: add .md to its URL. llms.txt lists them all.

API keys, roles and rate limits

Every request to WarpSearch is authenticated with an API key, including requests to the compatible endpoints. There is no anonymous access. The key's role decides what the request may do.

Authenticate

Send the key as a bearer token:

curl https://api.warpsearch.io/v1/collections \
  -H "Authorization: Bearer $WARPSEARCH_API_KEY"

Keys look like ws_.... The same key works on /v1, on the Elasticsearch, OpenSearch and Solr compatible endpoints, and on the MCP server at /mcp. For clients that cannot set a bearer header, the key is also accepted as X-API-Key: <key>, as Authorization: ApiKey <key>, or as the password of HTTP Basic with username apikey or an empty username. Other usernames must match the actor associated with the key.

Keep keys out of source control and browser code. Anyone holding a key has its role.

Missing or invalid credentials answer 401. Repeated failures from one address are throttled with 429 too_many_auth_failures, so a script with a wrong key should stop rather than retry in a tight loop.

Roles

Each key has one of four roles, and so does each member of your organization.

Role Can do
viewer List and describe collections, search, count, translate, get a document by id, read usage.
writer Everything a viewer can, plus index, replace and delete documents, and refresh.
editor Everything a writer can, plus create collections, change their schemas, description, labels and metadata, and force merge.
admin Everything an editor can, plus delete collections, and manage members and every API key.

A refused call answers 403 forbidden, and the message names the role you needed, for example that the key lacks the admin role on a collection.

Give each key the lowest role that works: viewer for a search service, writer for a loader, editor for a provisioning script that creates collections and changes schemas, and admin only for the people who delete collections and manage the team.

Create and revoke keys

Create keys in the console under API keys:

  1. Create a key, give it a descriptive name (for example ci-loader) and pick a role.
  2. Copy the secret. It is shown once and cannot be retrieved later.
  3. To revoke, delete the key in the same place. Revocation takes effect within a few minutes everywhere.

How keys behave:

Agents get keys through a consent flow instead of copy and paste: the agent registers, you approve in the console and choose the role, and the key is created in your name. See Guide for AI agents.

Members and invitations

Admins invite people by email from the console and choose a role. The person accepts the invitation by link, and may belong to several organizations. Removing a member also revokes their keys in your organization.

Not supported: single sign-on with your own identity provider.

Visibility

A collection you hold no role on does not exist as far as your key can tell. It is absent from listings, and every route answers 404 exactly as it does for a name that was never created. A collection you can see but cannot use for the request answers 403 with the role you need.

GET /v1/auth/me shows who the key belongs to, its role on each visible collection, its permissions and its effective rate limit. Call it first when a request is refused, or at startup to learn what a client may do.

Rate limits

Requests are limited by a token bucket per organization, based on your plan, and your plan also sets how many requests may run at the same time. Document writes and deletes (on /v1 and on the compatible endpoints) are exempt from these two plan limits; a rate limit set on an individual member, agent or key still applies to them. A request over a limit answers 429 with a Retry-After header:

Code Meaning
rate_limited You exceeded your requests per second. Retry after Retry-After.
too_many_concurrent_requests Too many requests are in flight at once. Retry in a moment.
too_many_auth_failures Too many failed authentications from your address.

Responses carry rate limit headers, so a client can slow down before it is refused:

Header Meaning
RateLimit-Limit The bucket size (burst): how many requests you can send at once.
RateLimit-Remaining Requests left in the bucket right now.
RateLimit-Reset Seconds until the bucket is full again.

The same values are also sent as X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset, for clients that look for those names. When several limits apply (organization, user or agent, key), the headers report the tightest one. The limits depend on your plan: see Pricing for the free tier and /pricing for paid plans.

To stay within the limits:

A plan can count the limit per client address instead of per organization, which matters when many end users share one key. GET /v1/auth/me reports the effective limit.

Usage and plan

GET /v1/usage returns your plan, how many collections you have against the limit, and stored documents and bytes. The call needs a key with permission to view usage; the console shows the same numbers. For the limits themselves, see Limits and errors.

Good practice

View this page as Markdown

Cookie settings

Optional tracking stays off until you choose it. Your choice applies to this browser for 180 days. Read the details.

Essential storage keeps you signed in, protects forms, and remembers this choice. It is always available.