Create user-defined Role (since 1.0.12)
CUSTOM-ENDPOINT
POST https://api.speakap.io/networks/:eid/roles/
CUSTOM-REQUEST
- URI: /networks/{networkEID}/roles/
- Method: POST
- Content-Type: application/json
- Authentication: OAuth 2.0
Parameters
Name | Type | Description |
---|---|---|
networkEID | EID | Network EID |
Request Body
Supply a JSON resource consisting of a role name and a set of permissions.
Examples
Note that roleType
will always automatically be set to user_defined
for roles created via this endpoint.
{
"name": "HR Manager",
"permissions": [
"...",
"view_group",
"view_user",
"view_membership",
"view_profile",
"..."
]
}
Response
Status | Data |
---|---|
202 | Accepted for insertions: returns a Feedback object |
400 | Invalid data: returns an Error object |
403 | Unauthorized: returns an Error object |
404 | Unknown network: returns an Error object |
409 | Role with the same name exists: returns an Error object |