Skip to content
Select language:English
Select theme

Authentication

Generate an API token and authenticate requests with a Bearer header.

Updated

Prerequisites: You need an account with access to the organization you want to query.

API tokens are personal — they’re created from your own account, not an organization admin area, and each token carries the same access as the user who created it.

  1. Click your avatar at the bottom of the sidebar → Setting, then open the API Tokens tab.
  2. Click New API Token.
  3. Enter a name that identifies the integration (e.g., “CAM Plugin”, “ERP Sync”).
  4. Click Create. The token is shown once — copy it immediately. It will not be shown again.

You can create several tokens and revoke any of them from the same screen.

Include the token in the Authorization header of every request:

Authorization: Bearer <your-token>

Requests without a valid token receive a 401 Unauthorized response, with a WWW-Authenticate: Bearer header on the response:

{ "errors": ["Access denied"] }

Most endpoints require an organization_id path parameter. Retrieve it from:

GET /v1/organizations
Authorization: Bearer <your-token>

Response — a map of organization name to ID:

{
"Acme Manufacturing": 12,
"Acme Tooling": 15
}

Use the numeric ID in all subsequent requests:

GET /v1/organizations/12/machines
Authorization: Bearer <your-token>

Having a valid token for the right organization doesn’t guarantee you see every record in it. Access is further scoped by your role for each resource type within that organization:

  • Site admins, and users with an admin or manager role on a resource, see every matching record in the organization.
  • Users with a user role on a resource are scoped to only the records they created (user_id matches the token’s bearer).

This scoping applies per resource type (e.g., your role on parts and your role on machines are independent) and is enforced on every list and detail endpoint, not just on write actions.

Requests fail with:

Status Meaning
401 Unauthorized Token missing/invalid, or the token’s bearer is not authorized for this action — both cases use 401, not 403. The error message differs: a missing/invalid token gets "Access denied"; an authorization failure gets "You are not authorized to perform this action". An organization_id that doesn’t exist gets the authorization failure, as an organization the token cannot reach
404 Not Found Record does not exist or belongs to a different organization
422 Unprocessable Entity Validation failed — response body contains field errors

See Errors for the complete error format, including an inconsistency in the 404 response body worth knowing about.