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
Name | Type | Description |
---|---|---|
networkEID | EID | Network EID |
Request body
Name | Type | Description |
---|---|---|
recipients | array | List of recipient objects (currently only user type supported) |
recipients[i].EID | EID | EID of the user |
recipients[i].XID | string | Since 1.3.8: XID of the user. Note that either XID or EID must be set, not both at the same time. |
recipients[i].type | string | user |
localizableBody | object | Localizable message body |
localizableBody.<locale> | string | Body in the language of the RFC 5646/4647 <local> |
appData | string | Since 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
Status | Data |
---|---|
201 | Successful creation: returns a Feedback object |
400 | Invalid data: returns an Error object |
403 | Unauthorized: returns an Error object |
404 | Unknown network: returns an Error object |