Skip to main content
Orwel uses two kinds of keys, with different jobs:
The production API key cannot read anything. Calls to /api/v1 or /mcp with the production or development key are rejected. To read data, create an API key.

Sending data (production API key)

The SDK sends the production API key in the X-Orwel-Key header to the ingest endpoints (/ingest, /ingest/batch, /visitor-resolve). You find it in Settings, API keys in the dashboard, and in the install guide at orwel.io/install.

Reading data (API keys)

API keys are optional. You only need one to build on Orwel: pull leads into your own dashboard, sync them to a warehouse, or connect an AI agent through MCP.

Create a key

1

Open Settings, API keys

In the Orwel dashboard, go to Settings and open API keys.
2

Name it and pick scopes

Give the key a name you will recognize later (for example “Sales agent” or “Warehouse sync”) and select only the scopes it needs.
3

Choose where it can be used

Add the allowed origins of the browser app that will call the API, or choose server only.
4

Copy it once

The full key (orwel_sk_...) is shown only once. Store it in an environment variable or a secret manager.

Scopes

A request outside the key’s scopes gets 403 insufficient_scope, and the message names the missing scope. Each page of the API Reference says which scope it needs.

Allowed origins or server only

  • Allowed origins: the key only answers browser requests whose Origin is in the list (for example https://app.yourcompany.com). Any other site gets 403.
  • Server only: the key has no origins and is rejected from any browser (403 origin_not_allowed). Use it from a backend, a cron job or an agent.
Requests without an Origin header (a backend, curl, an MCP client) work with either kind of key.
Origins stop other websites from using your key in a browser. They do not stop a server or curl, because those can send any Origin. If a key leaks, rotate it. That is why each key should carry the minimum scopes it needs.

Send the key

Send the API key as a Bearer token (the x-api-key header also works):

Rotate or revoke

Each key in Settings, API keys shows when it was last used. Revoke a key there and it stops working immediately. To rotate without downtime, create the new key, deploy it, then revoke the old one.

Errors

401 Unauthorized

The key is missing, mistyped, revoked, or it is a public or development key used against the API.

403 Forbidden

The key is valid but not allowed for this request:
Keys can also expire: when you create one you can pick 30, 90 or 365 days, or no expiration. An expired key gets 401 with the message This API key has expired.

Best practices

orwel_sk_ keys read customer data. Keep them in environment variables or a secret manager, never in a public repository, and only in a browser app when the key has allowed origins.
A warehouse sync needs leads:read, not leads:write. An agent that only answers questions does not need lists:write. Separate keys also make the “last used” column meaningful.
If a key may have leaked, revoke it right away. The production API key in your site is not a secret and does not need rotation.

Next steps

API Reference

Endpoints you can call with an API key.

MCP for agents

Connect Claude, Cursor or any MCP client to your workspace.