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

NameTypeDescription
networkEIDEIDNetwork EID

Request Body

NameDescription
membershipsCollection
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

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

Error Entity Body

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

NameTypeDescription
failedobjectFailed role changes
failed.[EID]EID or StringKey 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"
        }
    }
}