For the complete documentation index, see llms.txt. This page is also available as Markdown.

Authorization

API Token vs Agent Token — what each is for, where to get it, and how to pass it in requests.

How authentication works

Every request to the SeaLights Public API must include a Bearer token in the Authorization header:

Authorization: Bearer <your-token>

There is no session management or cookie-based auth. Each request is authenticated independently.

Two token types

The API uses two distinct token types. Each endpoint in the API reference states which one it requires.

API Token

Used by the vast majority of endpoints — anything that reads or writes data in the SeaLights platform from an external system or script.

When to use: Querying builds, coverage data, reports, TIA recommendations, app settings, audit logs.

How to get one:

  1. In the SeaLights UI, click the gear icon → Settings

  2. Left sidebar: Integration → API Tokens

  3. Click Create token, give it a descriptive name

  4. Copy the token — it is shown only once

In requests:


Agent Token

Used by a small number of endpoints that are called directly by SeaLights agents running in your CI/CD pipeline — for example, opening a test session, registering an integration build, or retrieving exclude-tests lists.

When to use: Integration build endpoints, test session endpoints, getting the agent default version.

If you are calling an API from a script or external tool (not from a SeaLights agent), you almost certainly need an API Token, not an Agent Token.

How to get one:

  1. In the SeaLights UI, click the gear icon → Settings

  2. Left sidebar: Cockpit & Onboarding → Agent Tokens

  3. Click Create token, give it a descriptive name

  4. Copy the token — it is shown only once

In requests:


Which token does each endpoint use?

The API reference marks each endpoint. As a general guide:

Endpoint group
Token type

Apps, branches, builds, coverage, reports

API Token

Audit logs, live labs, settings, code domains

API Token

TIA recommendations (read)

API Token

Agent default version

Agent Token

Integration builds

Agent Token

Test sessions (open, close, exclude-tests)

Agent Token


Security recommendations

  • Use separate tokens for separate systems — one per CI pipeline, one per script, not one shared across everything

  • Rotate tokens periodically via Settings → Tokens

  • If a token is compromised, delete it immediately in the SeaLights UI and create a replacement

Last updated

Was this helpful?