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

# Create a Role

`POST /api/v1/roles`

Permissions needed: ACCESS_ADMINISTRATION_SETTINGS
Store Role for a clinic

## Request body

- object — Role Store Request Body. Provide either clinic_id or group_id (mutually exclusive). Use group_id for enterprise group-level roles (requires enterprise admin). Use clinic_id for clinic-local roles.
  - `title` string
  - `clinic_id` integer — The clinic to create the role for. Required if group_id is not provided. Mutually exclusive with group_id.
  - `group_id` integer — The enterprise group to create the role for. Required if clinic_id is not provided. Mutually exclusive with clinic_id. Requires enterprise admin permissions.
  - `permissions_ids` integer[]

## Response `201`

successful operation

- integer — Role Id

## Other responses

- `400` — unresolved $ref
- `401` — unresolved $ref
- `403` — unresolved $ref
- `429` — unresolved $ref

---

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