Add a role
Add a role, with its permissions in the same call.
POST/v1/apps/{appId}/roles
Without tables it reaches no table; tables takes the shape shown in roles.setPermissions. Other roles are untouched. Returns the role and its revision; check what it allows with rules.simulate, without adding anyone.
Requires the schema:write scope. Operation roles.create. MCP tool roles_create. CLI: grid82 roles create (npx grid82).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
appId | string | yes |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | no | Any unique string. Sending the same key with the same request again returns the first response (marked Idempotency-Replayed: true) instead of running it twice. Reusing it for a different request is refused with 409. Kept for 24 hours. Up to 255 characters. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Up to 120 characters. |
description | string | no | Up to 500 characters. |
tables | ”*” or object | no | |
interface | “assigned” or “own” | no | |
automations | “none” or “own” | no |
Response
Success
dataobjectrequiredRefused
errorobjectrequired