---
title: "Create role"
method: POST
path: "/roles"
tags: ["product:chat"]
---

# Create role

`POST /roles`

Creates custom role

## Request body

- CreateRoleRequest, nullable
  - `name` string, required — Role name

## Response `201`

Response

- CreateRoleResponse, nullable — Basic response information
  - `duration` string, required — Duration of the request in milliseconds
  - `role` Role, required
    - `created_at` string, date-time, required — Date/time of creation
    - `custom` boolean, required — Whether this is a custom role or built-in
    - `name` string, required — Unique role name
    - `scopes` string[], required — List of scopes where this role is currently present. `.app` means that role is present in app-level grants
    - `updated_at` string, date-time, required — Date/time of the last update

## Other responses

- `400` — Bad request
- `429` — Too many requests

---

[API](https://skmtc.net/getstream/apis/stream-api.md) · [All operations](https://skmtc.net/getstream/apis/stream-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getstream/stream-api/versions/8d5c27f1f6b2/schema)
