Schedule API Triggered Campaigns
POST https://{{instance_url}}/campaigns/trigger/schedule/create
Use this endpoint to trigger API Triggered Campaigns, which are created on the Dashboard and initiated via the API. You can pass in trigger_properties
that will be templated into the message itself.
This endpoint allows you to send Campaign messages (up to 90 days in advance) via API Triggered delivery, allowing you to decide what action should trigger the message to be sent. Please note that to send messages with this endpoint, you must have a Campaign ID, created when you build an API Triggered Campaign.
Request Parameters
Parameter | Required | Data Type | Description |
---|---|---|---|
campaign_id | Required | String | See campaign identifier |
send_id | Optional | String | See send identifier |
recipients | Optional | Array of recipient objects | See recipients object |
audience | Optional | Connected audience object | See connected audience |
broadcast | Optional | Boolean | See broadcast -- defaults to false on 8/31/17, must be set to true if recipientsobject is omitted |
trigger_properties | Optional | Object | Personalization key value pairs for all users in this send; see trigger properties |
schedule | Required | Schedule object | See schedule object |
Request Components
Request Body
{"campaign_id"=>"campaign_identifier", "send_id"=>"send_identifier", "recipients"=>[{"user_alias"=>"example_alias", "external_user_id"=>"external_user_identifier"}], "audience"=>{"AND"=>[{"custom_attribute"=>{"custom_attribute_name"=>"eye_color", "comparison"=>"equals", "value"=>"blue"}}, {"custom_attribute"=>{"custom_attribute_name"=>"favorite_foods", "comparison"=>"includes_value", "value"=>"pizza"}}, {"OR"=>[{"custom_attribute"=>{"custom_attribute_name"=>"last_purchase_time", "comparison"=>"less_than_x_days_ago", "value"=>2}}, {"push_subscription_status"=>{"comparison"=>"is", "value"=>"opted_in"}}]}, {"email_subscription_status"=>{"comparison"=>"is_not", "value"=>"subscribed"}}, {"last_used_app"=>{"comparison"=>"after", "value"=>"2019-07-22T13:17:55+0000"}}]}, "broadcast"=>false, "schedule"=>{"time"=>"", "in_local_time"=>false, "at_optimal_time"=>false}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Authorization | string |