Operators
List operators of a company
Section titled “List operators of a company”GET /api/v1/companies/{id}/operators
Authentication: BearerAuth.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Company ID |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
200 | OK | array of CompanyOperator |
401 | Unauthorized | ErrorResponse |
403 | Forbidden | ErrorResponse |
404 | Not Found | ErrorResponse |
Add a user to a company at a given role
Section titled “Add a user to a company at a given role”POST /api/v1/companies/{id}/operators
Authentication: BearerAuth.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Company ID |
Request body
Section titled “Request body”application/json, required: AddOperatorRequest
User to add and target role
| Field | Type | Required | Description |
|---|---|---|---|
role | Role | Yes | |
user_id | string | Yes |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
201 | Created | CompanyOperator |
400 | Bad Request | ErrorResponse |
401 | Unauthorized | ErrorResponse |
403 | Forbidden | ErrorResponse |
404 | Not Found | ErrorResponse |
409 | Conflict | ErrorResponse |
Change an operator’s role
Section titled “Change an operator’s role”PATCH /api/v1/companies/{id}/operators/{user_id}
Authentication: BearerAuth.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Company ID |
user_id | path | string | Yes | Target user ID |
Request body
Section titled “Request body”application/json, required: UpdateOperatorRoleRequest
New role
| Field | Type | Required | Description |
|---|---|---|---|
role | Role | Yes |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
200 | OK | CompanyOperator |
400 | Bad Request | ErrorResponse |
401 | Unauthorized | ErrorResponse |
403 | Forbidden | ErrorResponse |
404 | Not Found | ErrorResponse |
Remove an operator from a company
Section titled “Remove an operator from a company”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.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Company ID |
user_id | path | string | Yes | User ID to remove |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
200 | OK | MessageResponse |
401 | Unauthorized | ErrorResponse |
403 | Forbidden | ErrorResponse |
404 | Not Found | ErrorResponse |
409 | Conflict | ErrorResponse |
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.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Company ID |
user_id | path | string | Yes | Target user ID |
Request body
Section titled “Request body”application/json, required: SetDisabledRequest
New disabled state
| Field | Type | Required | Description |
|---|---|---|---|
disabled | boolean | No |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
200 | OK | User |
400 | Bad Request | ErrorResponse |
401 | Unauthorized | ErrorResponse |
403 | Forbidden | ErrorResponse |
404 | Not Found | ErrorResponse |
409 | Conflict | ErrorResponse |
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.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | Company ID |
user_id | path | string | Yes | New owner user ID |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
200 | OK | MessageResponse |
400 | Bad Request | ErrorResponse |
401 | Unauthorized | ErrorResponse |
403 | Forbidden | ErrorResponse |
404 | Not Found | ErrorResponse |
Part of Crewlet. Generated from the OpenAPI document of the API, version 0.1.0.