---
title: "Create Role"
method: POST
path: "/roles"
tags: ["Role"]
---

# Create Role

`POST /roles`

Creates a new role

## Headers

- `tenant-id` string

## Request body

- RoleCreateRequest — Request body for creating a new role
  - `name` string — Role name
  - `description` string — Role description

## Response `201`

Role created successfully

- RoleResponseDto — Role information response
  - `id` string — Role ID
  - `name` string — Role name
  - `tenantId` string — Tenant ID
  - `description` string — Role description
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `createdBy` string — Created by
  - `updatedBy` string — Updated by

## Other responses

- `400` — Bad request - Invalid request data or missing required fields
- `401` — Authentication required - Valid authentication token is missing or invalid
- `403` — Forbidden - User does not have the required permissions to create roles
- `500` — Internal server error - An unexpected error occurred while processing the request

---

[API](https://skmtc.net/certifyos/apis/certify-api-layer.md) · [All operations](https://skmtc.net/certifyos/apis/certify-api-layer/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/certifyos/certify-api-layer/revisions/3d27e9019c7b/schema)
