Create a custom role
POST/ v1/ orgs/ {org}/ roles
copy_from (a built-in key or a custom role id) starts the permissions from that role.
Path parameters
org
The organization's id (
org_…).Body
name
description
permissions
copy_from
A built-in role key or a custom role id to start from.
Responses
The new role.
id
A prefixed ULID; the prefix names the kind (
prj_… a project, org_… an organization).name
description
permissions
created_at
A time in UTC, ISO 8601.
updated_at
A time in UTC, ISO 8601.
Example response
1{2"id": "rol_01JD8Q2M4W9XK3T7B5",3"name": "Production",4"description": "string",5"permissions": [6"string"7],8"created_at": "2026-11-21T09:30:00Z",9"updated_at": "2026-11-21T09:30:00Z"10}
Errors
Every error has the same shape: error.code, a message for people and details.
| Status | Code |
|---|---|
role_name_taken | |
validation_error |