Organization API
Reference for the 11 Organization operations in the Intuidy API.
Responses are JSON. A successful response is { "success": true, "data": …, "meta": … }, and each operation below documents its data. Errors use the error envelope described in Errors, pagination and limits.
| Operation | Method and path | Authorization |
|---|---|---|
| List the organization's human users | GET /users | users:read |
| Create (invite) a user | POST /users | users:write |
| Get one user | GET /users/{userId} | users:read |
| Update a user | PATCH /users/{userId} | users:write |
| Delete a user | DELETE /users/{userId} | users:write |
| List a company's roles | GET /roles | users:read |
| Create a role | POST /roles | users:write |
| Get one role | GET /roles/{roleId} | users:read |
| Update a role | PATCH /roles/{roleId} | users:write |
| Delete a role | DELETE /roles/{roleId} | users:write |
| The assignable permission catalog | GET /roles/permissions | users:read |
List the organization's human users
GET /users
Rows carry roles and month-to-date creditsUsed; password hashes are
never returned. ?client_id narrows to one
company inside the key's scope (403 outside it).
Authorization: scope users:read.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
page | integer | No | — |
limit | integer (≤ 100) | No | — |
search | string | No | Name/email contains |
client_id | integer | No | Must be inside the key's scope |
Response 200 OK
data fields:
| Field | Type | Description |
|---|---|---|
users | array of OrgUser | — |
pagination | object | — |
pagination.page | integer | — |
pagination.limit | integer | — |
pagination.total | integer | — |
Errors 403 (INSUFFICIENT_SCOPE). See Errors, pagination and limits.
Example request
curl -X GET "https://vantage.intuidy.com/api/v1/users" \
-H "Authorization: Bearer $INTUIDY_API_KEY"Create (invite) a user
POST /users
Requires the key owner's manage_users permission — see the section
note. Role ids must belong to the target company. roleIds and
role_ids are accepted as aliases.
Authorization: scope users:write.
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | — |
password | string | Yes | — |
first_name | string | No | — |
last_name | string | No | — |
client_id | integer | No | Defaults to the key's company; must be inside the key's scope |
is_active | boolean | No | Default true |
roleIds | array of integer | No | — |
Response 201 Created
data fields:
| Field | Type | Description |
|---|---|---|
user | OrgUser | — |
Errors 400, 403 (INSUFFICIENT_SCOPE), 409. See Errors, pagination and limits.
Example request
curl -X POST "https://vantage.intuidy.com/api/v1/users" \
-H "Authorization: Bearer $INTUIDY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"<email>","password":"<password>"}'Get one user
GET /users/{userId}
A user outside the key's scoped companies is a 404 — the API never confirms an id it will not serve.
Authorization: scope users:read.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
userId | integer | Yes | — |
Response 200 OK
data fields:
| Field | Type | Description |
|---|---|---|
user | OrgUser | — |
Errors 404. See Errors, pagination and limits.
Example request
curl -X GET "https://vantage.intuidy.com/api/v1/users/<userId>" \
-H "Authorization: Bearer $INTUIDY_API_KEY"Update a user
PATCH /users/{userId}
Updates the fields sent. Requires the key owner's manage_users permission. A role must belong to the user's company.
Authorization: scope users:write.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
userId | integer | Yes | — |
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
email | string | No | — |
first_name | string | No | — |
last_name | string | No | — |
client_id | integer | No | Moves the user to another company in the key's scope. The move clears the user's roles and default dashboard, so send that company's roleIds in the same request. |
is_active | boolean | No | — |
password | string | No | — |
roleIds | array of integer | No | — |
Response 200 OK
Errors 400, 403 (INSUFFICIENT_SCOPE), 404. See Errors, pagination and limits.
Example request
curl -X PATCH "https://vantage.intuidy.com/api/v1/users/<userId>" \
-H "Authorization: Bearer $INTUIDY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"<email>"}'Delete a user
DELETE /users/{userId}
The key's OWNER is the actor, so a key cannot delete its own owner.
Two refusals ask for an acknowledgement and are retried with a query
parameter: LAST_ACTIVE_USER (the company's last active user; retry
with allowLastActiveUser=1) and HAS_OWNED_CONTENT (the user still
owns dashboards, workflows, notebooks or agents; retry with
successorUserId, an active user of the same company who inherits
them, or force=1 to leave them ownerless). A successor from another
company is refused (403), even one inside the key's scope, and so is
an inactive successor (422).
Authorization: scope users:write.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
userId | integer | Yes | — |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
allowLastActiveUser | "1" | No | Confirm removing the company's last active user (billing notices would reach nobody). |
successorUserId | integer | No | An active user of the same company who inherits the content the deleted user owned. |
force | "1" | No | Delete even though owned content stays ownerless. |
Response 200 OK
Errors 400, 403 (INSUFFICIENT_SCOPE), 404, 409 (LAST_ACTIVE_USER, HAS_OWNED_CONTENT), 422 (INVALID_INPUT). See Errors, pagination and limits.
Example request
curl -X DELETE "https://vantage.intuidy.com/api/v1/users/<userId>" \
-H "Authorization: Bearer $INTUIDY_API_KEY"List a company's roles
GET /roles
With per-role user counts. ?client_id picks a company inside the
key's scope; defaults to the key's company.
Authorization: scope users:read.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
client_id | integer | No | — |
Response 200 OK
data fields:
| Field | Type | Description |
|---|---|---|
roles | array of OrgRole | — |
Errors 403 (INSUFFICIENT_SCOPE). See Errors, pagination and limits.
Example request
curl -X GET "https://vantage.intuidy.com/api/v1/roles" \
-H "Authorization: Bearer $INTUIDY_API_KEY"Create a role
POST /roles
Requires the key owner's manage_roles permission. Enum fields are validated against the shared lists (see GET /roles/permissions for the accepted values) — unknown values are a 400. Snake_case aliases (credit_budget, budget_period, overage_action) are accepted. The organization's role budget policy applies.
Authorization: scope users:write.
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | — |
description | string | No | — |
context | string | No | — |
permissions | object | No | {permissionId: boolean} — ids from GET /roles/permissions |
creditBudget | number or null | No | — |
budgetPeriod | string | No | — |
overageAction | string | No | — |
client_id | integer | No | Defaults to the key's company; must be inside the key's scope |
Response 201 Created
Errors 400, 403 (INSUFFICIENT_SCOPE). See Errors, pagination and limits.
Example request
curl -X POST "https://vantage.intuidy.com/api/v1/roles" \
-H "Authorization: Bearer $INTUIDY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"<name>"}'Get one role
GET /roles/{roleId}
A role outside the key's scoped companies is a 404, never a 403 that would confirm it exists.
Authorization: scope users:read.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
roleId | integer | Yes | — |
Response 200 OK
data fields:
| Field | Type | Description |
|---|---|---|
role | OrgRole | — |
Errors 404. See Errors, pagination and limits.
Example request
curl -X GET "https://vantage.intuidy.com/api/v1/roles/<roleId>" \
-H "Authorization: Bearer $INTUIDY_API_KEY"Update a role
PATCH /roles/{roleId}
A real patch: fields omitted from the body keep their current values. Requires the key owner's manage_roles permission. A system role's permissions are immutable.
Authorization: scope users:write.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
roleId | integer | Yes | — |
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | — |
description | string | No | — |
context | string | No | — |
permissions | object | No | — |
creditBudget | number or null | No | — |
budgetPeriod | string | No | — |
overageAction | string | No | — |
Response 200 OK
Errors 400, 403 (INSUFFICIENT_SCOPE), 404. See Errors, pagination and limits.
Example request
curl -X PATCH "https://vantage.intuidy.com/api/v1/roles/<roleId>" \
-H "Authorization: Bearer $INTUIDY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"<name>"}'Delete a role
DELETE /roles/{roleId}
System roles are never deletable.
Authorization: scope users:write.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
roleId | integer | Yes | — |
Response 200 OK
Errors 400, 403 (INSUFFICIENT_SCOPE), 404. See Errors, pagination and limits.
Example request
curl -X DELETE "https://vantage.intuidy.com/api/v1/roles/<roleId>" \
-H "Authorization: Bearer $INTUIDY_API_KEY"The assignable permission catalog
GET /roles/permissions
The same catalog the Role editor shows, so an API consumer building a role can validate permission ids without scraping the UI: the grouped form, a flat {id, label, description?, group} list, the implication map (broader flags that also satisfy a narrower check), and the budget enums the role endpoints accept.
Authorization: scope users:read.
Response 200 OK
data fields:
| Field | Type | Description |
|---|---|---|
groups | array of object | — |
permissions | array of object | — |
permissions[].id | string | — |
permissions[].label | string | — |
permissions[].description | string | — |
permissions[].group | string | — |
implies | object | — |
budgetPeriods | array of string | — |
overageActions | array of string | — |
Errors 403 (INSUFFICIENT_SCOPE). See Errors, pagination and limits.
Example request
curl -X GET "https://vantage.intuidy.com/api/v1/roles/permissions" \
-H "Authorization: Bearer $INTUIDY_API_KEY"Objects
OrgRole
| Field | Type | Description |
|---|---|---|
id | integer | — |
name | string | — |
description | string or null | — |
context | string or null | — |
permissions | object | {permissionId: boolean} — ids from GET /roles/permissions |
created | string (date-time) | — |
modified | string (date-time) | — |
userCount | integer | — |
clientId | integer | — |
isSystem | boolean | System roles adopt every permission; their permission map is immutable and they cannot be deleted |
creditBudget | number or null | — |
budgetPeriod | string | — |
overageAction | string | — |
OrgUser
A human user as the user operations return them. Password hashes are
never returned. Create/update responses omit created and
creditsUsed.
| Field | Type | Description |
|---|---|---|
id | integer | — |
email | string | — |
first_name | string or null | — |
last_name | string or null | — |
client_id | integer | — |
client_name | string | — |
is_active | boolean | — |
default_dashboard | integer or null | The dashboard the user lands on |
job_title | string or null | — |
department | string or null | — |
location | string or null | — |
bio | string or null | — |
created | string (date-time) | — |
roles | array of object | — |
roles[].id | integer | — |
roles[].name | string | — |
creditsUsed | number | Month-to-date tokens used (list only) |