---
title: "Create a permission"
method: POST
path: "/permissions"
tags: ["Permissions"]
---

# Create a permission

`POST /permissions`

## Request

- Base URL: `https://api-staging.fanheroapi.com`
- URL: `https://api-staging.fanheroapi.com/permissions`
- Auth: API key in header `apiKey`

## Headers

- `organization` string, required

## Request body

- CreatePermissionInput
  - `name` string, required: Permission name
  - `description` string, required: Description of the permission
  - `subject` ObjectId, required
  - `actions` string[], required: The actions that this permission allows to be performed on the subject

## Response `201`

Permission created

- PermissionDto
  - `id` string, required: Permission ID
  - `name` string, required: Permission name
  - `description` string, required: Permission description
  - `subject` SubjectDto, required
    - `id` string: Subject ID
    - `fields` string[]: Fields
    - `entity` string: Entity identified by this subject
  - `actions` string[], required: The actions that this permission allows to be performed on the subject

---

[API](https://skmtc.dev/fanhero/apis/user-management-endpoints.md) - [All operations](https://skmtc.dev/fanhero/apis/user-management-endpoints/llms.txt) - [OpenAPI document](https://skmtc.dev/fanhero/apis/user-management-endpoints/revisions/3f982670c057?raw)
