post
https://ads-dev.aylanetworks.com/apiv1/triggers//trigger_apps.json
This API creates a trigger app associated with the specified trigger. The API supports the following request data objects: email, sms, forward, push_ios, push_android, and push_baidu. See the request examples below.
Note on forward: A forwarding trigger app posts json-formatted device, property, and custom data to the given REST API endpoint. The request data object sent to the specified endpoint resembles the following:
{
"device": {
"dsn": "AC000W000000001",
"product_name": "Device 1"
},
"property": {
"name": "my_prop",
"base_type": "integer",
"value": "25",
"data_updated_at": "2019-09-20T19:02:04Z"
},
"data": "custom text"
}
| Name | Type | Description |
|---|---|---|
| name | string (255 chars) | email, sms, forward, push_ios, push_android, push_baidu |
| nickname | string (255 chars) | Name of Trigger App |
| username | string (255 chars) | email greeting |
| repeat_freq | integer (default=30) | repeat interval in seconds |
| param1 | string (255 chars) | name-dependent |
| param2 | string (255 chars) | name-dependent |
| param3 | string (255 chars) | name-dependent |
| param4 | string (255 chars) | name-dependent |
| param5 | string (255 chars) | name-dependent |
| contact_id | integer | Ayla contact id of sender. See the getContact API. |
| push_sound | string (255 chars) | mps sound file name |
| push_mdata | string (255 chars) | metadata key/value pairs: "key1:value1, key2:value2" |
| email_template_id | string (255 chars) | ID of custom email template |
| email_subject | string (255 chars) | Email subject line |
| email_body_html | string (255 chars) | Email body with template tags |
| requires_acceptance | boolean (default=false) | true=enables acceptance flow for SMS applications |
