Archive API docs
    Jump to

    Narrow by kind with a prefix — q: queries, m: mutations, t: types, g: guides, f: fields and arguments.

    Authentication

    Send an API token in the Authorization header on every request to /api/v2. For workspace-scoped operations, also send the workspace UUID in WORKSPACE-ID.

    http
    Authorization: Bearer <your-token>
    WORKSPACE-ID: <workspace-uuid>

    The scheme name is case-insensitive, so bearer works as well as Bearer.

    Use the workspaces query to find a workspace UUID; see the Workspaces guide. Here is a complete request with both headers:

    query.graphql
    query WorkspaceDefault {
      workspace {
        id
        name
      }
    }
    Headers
    Authorization: Bearer docs_demo_token_0000000000000000000000
    WORKSPACE-ID: 6ccefa76-e8ba-5ab0-9c60-e48a9e235a4a

    Creating a token

    Create a token from the Integration tab in the Archive app.

    • If your workspace belongs to an organization, the token works across every workspace in the organization. Select the workspace per request with the WORKSPACE-ID header.
    • Otherwise, the token is scoped to the single workspace it was issued for.

    The full token is displayed only once, when you create it. Archive stores a hash and the last four characters. You can identify a token by those four characters later, but you can’t retrieve the full value again. Store it in a secret manager as soon as you create it.

    Rotating and disabling tokens

    Creating a replacement token in the Integration tab rotates the credential. The new token takes effect immediately, and the old one stops working. Update every integration that uses the old token. Requests using the old token fail with HTTP 401 and {"errors":"Missing or invalid authentication token"}. An unrecognized token gets the same response. Every 401 carries a WWW-Authenticate: Bearer header.

    Pausing disables access without replacing the token. Requests using a paused token return HTTP 401 and the body {"errors":"Account is disabled"}. If you rotate a paused token, the replacement is issued paused too. Re-enable it before use.

    Token security

    • Keep tokens server-side. Never ship a token to a browser, mobile app, or any other client you distribute to users.
    • Store tokens in environment variables or a secret manager, not in source control.
    • Rotate tokens if you suspect exposure. Rotation takes effect immediately and doesn’t require contacting support.
    • Identify tokens by their last four characters. The Integration tab shows the last four characters of each token, so you can tell which one to rotate without exposing the full value.

    For agent setup, see Connect to MCP. For authentication failures, see the Errors guide.