---
title: "Add a role"
method: POST
path: "/authorization/roles"
tags: ["Roles", "Permissions", "RBAC", "Authorization"]
---

# Add a role

`POST /authorization/roles`

This endpoint can be used to add a new role to the Splinter Role-based
authorization system. The role must conform to the role schema and have
unique "role_id" value.

This endpoint requires the permission "authorization.rbac.write".

## Headers

- `Authorization` string, required
- `SplinterProtocolVersion` integer

## Request body

- Role
  - `role_id` string — Unique identifier for the role
  - `display_name` string — A human readable name of the role.
  - `permissions` string[] — An array of permissions included with this role.

## Response `200`

The role was successfully added

## Other responses

- `400` — The request was malformed or the role was invalid
- `401` — The client is unauthorized
- `500` — An internal server error occurred

---

[API](https://skmtc.dev/cargill/apis/splinterd-api.md) · [All operations](https://skmtc.dev/cargill/apis/splinterd-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cargill/splinterd-api/revisions/38a272c24bd9/schema)
