Headers

  • X-PLANNR-ACCOUNT-UUID string
application/json

Body

  • name string Required

    The name of the role.

    Maximum length is 255.

  • description string

    A description of the role.

    Maximum length is 255.

  • permissions array[string] Required

    An array of permissions in the format "resource:verb".

Responses

  • 401 application/json
    Hide response attribute Show response attribute object
    • message string
POST /api/v2/roles
curl \
 --request POST 'https://api.plannrcrm.com/api/v2/roles' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --header "X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}" \
 --data '{"name":"Admin Role","description":"Full administrative access","permissions":["network:read","firm:read","firm:update"]}'
Request examples
# Headers
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}

# Payload
{
  "name": "Admin Role",
  "description": "Full administrative access",
  "permissions": [
    "network:read",
    "firm:read",
    "firm:update"
  ]
}
Response examples (401)
{
  "message": "Unauthenticated."
}