Create Alert (since 1.0.10)

CUSTOM-ENDPOINT

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

Since

1.0.10

CUSTOM-AUTHORIZATION

Permissions: send_alerts

CUSTOM-REQUEST

  • URI: /networks/{networkEID}/alerts/
  • Method: POST
  • Content-Type: application/json
  • Authentication: OAuth 2.0

Parameters

NameTypeDescription
networkEIDEIDNetwork EID

Request body

NameTypeDescription
recipientsarrayList of recipient objects (currently only user type supported)
recipients[i].EIDEIDEID of the user
recipients[i].XIDstringSince 1.3.8: XID of the user. Note that either XID or EID must be set, not both at the same time.
recipients[i].typestringuser
localizableBodyobjectLocalizable message body
localizableBody.<locale>stringBody in the language of the RFC 5646/4647 <local>
appDatastringSince 1.0.10: Optional string of additional data, passed to the app when the user clicks the alert.

Example

{
    "recipients": [
        {
            "EID": "0123456789ABCDEF",
            "type": "user"
        },
        {
            "XID": "NL23_A341",
            "type": "user"
        }
    ],
    "localizableBody": {
        "en-US": "Your test results are in.",
        "nl-NL": "Je testresultaten zijn binnen."
    },
    "appData": "resultId=1241212"
}

Response

StatusData
201Successful creation: returns a Feedback object
400Invalid data: returns an Error object
403Unauthorized: returns an Error object
404Unknown network: returns an Error object