Send an Announcement to a group of contacts. selection_type must be one of: tags, saved-searches, or phone_numbers. Variables are supported.
Also supported on this endpoint:
- Send an Announcement to Uploaded Contacts —
selection_type: csvwithrecipients.csv_data(base64 CSV). - Schedule an Announcement — set
scheduled: trueandmass_text.timestamp(unix seconds).
POST
/api/announcements.json
curl \
--request POST 'https://application.textline.com/api/announcements.json' \
--header "Content-Type: application/json" \
--data '{
"selection_type": "tags",
"recipients": {
"tag": "VIP"
},
"mass_text": {
"group_uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369",
"comment_body": "Test announcement",
"title": "Test"
}
}'
Request examples
Send announcement by tag
{
"selection_type": "tags",
"recipients": {
"tag": "VIP"
},
"mass_text": {
"group_uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369",
"comment_body": "Test announcement",
"title": "Test"
}
}
{
"selection_type": "csv",
"recipients": {
"csv_data": "bmFtZSxwaG9uZSBudW1iZXIsY3VzdG9tX21lc3NhZ2UKdGV4dGxpbmUsNDE1ODQ5NDM0OSxob3cgdG8gZW5jb2RlIHlvdXIgQ1NW"
},
"mass_text": {
"group_uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369",
"comment_body": "Hi {{upload.name}}, This is a test announcement about {{upload.custom_message}}",
"title": "Test"
}
}
{
"selection_type": "saved-searches",
"recipients": {
"saved_search_uuid": "44db893e-cf20-4279-96c7-60abb8a43b61"
},
"mass_text": {
"group_uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369",
"comment_body": "Test announcement",
"title": "Test",
"timestamp": "1598991000"
},
"scheduled": true
}
Response examples (200)
{
"authorized": "true"
}