Bulk Change Role

POST https://api.speakap.io/networks/:eid/changeroles

Since

1.0.12

Request

URI:/networks/{networkEID}/changeroles
Method:POST
Accept:application/vnd.speakap.api-v1.8.2+json+hal
Content-Type:application/x-www-form-urlencoded
Authentication:OAuth 2.0

Parameters

Name Type Description
networkEID EID Network EID

Request body

Name Description
memberships Collection
memberships [ EID ] Key is the EID of a user’s network membership. Value its new role.

Example (decoded)

memberships[0123456789ABCEF]=admin&memberships[ABCDEF9087654321]=member

Response

Status code:
200
One or more roles have been successfully changed
400
Bad Request: returns an Error object

Error entity body

The entity body will be a regular error object with the following additional data:

Name Type Description
failed object Failed role changes
failed . EID
EID
string
Key is the EID of a failed role transition.
Value the error message.

Example

{
    "status":"Changed role for 1 membership(s)",
    "data": {
        "failed": {
            "0123456789ABCEF": "Insufficient privileges"
        }
    }
}