Important: The following instructions assume you some technical knowledge, and already have a Blueshift account you use for sending campaigns.
Gather the necessary information:
Find your Blueshift API Endpoint, according to your Blueshift region.
Log in to Blueshift, go to the Account Settings page, and copy your Users API Key.
Set up in Coho:
In Coho, create a new HTTP Action.
Choose the right HTTP method and URL, depending on the type of action you want to do. For example, to trigger a campaign, choose
POST
as the method and this URL:https://api.getblueshift.com/api/v1/campaigns/execute
In the payload, enter the appropriate URL Encoded properties, as described in the Blueshift API reference. You can use Coho Variables when crafting the payload, to inject users information, such as email address.
For example, for "Trigger a Campaign", it should look like:{
"_bsft_high_priority": false,
"email": "{{User property - email}}",
"campaign_uuid": "a43b685d-65e3-5303-64d8-d4b4ab075b5f"
}To craft the Basic Authentication header, run the following command in your terminal:
βecho -n '<Users API Key>:' | base64
The output should be a Base64 encoded string, similar to
PFVzZXJzIEFQSSBLZXk+Og==
. Add the following header to the action configuration:{
"Authorization": "Basic PFVzZXJzIEFQSSBLZXk+Og==",
"Content-Type": "application/json",
"Accept": "application/json"
}You can now test the action and save it.