Skip to content

    Authentication and access

    Create a key in the account portal. Give it only the permissions your integration needs and store it on your server.

    Send your API key

    Load the key from your secret store and send it in the Authorization header as Bearer followed by a space and the key. For a browser app, send the authenticated request from your own server. Keep the key out of client code, logs and checked-in files.

    Test the key with an account read.

    Choose scopes and roles

    A scope grants a named permission to a key. A role determines which actions the key can perform. The API can also check the key’s brand access, the account’s plan and billing access.

    • To read the account overview, send GET /v2/account with account:read.
    • To start a collection, send POST /v2/runs with workflow: collect. Use an editor, owner or service key with collections:write. The polling request uses collections:read.

    Check the access requirements for the exact variant you call. If you receive HTTP 401, check that your key is valid and that you sent the header. If you receive HTTP 403, check the scope, role, plan and billing requirements.

    Retry requests safely

    When an operation requires Idempotency-Key, generate a new value for each new write. If the first response is lost, send the same key with the same request. While the key is valid, a repeated request that was already accepted returns the original response. Sending a different body with the same key can return HTTP 409.

    When a response includes Retry-After, wait for that delay before retrying a retryable request. If you have a poll URL for a run, read that URL to check its state. See API errors for more recovery steps.

    Read the security and access overview.