> For the complete documentation index, see [llms.txt](https://docs.vagon.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vagon.io/teams/reference/users.md).

# Users

## List Users

> List organization members and pending invitations with optional pagination and search.\
> \
> \### Headers\
> \
> \| Name | Type |\
> \| --- | --- |\
> \| Authorization\\\* | HMAC {key}:{signature}:{nonce}:{timestamp} |\
> \| Content-Type | application/json |\
> \
> \### \*\*Query Parameters\*\*\
> \
> \| Parameter | Type | Default | Description |\
> \| --- | --- | --- | --- |\
> \| \`page\` | Integer | 1 | Page number |\
> \| \`per\_page\` | Integer | 20 | Record count per page |\
> \| \`q\` | String | \\- | Search by user email or name |\
> \
> \### \*\*Success Response Example\*\*\
> \
> \`\`\` json\
> {\
> &#x20;   "users": \[\
> &#x20;       {\
> &#x20;           "name": "Computer User",\
> &#x20;           "email": "<computeruser@vagon.io>",\
> &#x20;           "status": "active",\
> &#x20;           "machine\_id": 100,\
> &#x20;           "uid": "f1592625-edd0-48df-9bc0-de14910ec936"\
> &#x20;       },\
> &#x20;       {\
> &#x20;           "name": null,\
> &#x20;           "email": "<inviteduser@vagon.io>",\
> &#x20;           "status": "invitation-pending",\
> &#x20;           "machine\_id": null,\
> &#x20;           "uid": null\
> &#x20;       }\
> &#x20;   ],\
> &#x20;   "count": 2,\
> &#x20;   "page": 1,\
> &#x20;   "next\_page": null,\
> &#x20;   "client\_code": 200,\
> &#x20;   "message": "OK",\
> &#x20;   "timestamp": "2026-02-09T12:00:00Z"\
> }\
> \
> &#x20;\`\`\`\
> \
> \### \*\*Success Response Fields\*\*\
> \
> \| Field | Type | Description |\
> \| --- | --- | --- |\
> \| \`users\` | Array | Array of user or invitation objects |\
> \| \`users\[].name\` | String or null | User display name (null for invitation) |\
> \| \`users\[].email\` | String | User or invitee email |\
> \| \`users\[].status\` | String | "active" or "invitation-pending" |\
> \| \`users\[].machine\_id\` | Integer or null | Assigned machine ID (null if none) |\
> \| \`users\[].uid\` | String or null | User UUID (null for pending invitation) |\
> \| \`count\` | Integer | Total count for current page |\
> \| \`page\` | Integer | Current page number |\
> \| \`next\_page\` | Integer or null | Next page number (null if no more pages) |\
> \| \`client\_code\` | Integer | Response code (200 for success) |\
> \| \`message\` | String | Response message |\
> \| \`timestamp\` | String | Response timestamp (ISO 8601) |\
> \
> \### \*\*Error Responses\*\*\
> \
> \| Status | Description |\
> \| --- | --- |\
> \| 400 | Bad request |\
> \| 4710 | Permission required |

````json
{"openapi":"3.0.0","info":{"title":"Vagon Computers API","version":"1.0.12"},"servers":[{"url":"https://api.vagon.io/organization-management/v1"}],"paths":{"/users":{"get":{"summary":"List Users","parameters":[{"name":"page","in":"query","description":"(Optional) Page number. Default: 1","schema":{"type":"integer"}},{"name":"per_page","in":"query","description":"(Optional) Records per page. Default: 20","schema":{"type":"integer"}},{"name":"q","in":"query","description":"(Optional) Search by user email or name","schema":{"type":"string"}}],"responses":{"200":{"description":"List of users and pending invitations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUsersResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error400Response"}}}},"4710":{"description":"Permission required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error4710Response"}}}}},"tags":["Users"],"description":"List organization members and pending invitations with optional pagination and search.\n\n### Headers\n\n| Name | Type |\n| --- | --- |\n| Authorization\\* | HMAC {key}:{signature}:{nonce}:{timestamp} |\n| Content-Type | application/json |\n\n### **Query Parameters**\n\n| Parameter | Type | Default | Description |\n| --- | --- | --- | --- |\n| `page` | Integer | 1 | Page number |\n| `per_page` | Integer | 20 | Record count per page |\n| `q` | String | \\- | Search by user email or name |\n\n### **Success Response Example**\n\n``` json\n{\n    \"users\": [\n        {\n            \"name\": \"Computer User\",\n            \"email\": \"computeruser@vagon.io\",\n            \"status\": \"active\",\n            \"machine_id\": 100,\n            \"uid\": \"f1592625-edd0-48df-9bc0-de14910ec936\"\n        },\n        {\n            \"name\": null,\n            \"email\": \"inviteduser@vagon.io\",\n            \"status\": \"invitation-pending\",\n            \"machine_id\": null,\n            \"uid\": null\n        }\n    ],\n    \"count\": 2,\n    \"page\": 1,\n    \"next_page\": null,\n    \"client_code\": 200,\n    \"message\": \"OK\",\n    \"timestamp\": \"2026-02-09T12:00:00Z\"\n}\n\n ```\n\n### **Success Response Fields**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| `users` | Array | Array of user or invitation objects |\n| `users[].name` | String or null | User display name (null for invitation) |\n| `users[].email` | String | User or invitee email |\n| `users[].status` | String | \"active\" or \"invitation-pending\" |\n| `users[].machine_id` | Integer or null | Assigned machine ID (null if none) |\n| `users[].uid` | String or null | User UUID (null for pending invitation) |\n| `count` | Integer | Total count for current page |\n| `page` | Integer | Current page number |\n| `next_page` | Integer or null | Next page number (null if no more pages) |\n| `client_code` | Integer | Response code (200 for success) |\n| `message` | String | Response message |\n| `timestamp` | String | Response timestamp (ISO 8601) |\n\n### **Error Responses**\n\n| Status | Description |\n| --- | --- |\n| 400 | Bad request |\n| 4710 | Permission required |"}}},"components":{"schemas":{"ListUsersResponse":{"allOf":[{"$ref":"#/components/schemas/BaseResponse"},{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/UserListItem"}},"count":{"type":"integer","description":"Total count for current page"},"page":{"type":"integer","description":"Current page number"},"next_page":{"type":"integer","nullable":true,"description":"Next page number (null if no more pages)"}}}]},"BaseResponse":{"type":"object","properties":{"client_code":{"type":"integer"},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}},"UserListItem":{"type":"object","description":"User or pending invitation in list","properties":{"name":{"type":"string","nullable":true,"description":"User display name (null for invitation without accepted user)"},"email":{"type":"string","description":"User or invitee email"},"status":{"type":"string","description":"\"active\" for member, \"invitation-pending\" for pending invitation","enum":["active","invitation-pending"]},"machine_id":{"type":"integer","nullable":true,"description":"Assigned machine ID (null if not assigned)"},"uid":{"type":"string","nullable":true,"description":"User UUID (null for pending invitation)"}}},"Error400Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"ErrorResponse":{"type":"object","properties":{"client_code":{"type":"integer"},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}},"Error4710Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]}}}}
````

## Remove User or Cancel Invitation

> Remove a member from the organization or cancel a pending invitation.\
> \
> \### Headers\
> \
> \| Name | Type |\
> \| --- | --- |\
> \| Authorization\\\* | HMAC {key}:{signature}:{nonce}:{timestamp} |\
> \| Content-Type | application/json |\
> \
> \### \*\*Body Parameters\*\*\
> \
> \| Parameter | Type | Required | Description |\
> \| --- | --- | --- | --- |\
> \| \`email\`\\\* | String | Yes | User or invitee email to remove |\
> \| \`keep\_files\` | Boolean | No | Whether to keep user files. Default: true |\
> \
> \### Request Body Example\
> \
> \`\`\` json\
> {\
> &#x20; "email": "<user@vagon.io>",\
> &#x20; "keep\_files": true\
> }\
> \
> &#x20;\`\`\`\
> \
> \### \*\*Success Response Example\*\*\
> \
> \`\`\` json\
> {\
> &#x20;   "client\_code": 200,\
> &#x20;   "message": "OK",\
> &#x20;   "timestamp": "2026-02-10T15:56:54Z"\
> }\
> \
> &#x20;\`\`\`\
> \
> \### \*\*Success Response Fields\*\*\
> \
> \| Field | Type | Description |\
> \| --- | --- | --- |\
> \| \`client\_code\` | Integer | Response code (200 for success) |\
> \| \`message\` | String | Response message |\
> \| \`timestamp\` | String | Response timestamp (ISO 8601) |\
> \
> \### \*\*Error Responses\*\*\
> \
> \| Status | Description |\
> \| --- | --- |\
> \| 400 | Bad request |\
> \| 404 | Email not found in organization or pending invitations |\
> \| 4318 | Not a valid email |\
> \| 4319 | Email not found |\
> \| 4710 | Permission required |\
> \| 4713 | Organization owner cannot be removed |

````json
{"openapi":"3.0.0","info":{"title":"Vagon Computers API","version":"1.0.12"},"servers":[{"url":"https://api.vagon.io/organization-management/v1"}],"paths":{"/users":{"delete":{"summary":"Remove User or Cancel Invitation","responses":{"200":{"description":"User removed or invitation cancelled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error400Response"}}}},"404":{"description":"Email not found in organization or pending invitations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error404Response"}}}},"4318":{"description":"Not a valid email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error4318Response"}}}},"4319":{"description":"Email not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error4319Response"}}}},"4710":{"description":"Permission required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error4710Response"}}}},"4713":{"description":"Organization owner cannot be removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error4713Response"}}}}},"tags":["Users"],"description":"Remove a member from the organization or cancel a pending invitation.\n\n### Headers\n\n| Name | Type |\n| --- | --- |\n| Authorization\\* | HMAC {key}:{signature}:{nonce}:{timestamp} |\n| Content-Type | application/json |\n\n### **Body Parameters**\n\n| Parameter | Type | Required | Description |\n| --- | --- | --- | --- |\n| `email`\\* | String | Yes | User or invitee email to remove |\n| `keep_files` | Boolean | No | Whether to keep user files. Default: true |\n\n### Request Body Example\n\n``` json\n{\n  \"email\": \"user@vagon.io\",\n  \"keep_files\": true\n}\n\n ```\n\n### **Success Response Example**\n\n``` json\n{\n    \"client_code\": 200,\n    \"message\": \"OK\",\n    \"timestamp\": \"2026-02-10T15:56:54Z\"\n}\n\n ```\n\n### **Success Response Fields**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| `client_code` | Integer | Response code (200 for success) |\n| `message` | String | Response message |\n| `timestamp` | String | Response timestamp (ISO 8601) |\n\n### **Error Responses**\n\n| Status | Description |\n| --- | --- |\n| 400 | Bad request |\n| 404 | Email not found in organization or pending invitations |\n| 4318 | Not a valid email |\n| 4319 | Email not found |\n| 4710 | Permission required |\n| 4713 | Organization owner cannot be removed |","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","description":"User or invitee email to remove"},"keep_files":{"type":"boolean","description":"Whether to keep user files. Default true","default":true}}}}}}}}},"components":{"schemas":{"SuccessResponse":{"allOf":[{"$ref":"#/components/schemas/BaseResponse"}]},"BaseResponse":{"type":"object","properties":{"client_code":{"type":"integer"},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}},"Error400Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"ErrorResponse":{"type":"object","properties":{"client_code":{"type":"integer"},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}},"Error404Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"Error4318Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"Error4319Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"Error4710Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"Error4713Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]}}}}
````

## Assign User or Invitation to Machine

> Assign a user or pending invitation to an unassigned machine. If the machine is already assigned, revoke first.\
> \
> \### Headers\
> \
> \| Name | Type |\
> \| --- | --- |\
> \| Authorization\\\* | HMAC {key}:{signature}:{nonce}:{timestamp} |\
> \| Content-Type | application/json |\
> \
> \### \*\*Body Parameters\*\*\
> \
> \| Parameter | Type | Required | Description |\
> \| --- | --- | --- | --- |\
> \| \`machine\_id\`\\\* | Integer | Yes | Machine ID to assign |\
> \| \`email\`\\\* | String | Yes | User or invitee email |\
> \
> \### Request Body Example\
> \
> \`\`\` json\
> {\
> &#x20; "machine\_id": 100,\
> &#x20; "email": "<computeruser@vagon.io>"\
> }\
> \
> &#x20;\`\`\`\
> \
> \### \*\*Success Response Example\*\*\
> \
> \`\`\` json\
> {\
> &#x20;   "name": "Computer User",\
> &#x20;   "email": "<computeruser@vagon.io>",\
> &#x20;   "status": "active",\
> &#x20;   "machine\_id": 100,\
> &#x20;   "uid": "683530d7-707a-aaaa-8d74-4ac8475e5051",\
> &#x20;   "client\_code": 200,\
> &#x20;   "message": "OK",\
> &#x20;   "timestamp": "2026-02-10T15:58:10Z"\
> }\
> \
> &#x20;\`\`\`\
> \
> \### \*\*Success Response Fields\*\*\
> \
> \| Field | Type | Description |\
> \| --- | --- | --- |\
> \| \`name\` | String or null | User display name (null for pending invitation) |\
> \| \`email\` | String | User or invitee email |\
> \| \`status\` | String | "active" or "invitation-pending" |\
> \| \`machine\_id\` | Integer | Assigned machine ID |\
> \| \`uid\` | String or null | User UUID (null for pending invitation) |\
> \| \`client\_code\` | Integer | Response code (200 for success) |\
> \| \`message\` | String | Response message |\
> \| \`timestamp\` | String | Response timestamp (ISO 8601) |\
> \
> \### \*\*Error Responses\*\*\
> \
> \| Status | Description |\
> \| --- | --- |\
> \| 400 | Bad request |\
> \| 404 | Machine not found or email not in organization/invitations |\
> \| 4318 | Not a valid email |\
> \| 4319 | Email not found |\
> \| 4710 | Permission required |\
> \| 4715 | Machine already assigned. Revoke current assignment first. |

````json
{"openapi":"3.0.0","info":{"title":"Vagon Computers API","version":"1.0.12"},"servers":[{"url":"https://api.vagon.io/organization-management/v1"}],"paths":{"/users/assign":{"post":{"summary":"Assign User or Invitation to Machine","responses":{"200":{"description":"User or invitation assigned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignUserResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error400Response"}}}},"404":{"description":"Machine or user/email not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error404Response"}}}},"4318":{"description":"Not a valid email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error4318Response"}}}},"4319":{"description":"Email not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error4319Response"}}}},"4710":{"description":"Permission required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error4710Response"}}}},"4715":{"description":"Machine already assigned. Revoke current assignment first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error4715Response"}}}}},"tags":["Users"],"description":"Assign a user or pending invitation to an unassigned machine. If the machine is already assigned, revoke first.\n\n### Headers\n\n| Name | Type |\n| --- | --- |\n| Authorization\\* | HMAC {key}:{signature}:{nonce}:{timestamp} |\n| Content-Type | application/json |\n\n### **Body Parameters**\n\n| Parameter | Type | Required | Description |\n| --- | --- | --- | --- |\n| `machine_id`\\* | Integer | Yes | Machine ID to assign |\n| `email`\\* | String | Yes | User or invitee email |\n\n### Request Body Example\n\n``` json\n{\n  \"machine_id\": 100,\n  \"email\": \"computeruser@vagon.io\"\n}\n\n ```\n\n### **Success Response Example**\n\n``` json\n{\n    \"name\": \"Computer User\",\n    \"email\": \"computeruser@vagon.io\",\n    \"status\": \"active\",\n    \"machine_id\": 100,\n    \"uid\": \"683530d7-707a-aaaa-8d74-4ac8475e5051\",\n    \"client_code\": 200,\n    \"message\": \"OK\",\n    \"timestamp\": \"2026-02-10T15:58:10Z\"\n}\n\n ```\n\n### **Success Response Fields**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| `name` | String or null | User display name (null for pending invitation) |\n| `email` | String | User or invitee email |\n| `status` | String | \"active\" or \"invitation-pending\" |\n| `machine_id` | Integer | Assigned machine ID |\n| `uid` | String or null | User UUID (null for pending invitation) |\n| `client_code` | Integer | Response code (200 for success) |\n| `message` | String | Response message |\n| `timestamp` | String | Response timestamp (ISO 8601) |\n\n### **Error Responses**\n\n| Status | Description |\n| --- | --- |\n| 400 | Bad request |\n| 404 | Machine not found or email not in organization/invitations |\n| 4318 | Not a valid email |\n| 4319 | Email not found |\n| 4710 | Permission required |\n| 4715 | Machine already assigned. Revoke current assignment first. |","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["machine_id","email"],"properties":{"machine_id":{"type":"integer","description":"Machine ID to assign"},"email":{"type":"string","description":"User or invitee email"}}}}}}}}},"components":{"schemas":{"AssignUserResponse":{"allOf":[{"$ref":"#/components/schemas/BaseResponse"},{"type":"object","properties":{"name":{"type":"string","nullable":true},"email":{"type":"string"},"status":{"type":"string","enum":["active","invitation-pending"]},"machine_id":{"type":"integer"},"uid":{"type":"string","nullable":true}}}]},"BaseResponse":{"type":"object","properties":{"client_code":{"type":"integer"},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}},"Error400Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"ErrorResponse":{"type":"object","properties":{"client_code":{"type":"integer"},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}},"Error404Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"Error4318Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"Error4319Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"Error4710Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"Error4715Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]}}}}
````

## Revoke User or Invitation from Machine

> Revoke the user or invitation assigned to a machine (lookup by email).\
> \
> \### Headers\
> \
> \| Name | Type |\
> \| --- | --- |\
> \| Authorization\\\* | HMAC {key}:{signature}:{nonce}:{timestamp} |\
> \| Content-Type | application/json |\
> \
> \### \*\*Body Parameters\*\*\
> \
> \| Parameter | Type | Required | Description |\
> \| --- | --- | --- | --- |\
> \| \`email\`\\\* | String | Yes | User or invitee email to revoke from their assigned machine |\
> \| \`keep\_files\` | Boolean | No | Whether to keep user files. Default: true |\
> \
> \### Request Body Example\
> \
> \`\`\` json\
> {\
> &#x20; "email": "<user@example.com>",\
> &#x20; "keep\_files": true\
> }\
> \
> &#x20;\`\`\`\
> \
> \### \*\*Success Response Example\*\*\
> \
> \`\`\` json\
> {\
> &#x20;   "client\_code": 200,\
> &#x20;   "message": "OK",\
> &#x20;   "timestamp": "2026-02-10T16:01:24Z"\
> }\
> \
> &#x20;\`\`\`\
> \
> \### \*\*Success Response Fields\*\*\
> \
> \| Field | Type | Description |\
> \| --- | --- | --- |\
> \| \`client\_code\` | Integer | Response code (200 for success) |\
> \| \`message\` | String | Response message |\
> \| \`timestamp\` | String | Response timestamp (ISO 8601) |\
> \
> \### \*\*Error Responses\*\*\
> \
> \| Status | Description |\
> \| --- | --- |\
> \| 400 | Bad request |\
> \| 404 | Email does not match any user or invitation |\
> \| 4318 | Not a valid email |\
> \| 4710 | Permission required |\
> \| 4714 | User or invitation not assigned to any machine |

````json
{"openapi":"3.0.0","info":{"title":"Vagon Computers API","version":"1.0.12"},"servers":[{"url":"https://api.vagon.io/organization-management/v1"}],"paths":{"/users/revoke":{"post":{"summary":"Revoke User or Invitation from Machine","responses":{"200":{"description":"User or invitation revoked from machine","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error400Response"}}}},"404":{"description":"Email does not match any user or invitation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error404Response"}}}},"4318":{"description":"Not a valid email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error4318Response"}}}},"4710":{"description":"Permission required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error4710Response"}}}},"4714":{"description":"User or invitation not assigned to any machine","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error4714Response"}}}}},"tags":["Users"],"description":"Revoke the user or invitation assigned to a machine (lookup by email).\n\n### Headers\n\n| Name | Type |\n| --- | --- |\n| Authorization\\* | HMAC {key}:{signature}:{nonce}:{timestamp} |\n| Content-Type | application/json |\n\n### **Body Parameters**\n\n| Parameter | Type | Required | Description |\n| --- | --- | --- | --- |\n| `email`\\* | String | Yes | User or invitee email to revoke from their assigned machine |\n| `keep_files` | Boolean | No | Whether to keep user files. Default: true |\n\n### Request Body Example\n\n``` json\n{\n  \"email\": \"user@example.com\",\n  \"keep_files\": true\n}\n\n ```\n\n### **Success Response Example**\n\n``` json\n{\n    \"client_code\": 200,\n    \"message\": \"OK\",\n    \"timestamp\": \"2026-02-10T16:01:24Z\"\n}\n\n ```\n\n### **Success Response Fields**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| `client_code` | Integer | Response code (200 for success) |\n| `message` | String | Response message |\n| `timestamp` | String | Response timestamp (ISO 8601) |\n\n### **Error Responses**\n\n| Status | Description |\n| --- | --- |\n| 400 | Bad request |\n| 404 | Email does not match any user or invitation |\n| 4318 | Not a valid email |\n| 4710 | Permission required |\n| 4714 | User or invitation not assigned to any machine |","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","description":"User or invitee email to revoke from their assigned machine"},"keep_files":{"type":"boolean","description":"Whether to keep user files. Default true","default":true}}}}}}}}},"components":{"schemas":{"SuccessResponse":{"allOf":[{"$ref":"#/components/schemas/BaseResponse"}]},"BaseResponse":{"type":"object","properties":{"client_code":{"type":"integer"},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}},"Error400Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"ErrorResponse":{"type":"object","properties":{"client_code":{"type":"integer"},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}},"Error404Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"Error4318Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"Error4710Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"Error4714Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]}}}}
````

## Create Invitations

> Create invitations for one or more emails. Requires invitations to be enabled for the organization.\
> \
> \### Headers\
> \
> \| Name | Type |\
> \| --- | --- |\
> \| Authorization\\\* | HMAC {key}:{signature}:{nonce}:{timestamp} |\
> \| Content-Type | application/json |\
> \
> \### \*\*Body Parameters\*\*\
> \
> \| Parameter | Type | Required | Description |\
> \| --- | --- | --- | --- |\
> \| \`emails\`\\\* | Array\\\[String\\] | Yes | List of email addresses to invite |\
> \
> \### Request Body Example\
> \
> \`\`\` json\
> {\
> &#x20; "emails": \[\
> &#x20;   "<user1@example.com>", \
> &#x20;   "<user2@example.com>"\
> &#x20; ]\
> }\
> \
> &#x20;\`\`\`\
> \
> \### \*\*Success Response Example\*\*\
> \
> \`\`\` json\
> {\
> &#x20;   "invitation\_results": {\
> &#x20;       "success": \[\
> &#x20;         "<user1@example.com>"\
> &#x20;       ],\
> &#x20;       "failed": \[\
> &#x20;         "<user2@example.com>"\
> &#x20;       ]\
> &#x20;   },\
> &#x20;   "client\_code": 200,\
> &#x20;   "message": "OK",\
> &#x20;   "timestamp": "2026-02-09T12:00:00Z"\
> }\
> \
> &#x20;\`\`\`\
> \
> \### \*\*Success Response Fields\*\*\
> \
> \| Field | Type | Description |\
> \| --- | --- | --- |\
> \| \`invitation\_results\` | Object | Result of invitation requests |\
> \| \`invitation\_results.success\` | Array\\\[String\\] | Emails invited successfully |\
> \| \`invitation\_results.failed\` | Array\\\[String\\] | Emails that failed (invalid or not allowed) |\
> \| \`client\_code\` | Integer | Response code (200 for success) |\
> \| \`message\` | String | Response message |\
> \| \`timestamp\` | String | Response timestamp (ISO 8601) |\
> \
> \### \*\*Error Responses\*\*\
> \
> \| Status | Description |\
> \| --- | --- |\
> \| 400 | Bad request |\
> \| 403 | Invitations not enabled for organization |\
> \| 404 | Not Found |\
> \| 4710 | Permission required |

````json
{"openapi":"3.0.0","info":{"title":"Vagon Computers API","version":"1.0.12"},"servers":[{"url":"https://api.vagon.io/organization-management/v1"}],"paths":{"/users/invite":{"post":{"summary":"Create Invitations","responses":{"200":{"description":"Invitation results (success and failed arrays)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationResultsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error400Response"}}}},"403":{"description":"Invitations not enabled for organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error403Response"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error404Response"}}}},"4710":{"description":"Permission required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error4710Response"}}}}},"tags":["Users"],"description":"Create invitations for one or more emails. Requires invitations to be enabled for the organization.\n\n### Headers\n\n| Name | Type |\n| --- | --- |\n| Authorization\\* | HMAC {key}:{signature}:{nonce}:{timestamp} |\n| Content-Type | application/json |\n\n### **Body Parameters**\n\n| Parameter | Type | Required | Description |\n| --- | --- | --- | --- |\n| `emails`\\* | Array\\[String\\] | Yes | List of email addresses to invite |\n\n### Request Body Example\n\n``` json\n{\n  \"emails\": [\n    \"user1@example.com\", \n    \"user2@example.com\"\n  ]\n}\n\n ```\n\n### **Success Response Example**\n\n``` json\n{\n    \"invitation_results\": {\n        \"success\": [\n          \"user1@example.com\"\n        ],\n        \"failed\": [\n          \"user2@example.com\"\n        ]\n    },\n    \"client_code\": 200,\n    \"message\": \"OK\",\n    \"timestamp\": \"2026-02-09T12:00:00Z\"\n}\n\n ```\n\n### **Success Response Fields**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| `invitation_results` | Object | Result of invitation requests |\n| `invitation_results.success` | Array\\[String\\] | Emails invited successfully |\n| `invitation_results.failed` | Array\\[String\\] | Emails that failed (invalid or not allowed) |\n| `client_code` | Integer | Response code (200 for success) |\n| `message` | String | Response message |\n| `timestamp` | String | Response timestamp (ISO 8601) |\n\n### **Error Responses**\n\n| Status | Description |\n| --- | --- |\n| 400 | Bad request |\n| 403 | Invitations not enabled for organization |\n| 404 | Not Found |\n| 4710 | Permission required |","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["emails"],"properties":{"emails":{"type":"array","items":{"type":"string"},"description":"List of email addresses to invite"}}}}}}}}},"components":{"schemas":{"InvitationResultsResponse":{"allOf":[{"$ref":"#/components/schemas/BaseResponse"},{"type":"object","properties":{"invitation_results":{"type":"object","properties":{"success":{"type":"array","items":{"type":"string"},"description":"Emails that were invited successfully"},"failed":{"type":"array","items":{"type":"string"},"description":"Emails that failed (invalid or not allowed)"}}}}}]},"BaseResponse":{"type":"object","properties":{"client_code":{"type":"integer"},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}},"Error400Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"ErrorResponse":{"type":"object","properties":{"client_code":{"type":"integer"},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}},"Error403Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"Error404Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]},"Error4710Response":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"}]}}}}
````
