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

ParameterRequiredData TypeDescription
campaign_idRequiredStringSee campaign identifier
send_idOptionalStringSee send identifier
recipientsOptionalArray of recipient objectsSee recipients object
audienceOptionalConnected audience objectSee connected audience
broadcastOptionalBooleanSee broadcast -- defaults to false on 8/31/17, must be set to true if recipients object is omitted
trigger_propertiesOptionalObjectPersonalization key value pairs for all users in this send; see trigger properties
scheduleRequiredSchedule objectSee 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

KeyDatatypeRequiredDescription
Content-Typestring
Authorizationstring