Skip to main content
A workload that runs on Vercel, GitHub Actions or another platform with an OIDC identity can call Mixpeek without a stored API key. The platform gives the workload a short-lived signed token. The workload trades that token at POST /v1/auth/token-exchange for a Mixpeek API key that expires in minutes, and uses that key like any other. Nothing long-lived sits in the workload’s environment variables, so there is no key to leak, rotate or revoke when a deployment or dependency is compromised.

How it works

  1. An admin adds a workload identity provider to the organization. It names the issuer, the accepted audience, and the claims a token must carry (for example a Vercel project ID and environment, or a GitHub repository).
  2. The workload gets a token from its platform and sends it, with the provider’s provider_id, to POST /v1/auth/token-exchange. No API key is needed for this call.
  3. Mixpeek checks the token’s signature against the issuer’s published keys, then its issuer, audience, expiry and every claim condition. If all hold, it returns an API key that expires after the provider’s token_ttl_seconds (5 to 60 minutes, 15 by default).
  4. The workload sends Authorization: Bearer <access_token> until expires_at, then exchanges a fresh token.
The returned key is an ordinary API key: permissions, scopes, rate limits and the audit log treat it the same way. It belongs to the admin who added the provider, it never appears in the API key list, and keys stop being issued if that admin is suspended or removed.

Add a provider

Providers live on the organization. Send the full list with PATCH /v1/organizations (admin key required). Keep each existing provider’s provider_id to preserve it; omit provider_id to add one; leave a provider out to remove it.
The response lists each provider with the provider_id your workload sends.
A provider must match at least one claim besides iss, aud, exp, iat, nbf and jti, and a bare * is refused. Otherwise any project on Vercel, or any repository on GitHub, could get a key for your organization. Pin the project ID or repository, and the environment or branch.

Exchange a token

The provider ID is not a secret; it only says which provider to check the token against. The response:
Reuse the key until shortly before expires_at rather than exchanging on every request. Exchanges are limited to 120 per provider per minute. You can ask for a shorter key with "ttl_seconds"; it is capped at the provider’s token_ttl_seconds.

Errors