Type at least two letters.

    ↑ ↓ to moveEnter to open

    Authentication and scopes

    Send an API key as a Bearer token. What each scope allows and which calls only work signed in to the app.

    Updated

    Send the key

    Every call except the two public ones needs an API key in the Authorization header:

    Authorization: Bearer mev_live_...
    

    Create keys in the app under API keys; a key is shown once. See Create and manage API keys for naming, rotation and revocation.

    A missing, wrong, revoked or expired key gets:

    HTTP/1.1 401 Unauthorized
    Content-Type: application/problem+json
    
    { "code": "invalid_api_key", "detail": "The API key is not valid.", ... }
    

    A request with no key at all gets 401 with code: unauthorized.

    Scopes

    A key acts as the account that created it, limited to its scopes.

    Scope Operations
    sites:read GET /sites, GET /sites/{siteId}
    sites:write POST /sites, PATCH /sites/{siteId}, DELETE /sites/{siteId}
    audits:read POST /url-checks, GET /audit-runs, GET /audit-runs/{runId}, GET /audit-runs/{runId}/observations
    audits:write POST /audit-runs
    any valid key GET /problem-reports, POST /problem-reports
    no key GET /openapi.json, GET /rules

    A call outside the key’s scopes gets 403 with code: insufficient_scope; detail names the scope it needs. The scope of every operation is also on its reference page.

    App session only

    Key management is never possible with a key. GET /api-keys, POST /api-keys and DELETE /api-keys/{keyId} work only from the app, signed in. Account settings, password and two-step sign-in are not part of the API at all.

    Tenancy

    Every request is bound to the key’s account. An id that belongs to another account answers 404 not_found, exactly like an id that does not exist, so ids reveal nothing.

    Keep keys safe

    • Keep a key in a secret store or an environment variable, never in code, a URL or a log.
    • One key per use. Then you can revoke one without breaking the others, and Last used tells you which one is active.
    • Give the fewest scopes that work.
    • If a key leaks, revoke it in the app at once and create a new one.