Master API Key vs Scoped API Keys β€” How Opensolr API Access Control Works

Data Security
Security · API Access Control

One key rules everything. The others do exactly one job.

Every Opensolr account has a master API key with root-level access — and, since 2026, as many scoped API keys as you need, each limited to the endpoints and indexes you choose.

MASTER API KEYone per account · root levelDelete any indexReplace schema and solrconfigChange index passwordsAlso the initial HTTP passwordon every index you create.SCOPED API KEYas many as you need · least privilegeOnly the endpoints you tickOnly the indexes you chooseOptional expiry dateRevoke or regenerate any time.Nothing else on the account is affected.

The master API key — treat it as root

Every account has exactly one master key, shown in your Dashboard. It is unrestricted: it can call every endpoint of the Opensolr REST API, on every index you own.

It is also the initial index password

When Opensolr creates an index for you, the master key is set as the initial HTTP Basic Auth password on it. So whoever holds your master key can not only manage your account through the API — they can query your Solr indexes directly, until you change those credentials under Security. See also Default HTTP Auth Credentials.

Rules of thumb for the master key
  • Never paste it into client-side code, a shared repository, a CI log or a chat window.
  • Never give it to a contractor, an agency or a colleague — issue them a scoped key instead.
  • Regenerate it from the Dashboard if it may have leaked. Regenerating does not change your index HTTP credentials.
  • Rotating the master key breaks anything still using the old value — update your applications first.

Scoped API keys — least privilege by design

A scoped key is an additional API key that carries only the permissions you grant it. Everything else is refused. You create them under Account › API Keys, and you can hold as many as you need.

Per endpoint

Tick exactly what the key may call — search only, ingest only, crawler control, and so on. Anything unticked returns 403 ERROR_SCOPED_KEY_ENDPOINT_NOT_ALLOWED.

Per index

Restrict a key to a chosen subset of your indexes. Calls against any other index return 403 ERROR_SCOPED_KEY_CORE_NOT_ALLOWED. Leave it unrestricted and the key covers all of your indexes.

Expiry date

Give a contractor or a temporary integration a key that stops authenticating on a date you choose. Leave it empty for a key that never expires.

Revoke and rotate

Disable, regenerate or delete any key instantly. Your master key and every other scoped key keep working.

Typical keys people issue
The key is forEndpoints you would grantIndexes
A front-end developerembed_and_search, get_core_infoOne index
A CI / deployment pipelineingest, ingest_statusThe staging index
A RAG or AI applicationembed, embed_and_search, ai_summaryThe content index
A contractor, for two weeksWhatever the task needsTheir project index, with an expiry date

Creating a scoped key

1Open Account › API KeysIn the control panel, the Account menu contains API Keys, right below My Team. Only the account owner can manage keys.
2Name it after its jobSomething you will still understand in six months: “Search-only key for the mobile app”, “CI ingest — staging”.
3Tick only what it needsEndpoints are grouped: search and read, write data, AI and vectors, crawler control, index configuration, security. Grant the smallest set that does the job.
4Choose the indexesLeave All of my indexes ticked, or pick specific ones. A restricted key cannot touch anything else, even an index you create later.
5Set an expiry, if it is temporaryOptional. After that date the key simply stops authenticating.
6Copy the key and hand it overIt is shown in full on the page. Treat it like a password — and if it leaks, regenerate just that key.
Using a scoped key

Exactly like the master key: pass it as api_key together with your account email. Nothing else changes in your code.

curl -X POST https://api.opensolr.com/solr_manager/api/ingest \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","api_key":"YOUR_SCOPED_KEY",
       "core_name":"your_index","documents":[ ... ]}'

Rate limits and monthly quotas are counted against your account, whichever key is used — see API Usage.

Scoped keys vs Teams — machines vs people

Teams — for people

A colleague logs in with their own account. You choose which indexes they see and which actions they may perform in the control panel. They never receive a credential of yours. See Teams Management.

Scoped keys — for code

Scripts, back-end services, CI jobs and AI agents authenticate with a key, not a login. Give each system its own key so you can revoke one without disturbing the others.

Key management is reserved to the account owner. Team members cannot create, revoke or regenerate API keys, in the same way they cannot touch billing.

Stop sharing your master key

Issue a key that does exactly one job, on exactly the indexes you choose, and revoke it the day it is no longer needed.

Create a scoped keySecurity & Trust Center