Skip to main content

Assign a Permission to a Role

Assign a permission to a role. Note that both the permission being assigned and the role the permission is being assigned to must already exist. Refer to the documentation to create a role and create a permission for help.

POST /v1/roles/:roleId/permissions/:permissionId

Parameters

ParameterDescriptionTypeRequired
roleIdThe roleId of the role you want to assign a permission to.URL paramyes
permissionIdThe permissionId of the permission you want to assign to a role.URL paramyes

Request

curl "https://api.warrant.dev/v1/roles/admin/permissions/create-report" \
-X POST \
-H "Authorization: ApiKey YOUR_KEY"

Response

{
"permissionId": "create-report"
}