Crewlet API
The Crewlet API gives you programmatic access to your workspaces.
Authentication
Section titled “Authentication”All requests require an Authorization: Bearer <token> header. Three
credential types are accepted, distinguished by the token’s first
segment:
| Token | Format |
|---|---|
| JWT | eyJ… |
| Personal API Token | clu_… |
| Machine Operator Key | clm_… |
Issued by POST /auth/login, POST /auth/signup, and the OAuth
exchange. Access tokens are short-lived; exchange the refresh token
via POST /auth/refresh for a new one. POST /auth/logout revokes
the refresh token immediately.
Personal API Tokens (PATs)
Section titled “Personal API Tokens (PATs)”Long-lived credentials bound to your user account, created via
POST /user/me/api-tokens and optionally scoped to specific
companies or permissions. The cleartext is returned only once.
Machine Operator Keys
Section titled “Machine Operator Keys”Long-lived credentials bound to a machine operator (a non-human teammate that lives in one company). Removing the machine, or changing its role, applies to every key it holds immediately.
Errors
Section titled “Errors”Errors return JSON in the form
{ "error": "<message>", "code": "<code>", "details": "<detail>" }.
code is a stable identifier, present on errors a client may branch on
(for example discount_invalid); details is optional.
| Status | Meaning |
|---|---|
400 | Malformed request body |
401 | Missing or invalid credentials |
403 | Authenticated, but not permitted |
404 | Resource doesn’t exist or isn’t visible to you |
409 | Conflict (e.g. an account with that email exists) |
422 | Validation failed; see details |
5xx | Server error |
Conventions
Section titled “Conventions”- JSON keys use
snake_case. - Timestamps are RFC 3339 in UTC.
- Resource IDs are UUIDs.
- Every response includes an
X-Request-IDheader. Include it when contacting support.
Base URL
Section titled “Base URL”Every endpoint path in this reference includes it.
/api/v1
Authentication schemes
Section titled “Authentication schemes”| Scheme | How it is sent | Description |
|---|---|---|
BearerAuth | API key in the Authorization header | JWT access token. Format: “Bearer {token}”. |
Endpoints
Section titled “Endpoints”14 endpoints: Mail a new verification link to the signed-in account, Confirm an email address from a mailed link, Begin a GitHub OAuth sign-in and 11 more.
7 endpoints: Get the authenticated user, Update the authenticated user, Upload the authenticated user’s avatar and 4 more.
4 endpoints: List the caller’s personal API tokens, Mint a new personal API token, Revoke a personal API token (idempotent) and 1 more.
4 endpoints: List the organizations the authenticated user belongs to, Create an organization owned by the authenticated user, Get an organization the authenticated user belongs to and 1 more.
5 endpoints: Create a workspace in an organization, List the workspaces the authenticated user may enter, Get a workspace the authenticated user may enter and 2 more.
6 endpoints: List companies the authenticated user is an operator of, Get a company by ID, Update a company’s name and/or config and 3 more.
6 endpoints: List operators of a company, Add a user to a company at a given role, Change an operator’s role and 3 more.
6 endpoints: List the machine users of a company, Provision a machine user (identity + first key), List a machine operator’s keys and 3 more.
25 endpoints: Get the company’s Atlassian connection, Disconnect the company’s Atlassian organization, Connect the company’s Atlassian organization and 22 more.
3 endpoints: List the activity feed for a company, Daily summary aggregate for a company’s activity and List the activity feed for the calling user (self-audit).
Every object the endpoints accept or return, field by field.
Part of Crewlet. Generated from the OpenAPI document of the API, version 0.1.0.