Use API keys

This article provides information on how to use API keys to make authentic API requests to our platform.

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>: https://api.getblueshift.com/api/v1/campaigns/execute

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