Schedule API Triggered Canvases
POST https://{{instance_url}}/canvas/trigger/schedule/create
Use this endpoint to trigger API Triggered Canvases, which are created on the Dashboard and initiated via the API. You can pass in canvas_entry_properties
that will be templated into the messages sent by the first steps of the Canvas.
This endpoint allows you to schedule Canvas 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 Canvas ID, created when you build a Canvas.
Request Parameters
Parameter | Required | Data Type | Description |
---|---|---|---|
canvas_id | Required | String | See canvas 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 Params
Key | Datatype | Required | Description |
---|---|---|---|
`` | null | ||
`` | null | ||
`` | null | ||
`` | null |
Request Body
{"canvas_id"=>"canvas_identifier", "recipients"=>[{"user_alias"=>"example_alias", "external_user_id"=>"external_user_identifier", "trigger_properties"=>""}], "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 |