Skip to content

Create Role

Create a new role for the target path. The authenticated user must have ADMIN permissions for the targetPath.

Parameters

name * are required parametersdata typedescription
body.name*stringThe display name for the role
body.descriptionstringA description of the role and its intended use
body.permissionsstring[]Array of permission keys assigned to this role

Return Value

The created role object.

Error Codes

  • 400 Bad Request: Returned when parameters are invalid.
  • 401 Unauthorized: Returned when permissions are insufficient.

Examples

bash
curl -X POST "https://app.wombat.software/api/{targetPath}/role" \
  -H "Content-Type: application/json" \
  -H "Authentication: Bearer ..." \
  -d '{"name": "Site Manager", "permissions": ["READ", "MANAGE_FORM"]}'

ENDPOINTS

post/api/{targetPath}/role