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

# Create role

`POST /api/v1/roles`

Create a new role with policies.

## Request body

- RestCreateRoleRequest
  - `description` string
  - `name` string
  - `rolePolicies` RestRolePolicy[]
    - `k8sNamespace` string
    - `permissionKey` 'user.create' | 'user.read' | 'user.permission.update' | 'user.password.reset' | 'user.password.change' | 'role.create' | 'role.read' | 'role.update' | 'role.delete' | 'permission.read' | 'schedule_strategy.create' | 'schedule_strategy.read' | 'schedule_strategy.update' | 'schedule_strategy.delete' | 'schedule_intent.read' | 'schedule_intent.delete' | 'pod_pid_mapping.read' | 'pod_scheduling_metrics.create' | 'pod_scheduling_metrics.read' | 'pod_scheduling_metrics.update' | 'pod_scheduling_metrics.delete' | 'scheduler_config.read' | 'scheduler_config.update' | 'node_scheduling_policy.create' | 'node_scheduling_policy.read' | 'node_scheduling_policy.update' | 'node_scheduling_policy.delete' | 'node_scheduling_intent.read' | 'node_scheduling_intent.delete'
    - `policyNamespace` string
    - `self` boolean

## Response `200`

OK

- GithubComGthulhuApiManagerRestSuccessResponseGithubComGthulhuApiManagerRestEmptyResponse
  - `data` GithubComGthulhuApiManagerRestEmptyResponse
  - `success` boolean
  - `timestamp` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `500` — Internal Server Error

---

[API](https://skmtc.net/gthulhu/apis/manager-service.md) · [All operations](https://skmtc.net/gthulhu/apis/manager-service/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gthulhu/manager-service/versions/a72e72a0d984/schema)
