Skip to content

Machine operators

GET /api/v1/companies/{id}/operators/machines

Returns every machine user of the company with its creator, including machines not yet added as operators. Roles are managed through the /operators endpoints.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
StatusDescriptionBody
200OKarray of User
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
404Not FoundErrorResponse

Provision a machine user (identity + first key)

Section titled “Provision a machine user (identity + first key)”

POST /api/v1/companies/{id}/operators/machines

Creates the machine user and its first key in one step. The machine has no permissions until an admin adds it with POST /operators at a chosen role. Returns the cleartext token once.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID

application/json, required: CreateMachineOperatorRequest

Machine name + optional description

FieldTypeRequiredDescription
descriptionstringNoAt most 500 characters.
expires_atstringNo
namestringYesAt most 100 characters.
StatusDescriptionBody
201CreatedCreatedMachineOperatorResponse
400Bad RequestErrorResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
404Not FoundErrorResponse

GET /api/v1/companies/{id}/operators/{user_id}/keys

Includes revoked + expired keys for audit.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
user_idpathstringYesMachine user ID
StatusDescriptionBody
200OKarray of MachineOperatorKey
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
404Not FoundErrorResponse

Mint an additional key for an existing machine operator

Section titled “Mint an additional key for an existing machine operator”

POST /api/v1/companies/{id}/operators/{user_id}/keys

The cleartext token is returned ONCE.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
user_idpathstringYesMachine user ID

application/json, required: CreateKeyRequest

Key metadata

FieldTypeRequiredDescription
expires_atstringNo
namestringYesAt most 100 characters.
StatusDescriptionBody
201CreatedCreatedKeyResponse
400Bad RequestErrorResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
404Not FoundErrorResponse

Revoke one of the machine’s keys (idempotent)

Section titled “Revoke one of the machine’s keys (idempotent)”

DELETE /api/v1/companies/{id}/operators/{user_id}/keys/{key_id}

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
user_idpathstringYesMachine user ID
key_idpathstringYesKey ID
StatusDescriptionBody
200OKMessageResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
404Not FoundErrorResponse

Mint a replacement of one of the machine’s keys

Section titled “Mint a replacement of one of the machine’s keys”

POST /api/v1/companies/{id}/operators/{user_id}/keys/{key_id}/rotate

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
user_idpathstringYesMachine user ID
key_idpathstringYesKey ID to rotate
StatusDescriptionBody
201CreatedCreatedKeyResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
404Not FoundErrorResponse

Part of Crewlet. Generated from the OpenAPI document of the API, version 0.1.0.