Roles
Roles are named, reusable bundles of resource grants. Assign them to end users directly or pin them to groups; their grants are compiled into each member's effective access.
Role schema
Returns all active roles in the account. Requires account owner or administrator access.
List of roles.
A named, reusable bundle of resource grants. Roles are assigned to end
users directly (_roleIds on the end-user record) or pinned to groups,
and their grants are compiled into each member's effective access.
Unique identifier for the role.
68c1d2e3f4a5b6c7d8e9f0a1Account owner's user id.
5f8d43a1b9e5a80011a35f2cRole name, unique within the account (case-insensitive).
Finance toolsFree-text description of the role's purpose.
Read access to finance MCP toolsTimestamp when the role was created.
2026-07-01T09:15:32ZTimestamp when the role was last updated.
2026-08-15T14:30:15ZNo roles exist in the account.
Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
Unauthorized. The request lacks a valid bearer token, or the provided token failed to authenticate.
Note: the 401 response is produced by the auth middleware before the
request reaches the endpoint handler, so it does not follow the
standard {errors: [...]} envelope. Instead the body is a bare
{message: string} object with no code, no errors array. Callers
handling 401s should key off the HTTP status and the message string,
not try to destructure an errors[].
Forbidden. The authenticated caller does not have permission to perform this operation.
GET /v1/roles HTTP/1.1
Host: api.integrator.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"_id": "68c1d2e3f4a5b6c7d8e9f0a1",
"_userId": "5f8d43a1b9e5a80011a35f2c",
"name": "Finance tools",
"description": "Read access to finance MCP tools",
"resourceGrants": [
{
"resourceType": "mcpServer",
"_resourceId": "6a1b2c3d4e5f6a7b8c9d0e1f",
"capabilities": [
"pset:6c3d4e5f6a7b8c9d0e1f2a3b"
]
}
],
"createdAt": "2026-07-01T09:15:32Z",
"lastModified": "2026-08-15T14:30:15Z"
}
]Creates a role. Role names must be unique within the account (case-insensitive), and resourceGrants._resourceId values must reference resources owned by the same account. Requires account owner or administrator access.
Writable fields for creating or replacing a role.
Role name, unique within the account (case-insensitive).
Finance toolsFree-text description of the role's purpose.
Read access to finance MCP toolsRole created.
A named, reusable bundle of resource grants. Roles are assigned to end
users directly (_roleIds on the end-user record) or pinned to groups,
and their grants are compiled into each member's effective access.
Unique identifier for the role.
68c1d2e3f4a5b6c7d8e9f0a1Account owner's user id.
5f8d43a1b9e5a80011a35f2cRole name, unique within the account (case-insensitive).
Finance toolsFree-text description of the role's purpose.
Read access to finance MCP toolsTimestamp when the role was created.
2026-07-01T09:15:32ZTimestamp when the role was last updated.
2026-08-15T14:30:15ZBad request. The server could not understand the request because of malformed syntax or invalid parameters.
Unauthorized. The request lacks a valid bearer token, or the provided token failed to authenticate.
Note: the 401 response is produced by the auth middleware before the
request reaches the endpoint handler, so it does not follow the
standard {errors: [...]} envelope. Instead the body is a bare
{message: string} object with no code, no errors array. Callers
handling 401s should key off the HTTP status and the message string,
not try to destructure an errors[].
Forbidden. The authenticated caller does not have permission to perform this operation.
A role with this name already exists in the account.
Unprocessable entity. The request was well-formed but was unable to be followed due to semantic errors.
POST /v1/roles HTTP/1.1
Host: api.integrator.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 211
{
"name": "Finance tools",
"description": "Read access to finance MCP tools",
"resourceGrants": [
{
"resourceType": "mcpServer",
"_resourceId": "6a1b2c3d4e5f6a7b8c9d0e1f",
"capabilities": [
"pset:6c3d4e5f6a7b8c9d0e1f2a3b"
]
}
]
}{
"_id": "68c1d2e3f4a5b6c7d8e9f0a1",
"_userId": "5f8d43a1b9e5a80011a35f2c",
"name": "Finance tools",
"description": "Read access to finance MCP tools",
"resourceGrants": [
{
"resourceType": "mcpServer",
"_resourceId": "6a1b2c3d4e5f6a7b8c9d0e1f",
"capabilities": [
"pset:6c3d4e5f6a7b8c9d0e1f2a3b"
]
}
],
"createdAt": "2026-07-01T09:15:32Z",
"lastModified": "2026-07-01T09:15:32Z"
}Retrieves a single role by ID.
Role ID.
Role details.
A named, reusable bundle of resource grants. Roles are assigned to end
users directly (_roleIds on the end-user record) or pinned to groups,
and their grants are compiled into each member's effective access.
Unique identifier for the role.
68c1d2e3f4a5b6c7d8e9f0a1Account owner's user id.
5f8d43a1b9e5a80011a35f2cRole name, unique within the account (case-insensitive).
Finance toolsFree-text description of the role's purpose.
Read access to finance MCP toolsTimestamp when the role was created.
2026-07-01T09:15:32ZTimestamp when the role was last updated.
2026-08-15T14:30:15ZBad request. The server could not understand the request because of malformed syntax or invalid parameters.
Unauthorized. The request lacks a valid bearer token, or the provided token failed to authenticate.
Note: the 401 response is produced by the auth middleware before the
request reaches the endpoint handler, so it does not follow the
standard {errors: [...]} envelope. Instead the body is a bare
{message: string} object with no code, no errors array. Callers
handling 401s should key off the HTTP status and the message string,
not try to destructure an errors[].
Forbidden. The authenticated caller does not have permission to perform this operation.
Not found. The requested resource does not exist or is not visible to the caller.
GET /v1/roles/{_id} HTTP/1.1
Host: api.integrator.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"_id": "68c1d2e3f4a5b6c7d8e9f0a1",
"_userId": "5f8d43a1b9e5a80011a35f2c",
"name": "Finance tools",
"description": "Read access to finance MCP tools",
"resourceGrants": [
{
"resourceType": "mcpServer",
"_resourceId": "6a1b2c3d4e5f6a7b8c9d0e1f",
"capabilities": [
"tool:all"
]
}
],
"createdAt": "2026-07-01T09:15:32Z",
"lastModified": "2026-08-15T14:30:15Z"
}Replaces the role's writable fields. Prefer resending the complete object — omitted fields are not preserved. Requires account owner or administrator access.
Role ID.
Writable fields for creating or replacing a role.
Role name, unique within the account (case-insensitive).
Finance toolsFree-text description of the role's purpose.
Read access to finance MCP toolsUpdated role.
A named, reusable bundle of resource grants. Roles are assigned to end
users directly (_roleIds on the end-user record) or pinned to groups,
and their grants are compiled into each member's effective access.
Unique identifier for the role.
68c1d2e3f4a5b6c7d8e9f0a1Account owner's user id.
5f8d43a1b9e5a80011a35f2cRole name, unique within the account (case-insensitive).
Finance toolsFree-text description of the role's purpose.
Read access to finance MCP toolsTimestamp when the role was created.
2026-07-01T09:15:32ZTimestamp when the role was last updated.
2026-08-15T14:30:15ZBad request. The server could not understand the request because of malformed syntax or invalid parameters.
Unauthorized. The request lacks a valid bearer token, or the provided token failed to authenticate.
Note: the 401 response is produced by the auth middleware before the
request reaches the endpoint handler, so it does not follow the
standard {errors: [...]} envelope. Instead the body is a bare
{message: string} object with no code, no errors array. Callers
handling 401s should key off the HTTP status and the message string,
not try to destructure an errors[].
Forbidden. The authenticated caller does not have permission to perform this operation.
Not found. The requested resource does not exist or is not visible to the caller.
A role with this name already exists in the account.
Unprocessable entity. The request was well-formed but was unable to be followed due to semantic errors.
PUT /v1/roles/{_id} HTTP/1.1
Host: api.integrator.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 60
{
"name": "Finance tools",
"description": "Updated description"
}{
"_id": "68c1d2e3f4a5b6c7d8e9f0a1",
"_userId": "5f8d43a1b9e5a80011a35f2c",
"name": "Finance tools",
"description": "Read access to finance MCP tools",
"resourceGrants": [
{
"resourceType": "mcpServer",
"_resourceId": "6a1b2c3d4e5f6a7b8c9d0e1f",
"capabilities": [
"tool:all"
]
}
],
"createdAt": "2026-07-01T09:15:32Z",
"lastModified": "2026-08-15T14:30:15Z"
}Soft-deletes the role and removes it from the _roleIds of every group in the account. Requires account owner or administrator access.
Role ID.
Role deleted.
No content
Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
Unauthorized. The request lacks a valid bearer token, or the provided token failed to authenticate.
Note: the 401 response is produced by the auth middleware before the
request reaches the endpoint handler, so it does not follow the
standard {errors: [...]} envelope. Instead the body is a bare
{message: string} object with no code, no errors array. Callers
handling 401s should key off the HTTP status and the message string,
not try to destructure an errors[].
Forbidden. The authenticated caller does not have permission to perform this operation.
Not found. The requested resource does not exist or is not visible to the caller.
DELETE /v1/roles/{_id} HTTP/1.1
Host: api.integrator.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Last updated
Was this helpful?