Skip to main content

Create a Role

Create a new role.

POST /v1/roles

Parameters

ParameterDescriptionTypeRequired
roleIdA string identifier for the role. A roleId must be composed of alphanumeric chars and/or _, -, ., @, |, and :.JSON bodyyes
nameAn optional, display-friendly name for the role.JSON bodyno
descriptionAn optional description of the role. A useful description might include a summary of the permissions the role grants.JSON bodyno

Request

curl "https://api.warrant.dev/v1/roles" \
-X POST \
-H "Authorization: ApiKey YOUR_KEY" \
--data-raw \
'{
"roleId": "customer-success",
"name": "Customer Success",
"description": "Grants read-only access to customer accounts"
}'

Response

{
"roleId": "customer-success",
"name": "Customer Success",
"description": "Grants read-only access to customer accounts"
}