---
title: "Create a role"
method: POST
path: "/api/roles"
tags: ["Roles"]
---

# Create a role

`POST /api/roles`

## Request

- Base URL: `https://app.cotool.ai`
- URL: `https://app.cotool.ai/api/roles`
- Auth: HTTP bearer

Create a new role for the current organization

## Request body

- object
  - `name` string, required
  - `description` string

## Response `200`

Successful response

- object
  - `id` string, required
  - `organizationId` string, uuid, required
  - `name` string, required
  - `description` string, nullable, required
  - `createdAt` string, required
  - `updatedAt` string, required
  - `isSystemRole` boolean, required

## Other responses

- `400`: Bad request — input validation failed or the request was malformed
- `401`: Unauthorized — missing or invalid API key / session
- `403`: Forbidden — the authenticated user lacks the required permissions
- `500`: Internal server error

---

[API](https://skmtc.dev/cotool/apis/cotool-api.md) - [All operations](https://skmtc.dev/cotool/apis/cotool-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cotool/apis/cotool-api/revisions/f5abe0add203?raw)
