Bulk Change Role (since 1.0.12)
CUSTOM-ENDPOINT
POST https://api.speakap.io/networks/:eid/changeroles
CUSTOM-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 | Data |
---|
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 or 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"
}
}
}