---
title: "POST /orgs/{org_id}/iam/roles"
method: POST
path: "/orgs/{org_id}/iam/roles"
tags: ["iam"]
---

# POST /orgs/{org_id}/iam/roles

`POST /orgs/{org_id}/iam/roles`

Create a custom role for the organization.

## Path parameters

- `org_id` string, required

## Request body

- CreateRoleReqBody
  - `description` string, nullable
  - `grants` RoleGrant[] — Grants this role carries. Empty list is allowed (creates a no-op role; admin can extend it later).
    - `action` string, required
    - `condition` unknown
    - `effect` 'allow' | 'deny', required — Effect of a [`RoleGrant`]. `deny` wins at eval time.
    - `resource` string, nullable
  - `name` string, required — Role name. Must be unique within the org. Reserved system names (`admin`, `developer`, `billing`, `member`, `user`) are rejected.

## Response `201`

Role created

- RoleDetail — A role with its full grant set.
  - `created_at` string, date-time, required
  - `description` string, nullable
  - `grants` RoleGrant[], required — Domain grants this role carries. May be empty.
    - `action` string, required
    - `condition` unknown
    - `effect` 'allow' | 'deny', required — Effect of a [`RoleGrant`]. `deny` wins at eval time.
    - `resource` string, nullable
  - `id` string, required
  - `name` string, required
  - `source` 'system' | 'custom', required — Whether a role is a built-in preset or defined by the organization. `system` roles are read-only; `custom` roles can be edited or deleted by an organization admin.
  - `updated_at` string, date-time, required

## Other responses

- `403` — Forbidden
- `409` — A role with that name already exists in the organization
- `422` — Unprocessable entity

## Changes

- **2026-06-05** `45de91fcec33` — 1 info
  - endpoint added
- **2026-03-16** `eb2c08128881` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/timbal-ai/apis/timbal-platform-api/changes/orgs/:org_id/iam/roles/post.md)

---

[API](https://skmtc.dev/timbal-ai/apis/timbal-platform-api.md) · [All operations](https://skmtc.dev/timbal-ai/apis/timbal-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/timbal-ai/timbal-platform-api/revisions/dd7e398ce0d3/schema)
