Authorization: Bearer, and every request on namespace data carries the namespace id in X-Namespace. Keys belong to your organization and are owned by a user. A key’s permissions decide what it may do, its scopes decide which resources it may touch, and a key with a principal_id acts for one end-user of your app, so each user sees only their own documents. Namespaces isolate data: every query filters on the namespace, and each namespace has its own vector store namespace.
Check a key
GET /v1/me works for any valid key and tells you which organization it belongs to and what it can do. Run it as the first step of every CI job so a key pointed at the wrong organization fails loudly instead of writing data somewhere you did not intend.
Response
rate_limits holds the key’s effective per-minute limits by category; principal_scoped is true for an end-user key.
Create an API key
Managing keys needs a key withadmin. Your organization ships with a protected admin-key, which cannot be updated, rotated or deleted because Studio depends on it; use it to mint scoped keys. POST /v1/organizations/users/{user_email}/api-keys creates a key owned by that user.
cURL
key (mxp_sk_, 60 characters) once. It is stored as a SHA-256 hash and can never be read back; store it immediately. The response also has key_id (used for usage lookups), key_prefix (the first 10 characters, safe to display) and name (used in update, rotate and revoke calls).
Permissions
Each level implies the ones below it:admin includes delete, which includes write, which includes read. A route declares the minimum level it needs.
Scopes
A scope is{ resource_type, resource_id, operations }. resource_id is a literal id, *, or a prefix pattern such as ns_customer_*. operations narrows what the key may do inside the scope; omit it to allow everything the key’s permissions grant.
A key with collection scopes runs a retriever only on collections it may read; naming another returns 403 with error_code: "insufficient_scope". Inside the run, stages that look up other documents (document_enrich, traverse_edge, cross_compare, taxonomy lookups, agentic example lookups) also read only those collections, and a lineage walk that leaves them drops the hit as ancestor_unreadable. Such a key neither reads nor writes the retriever result cache.
resource_type and operations values
resource_type and operations values
resource_type: organization, user, api_key, namespace, collection, bucket, retriever, cluster, taxonomy, storage_connection, alert, annotation, secret, webhook.operations: read_data, write_data, delete_data, execute_retriever, create_retriever, delete_retriever, execute_job, cancel_job, create_cluster, delete_cluster, modify_cluster, modify_infrastructure, manage_permissions.Common sets: read-only ["read_data", "execute_retriever"]; data engineer ["read_data", "write_data", "execute_job"].Browser keys and CORS
allowed_origins takes exact origins (https://app.yourcompany.com) or wildcard subdomains (https://*.yourcompany.com). A browser request whose Origin does not match returns 403; requests with no Origin header (server code and SDKs) are unaffected. An empty list clears the restriction, and the list survives rotation. A stolen key used outside a browser can omit Origin, so pair the allowlist with narrow permissions and scopes, and treat any key in a browser as public.
Key types
Rotate, expire and revoke
- Rotate:
POST /v1/organizations/users/{user_email}/api-keys/{key_name}/rotatereturns a new plaintextkeyand revokes the old secret at once.key_idand settings carry over. - Revoke:
DELETE /v1/organizations/users/{user_email}/api-keys/{key_name}setsstatustorevoked, keeps the record for audit, and cannot be undone. It is refused when a live published app embeds the key or the key authenticated in the last 7 days;?force=trueoverrides.
status is active, revoked or expired; last_used_at finds stale keys. List a user’s keys with GET /v1/organizations/users/{user_email}/api-keys (?include_revoked=true adds revoked ones). Per-key traffic and spend for the last 7 days (or start and end) come from GET /v1/organizations/api-keys/{key_id}/usage, and a per-endpoint breakdown from .../usage/endpoints. Studio’s Settings > API Keys does all of this without the API.
Call Mixpeek from CI without a stored key
A workload on Vercel, GitHub Actions or another OIDC platform can trade its platform’s short-lived token for a Mixpeek key that expires in minutes, so no long-lived key sits in its environment.1
Add a workload identity provider
An admin sends the full provider list with
PATCH /v1/organizations. Keep each existing provider_id to preserve it; omit it to add one; leave a provider out to remove it.cURL
2
Exchange the platform token
GitHub Actions step
getVercelOidcToken() from @vercel/oidc and POST the same body. The response has access_token, expires_in, expires_at, key_id and permissions.
The issued key behaves like any API key, belongs to the admin who added the provider, does not appear in key lists, and stops being issued if that admin is removed. Exchanges are limited to 120 per provider per minute, so reuse a key until shortly before
expires_at. Errors are 401 (workload_identity_unknown_provider, _invalid_signature, _wrong_issuer, _wrong_audience, _token_expired) or 403 (_claim_mismatch with details.claim, _claim_missing, _provider_disabled).
Per-user document permissions
Two opt-in, fail-closed ways restrict which documents an end-user sees. Both are enforced in the API at retrieval time, so a client cannot widen its own view, and both apply only to traffic through the Mixpeek API.Document ACL
Create an end-user key by settingprincipal_id (your stable user id; avoid emails) on key create. Documents that key creates get _internal._acl set to owner and read and write lists holding that principal, with public: false. Every read with the key (retriever runs, listings, searches) is filtered to documents whose read list contains the principal or that are public. Updates and deletes check the write list and return 403 otherwise. mxp_sk_ keys bypass ACL; keep them on your backend.
cURL
{"public": true}.
External authorization with OpenFGA
Mixpeek asks your OpenFGA what the acting user can see and filters results to match. The acting subject is the end-user key’sprincipal_id, as user:<principal_id>. Model each Mixpeek document as document:<document_id> with a viewer relation; user:* marks a public document. Opt a namespace in:
cURL
If OpenFGA is unreachable, queries return fewer results, never unauthorized ones. With authorization on, the retriever result cache is bypassed.
Organization secrets and your own LLM keys
Organization secrets are named, encrypted values (Fernet at rest) such as third-party API keys. The API never returns a value; listing returns names only.cURL
${{ secrets.NAME }} in a storage connection’s config, an alert’s notification_config, a webhook’s channels or a bucket sync’s connection; apply fills in the value. In a retriever, apply keeps it as a reference ({{secrets.NAME}}) that the stage resolves on each run, so the key is never stored on the retriever. A reference in any other field is refused, because those fields are readable by any read key. The secret must exist before you apply; the manifest validate call lists missing ones. An export writes credentials back out as ${{ secrets.NAME }} placeholders.
Bring your own LLM key (BYOK). Run LLM calls on your OpenAI, Anthropic or Google account for your own billing, rate limits and compliance. Store the key as a secret, then make it the organization default for that provider:
cURL
default_llm_credentials are secret names, not keys. The default applies to every LLM operation: extractors, retriever stages, clustering, taxonomy inference and manifest generation. Studio offers the same through Use as default LLM key when you create a secret. To use a different key on one stage, extractor or cluster, set "api_key": "{{secrets.NAME}}" in its parameters. Mixpeek resolves credentials in this order: the resource’s own api_key, then the organization default, then Mixpeek’s platform keys (billed to your Mixpeek account). Keys are decrypted per call and never shared between organizations.
Audit log
Audited writes record who changed what. Read them withGET /v1/organizations/audit/logs (filter by resource_id), one entry with GET /v1/organizations/audit/logs/{audit_id}, or everything as NDJSON from GET /v1/organizations/audit/logs/export. API key lifecycle events appear as api_key_created, api_key_rotated, api_key_revoked and api_key_scope_updated.
Send X-Change-Reason on any audited write to record why; it comes back as reason on every audit event the request writes. The value is trimmed, stripped of control characters and capped at 1,000 characters. The header is read for the whole request, so it is not listed on any endpoint in the API reference.
A dedicated deployment rolls out separately from the shared API, so before building a compliance report on
reason or changes, make one write with the header against the host you use and read the entry back.
Network access
If Studio loads a blank page, hangs at sign-in, or shows no thumbnails behind a corporate proxy, the network is blocking requests. Allow outbound HTTPS on port 443, includingwss://, from the browser to:
Allowing only
*.mixpeek.com lets Studio sign in with blank media. Google Drive sync also needs drive.googleapis.com and www.googleapis.com; with your own object storage, allow your bucket’s host. Optional: *.posthog.com (analytics), *.intercom.io and *.intercomcdn.com (support chat), *.ingest.us.sentry.io (error reports), *.cloudflareinsights.com (performance). A TLS-inspecting proxy must present a certificate the browser trusts. To confirm a block, check the browser’s Network tab for net::ERR_BLOCKED_BY_CLIENT, CSP violations or proxy pages on api.mixpeek.com, and compare off the corporate network.
Related
- Limits and billing: rate limits and quotas per plan and key
- Monitoring and troubleshooting: 401 and 403 errors
- Namespaces: the isolation boundary
- Customer-hosted Mixpeek: Kubernetes permissions for running in your cloud
- Create API key in the API reference

