Authentication
How to authenticate with TrigRun — email verification, roles, API tokens, and workspace switching.
TrigRun supports two authentication methods. Both use the Authorization: Bearer <token> header.
Signup and email verification
New accounts require email verification before you can create jobs, secrets, or other resources. You can browse the dashboard immediately, but write actions are blocked until you verify.
Sign up:
Returns 202 Accepted:
Check your inbox for a verification link. Click it to activate your account. You can also resend the verification email:
Once verified, your trust_level changes to verified and all features are unlocked. After 48 hours of normal usage, you are promoted to trusted.
JWT tokens (user sessions)
JWT tokens are issued on signup and login. They identify the user, workspace, and role, and expire after 7 days.
Log in:
Use the token in subsequent requests:
Workspace switching
If you belong to multiple workspaces, your token is scoped to the first workspace by default. Switch to a different workspace:
This returns a new JWT scoped to the target workspace.
List your workspaces:
Roles
Every workspace member has one of three roles:
| Role | What they can do |
|---|---|
| Owner | Everything. Billing, team management, API tokens, workspace settings, plus all admin actions. |
| Admin | Jobs, secrets, notification channels, execution replay. All operational actions. |
| Member | Read-only access. View jobs, executions, and settings but cannot create or modify resources. |
The workspace creator is automatically the owner. Ownership can be transferred via POST /v1/workspace/transfer.
API tokens (machine credentials)
API tokens are long-lived credentials scoped to a workspace. Use them for CI/CD pipelines, scripts, and integrations. Only workspace owners can create and manage tokens.
API tokens start with cron_pat_ and don't expire (until revoked). They inherit the role of the user who created them — if the creator is later removed from the workspace or restricted, the token stops working.
Create a token (owner only):
The raw token value is returned only once at creation time. Store it securely.
Revoke a token (owner only):
Permission matrix
| Operation | Owner | Admin | Member | API Token |
|---|---|---|---|---|
| View jobs, executions, secrets | Yes | Yes | Yes | Yes |
| Create/update/delete jobs | Yes | Yes | No | Yes (inherits creator role) |
| Create/delete secrets | Yes | Yes | No | Yes (inherits creator role) |
| Manage notification channels | Yes | Yes | No | Yes (inherits creator role) |
| Create/revoke API tokens | Yes | No | No | No |
| Manage team members | Yes | No | No | No |
| Update billing/plan | Yes | No | No | No |
| Update workspace settings | Yes | No | No | No |
| Transfer ownership | Yes | No | No | No |
Workspace restriction
If a workspace is restricted (e.g., for a billing or TOS issue), all write operations are blocked but read access remains available. The restriction reason is included in the workspace object:
CLI authentication
The cronctl CLI stores credentials in ~/.cronctl/config.json:
You can also set credentials via environment variables:
Environment variables take precedence over the config file.
Error responses
| Code | Error | When |
|---|---|---|
| 401 | unauthorized | Missing or invalid token |
| 401 | invalid_credentials | Wrong email or password |
| 401 | token_orphaned | API token's creator was deleted |
| 401 | token_creator_removed | API token's creator left the workspace |
| 403 | email_not_verified | Write action before email verification |
| 403 | insufficient_role | Action requires a higher role |
| 403 | workspace_restricted | Workspace is restricted |
| 403 | account_restricted | User account is restricted |
| 429 | rate_limited | Too many requests (includes Retry-After header) |