To send a message to your users, you will need to create a broadcast. A broadcast can refer to either a SMS message or a push notification and is delivered to subscribers within your mobile contact book.
The following are the three main sections to a broadcast:
- The metadata information, which includes the fields about the broadcast, such as the ID, URL, created date, and so on
- The targeting information, which includes the fields used to identify recipients and craft the message
- The delivery information, which is the metadata about the actual message delivery
Available API Methods
Elements & Attributes
Data Element | Type | Description |
---|---|---|
| Integer | Vibes unique identifier for each broadcast. |
| String | The status of the broadcast. Examples (always lowercase):
|
| String | Unique resource URL for the acquisition campaign. |
| String | The descriptive name of the broadcast message. Example: "First alert message". |
| String | The email address of the person who created the broadcast. |
| String | The application. Example: null, api. |
| Timestamp | The date and time the broadcast is scheduled to be sent. It should be in the ISO 8601 format - for example: 2017-02-16T17:30:00Z. |
| Object | Optional. Include this object if you would like to schedule the message to be sent by time zone. To use this feature, you should have previously collected time zone in a custom field stored in the person record. |
| String | If you are scheduling the broadcast to be sent by time zone, set this to |
| String | If you are sending the broadcast by time zone, use this field to indicate the name of the custom field used to collect users’ time zones. |
| String | The date you’d like the broadcast to be sent. Use yyyy-mm-dd format. |
| String | The time you’d like the broadcast to be sent in the person’s indicated time zone. Use a 24-hour clock and the following format: HH:MM. Example: 17:30 |
| String | If you are sending the broadcast by time zone, this is the time zone that will be used if the person’s time zone is not indicated in a custom field. |
| Object | The targeting information for the broadcast. Examples: |
| String | The text for the SMS or push message, including any custom fields or incentive tags. |
| Object | Object containing short code acting as the sender of the broadcast (if SMS or MMS). |
| String | Short code acting as the sender of the broadcast (if SMS or MMS). |
| String | Country code for sender. Example: +1 |
| String | "SC" for short or long numeric codes; "ANC" for alphanumeric codes. |
| Array | IDs of lists included in the broadcast. |
| String | The base URL for all shortened URLs |
| Boolean | Indicates whether or not the system should auto-shorten URLs in your message. |
| String | SMS or Push |
| Timestamp, String | The information about the broadcast delivery, including recipient_count, send_start_date, and enqueue_completed_date. |
| Timestamp | The date this broadcast was created. It should be in the ISO 8601 format - for example: 2017-04-04T16:06:10Z. |
| Timestamp | The date this broadcast was last updated. It should be in the ISO 8601 format - for example: 2019-05-12T05:09:48Z. |
Entity Examples
The following is the JSON representation of an SMS Broadcast entity within the APIs.
{
"broadcast_id": "1",
"status": "sent",
"name": "First alert message",
"send_scheduled_date": "2017-04-04T16:05:00Z",
"created_by":"user@company.com",
"created_by_application": null,
"targeting": {
"message_template": "This is the 1st message sent to the {{ list_name }} list!",
"short_url_base":"http://vbs.cm/",
"shorten_urls": true,
"channel": "sms",
"source_short_code": null,
"source_lists": [
"A34H2q"
],
"filters": []
},
"delivery": {
"send_start_date": "2017-04-04T16:06:16Z",
"enqueue_completed_date": "2017-04-04T16:06:16Z",
"recipient_count": 1
},
"url": "/companies/:company_key/mobiledb/broadcasts/:broadcast_id",
"created_at": "2017-04-04T16:06:10Z",
"updated_at": "2019-05-12T05:09:48Z"
}
The following is the JSON representation of a Push Broadcast entity within the APIs.
{
"broadcast_id": "2",
"status": "scheduled",
"url": "/api/companies/:company_key/broadcasts/:broadcast_id",
"name": "Test Broadcast SAT 2",
"created_by": "user@company.com",
"created_by_application": "api",
"send_scheduled_date": "2017-02-16T17:30:00Z",
"send_schedule": {
"method": "by_time_zone",
"field_name": "vibes_timezone",
"send_date": "2017-02-16",
"send_time": "17:30",
"default_time_zone": "US/Central"
},
"targeting": {
"message_template": "Push message content",
"shorten_urls": true,
"short_url_base": "http://vbs.cm/",
"source_short_code": "54321",
"source_lists": [
"AB1234Z4",
"LIST12345"
],
"channel": "push",
"push": {
"subject": "Push message title",
"metadata": "App deep link"
},
"filters": [
{
"name": "favorite_sport",
"selector": "any",
"value": [
"football",
"baseball"
]
},
{
"name": "first_name",
"selector": "starts_with",
"value": "Steve"
},
{
"name": "recipient_list",
"selector": "any",
"value": [
"1"
]
},
{
"name": "participant_list",
"selector": "any",
"value": [
"1"
]
},
{
"name": "country",
"selector": "equals",
"value": "US"
},
{
"name": "subscription_date",
"transform": "year",
"selector": "before",
"value": [
"2017"
]
},
{
"name": "birthdate",
"transform": "year",
"selector": "before",
"value": [
"2017"
]
}
]
}
}