This article provides information on how to use the API keys to integrate your site or app with our platform.

The API that we provide is an easy to use and a fairly flexible way to send data from your site or app to our platform. However, we need to authenticate the incoming requests (also, to protect our resources). :smiley:
Our API is based on REST/JSON and requests to it are authenticated with your API keys. You can use this API to send interaction-stream (events), user information, or your item catalog.

To try API endpoints and get a better sense of how it works, we suggest that you head to the endpoint's API reference documentation. There, you can get code samples that are automatically generated based on your inputs and an option to try the endpoints.

Before you begin

Before you can begin trying the endpoints, you must gather the following information:

  1. Obtain the required API keys.
  2. Find out the API endpoint URL to access the Blueshift API endpoints.

Obtain the API keys

To obtain the API keys, log into the Blueshift app, go to Account Settings and then to the API keys tab.

You can obtain the following API keys, based on your role:

  • Event API key (EVENT_API_KEY)
  • Users API key (USER_API_KEY). The User API keys are visible only to admin users.
  • S3 folder access key

Identify the API endpoint URL to access the Blueshift API endpoints

Ensure that you use the correct URL to access the Blueshift API endpoints. The API endpoint URL depends on the Blueshift region for your Blueshift app.

  • API endpoint URL for the EU region -
  • API endpoint URL for the Rest of the world -

When you try the API endpoints, you must set the Base URL to the correct API endpoint URL.

Using the API keys

When you try to access an API endpoint to either send data or generate a report, you have to pass one of the API keys so that we know that an incoming request comes from an authorized source.

For example, the sample API call to trigger a campaign looks like:

curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '
    "email": "<EMAIL ADDRESS>",
    "campaign_uuid": "<CAMPAIGN UUID>",
    "attribute 1": "<abc>",
    "attribute 2": "<xyz>"
  }' -u <USER API KEY>: