Use the event-controller method to retrieve an event that triggers sending a broadcast to the specified client at a scheduled time.
URL
To retrieve an event that triggers sending a broadcast, you need to send a POST request to the following URL address: POST /api/event/schedule/
Example
{ "name": "NY Broadcast", "type": "Completed order", "version": "1", "subscriberFilter": { "address": "79000000000", "type": "PHONE" }, "data": { "additionalProp1": { "prop 1" }, "additionalProp2": { "prop 2" }, "additionalProp3": { "prop 3" } }, "startTime": "2021-12-01T13:59:17.511Z" }
Request Format
Parameter | Data type | Description |
name | string | Event name in free form |
type | string | Event type (for example, “completed order”, “scheduling appointment”, etc.) |
version | string | Event version |
subscriberFilter | object | Recipient of the message: a client’s ID in edna Pulse, their phone number, or ID in InstagramsubscriberFilter consists of the following parameters: address and type . Consequently, type can be ID , PHONE , and INSTAGRAM_ID , and address is the value depending on the type (so, for example, if type is PHONE , address will be the client’s phone number). Example:"subscriberFilter": { |
address | string | Value depending on type |
type | string | Type of the client’s identifier: ID , PHONE , or INSTAGRAM_ID |
ID | string | Client’s identifier in edna Pulse database. It is generated automatically when you create/upload a client to the system. The identifier is displayed in the URL on the Edit client page, for example, 3314 in https://app.edna.io/audience/3314/edit |
PHONE | string | Client’s phone number |
INSTAGRAM_ID | string | Client’s 16-digit identifier in Instagram. It is generated automatically by Meta when the client contacts the company’s Instagram business account. The value can be different and can change for the same Instagram client. |
data | string | Event data in free form |
additionalProp | string | Event attribute in free form |
startTime | string | The time when the event is scheduled to be processed by edna; displays in the ISO 8601 format. For example, if you enter the time that is an hour later than the current time, edna will save the event immediately but will only process it at the time you specify. |
Response Format
As a response to the request from your server, the status with code 200
must be returned.