Skip to content

Operators

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

Authentication: BearerAuth.

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

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

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID

application/json, required: AddOperatorRequest

User to add and target role

FieldTypeRequiredDescription
roleRoleYes
user_idstringYes
StatusDescriptionBody
201CreatedCompanyOperator
400Bad RequestErrorResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
404Not FoundErrorResponse
409ConflictErrorResponse

PATCH /api/v1/companies/{id}/operators/{user_id}

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
user_idpathstringYesTarget user ID

application/json, required: UpdateOperatorRoleRequest

New role

FieldTypeRequiredDescription
roleRoleYes
StatusDescriptionBody
200OKCompanyOperator
400Bad RequestErrorResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
404Not FoundErrorResponse

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

Caller must hold operators:write OR be removing themselves. The owner cannot be removed; transfer ownership first.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
user_idpathstringYesUser ID to remove
StatusDescriptionBody
200OKMessageResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
404Not FoundErrorResponse
409ConflictErrorResponse

Disable or re-enable an operator’s user account

Section titled “Disable or re-enable an operator’s user account”

PATCH /api/v1/companies/{id}/operators/{user_id}/disabled

Setting disabled=true refuses every credential the user holds (sessions, personal API tokens, machine keys) until disabled=false is sent. The owner cannot be disabled (transfer ownership first) and you cannot disable your own account.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
user_idpathstringYesTarget user ID

application/json, required: SetDisabledRequest

New disabled state

FieldTypeRequiredDescription
disabledbooleanNo
StatusDescriptionBody
200OKUser
400Bad RequestErrorResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
404Not FoundErrorResponse
409ConflictErrorResponse

Transfer company ownership to another operator

Section titled “Transfer company ownership to another operator”

POST /api/v1/companies/{id}/operators/{user_id}/transfer-ownership

The caller must currently be the owner. The target must already be an operator of the company. The caller is demoted to admin atomically.

Authentication: BearerAuth.

NameInTypeRequiredDescription
idpathstringYesCompany ID
user_idpathstringYesNew owner user ID
StatusDescriptionBody
200OKMessageResponse
400Bad RequestErrorResponse
401UnauthorizedErrorResponse
403ForbiddenErrorResponse
404Not FoundErrorResponse

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