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

NameTypeDescription
networkEIDEIDNetwork 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

StatusData
202Accepted for insertions: returns a Feedback object
400Invalid data: returns an Error object
403Unauthorized: returns an Error object
404Unknown network: returns an Error object
409Role with the same name exists: returns an Error object