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.

caution

This endpoint has been deprecated and will be phased out at the end of 2023. Please update any existing usages of it to use the Create Warrant endpoint instead.

Endpoint

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"
}