Skip to main content
Integration with Blueshift API

How to set up and use Blueshift API in playbooks

Updated over 2 months ago

Important: The following instructions assume you some technical knowledge, and already have a Blueshift account you use for sending campaigns.

Gather the necessary information:

  1. Find your Blueshift API Endpoint, according to your Blueshift region.

  2. Log in to Blueshift, go to the Account Settings page, and copy your Users API Key.

Set up in Coho:

  1. In Coho, create a new HTTP Action.

  2. 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

  3. 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"
    }
  4. To craft the Basic Authentication header, run the following command in your terminal:
    ​echo -n '<Users API Key>:' | base64

  5. 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"
    }
  6. You can now test the action and save it.

Did this answer your question?