---
title: "Create a new custom role"
method: POST
path: "/roles"
tags: ["roles"]
---

# Create a new custom role

`POST /roles`

This operation will create a new custom role.
Requires the privilege [`ROLES_WRITE`](https://www.gremlin.com/docs/user-management/access-control/#privileges)

## Request body

- CreateCustomRoleRequest
  - `name` string, required
  - `description` string
  - `type` 'Company' | 'Team', required
  - `privileges` string[]

## Response `201`

- RoleResponse
  - `key` string
  - `name` string
  - `description` string
  - `type` 'Company' | 'Team'
  - `privileges` string[]

## Other responses

- `400` — Bad arguments
- `401` — Authorization header missing or malformed. Please provide proper credentials in the authorization header.
- `403` — User requires privilege: ROLES_WRITE

---

[API](https://skmtc.net/gremlin/apis/gremlin-api.md) · [All operations](https://skmtc.net/gremlin/apis/gremlin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gremlin/gremlin-api/revisions/36ee938323f0/schema)
