Skip to main content
waffle.svg
Domo Knowledge Base

Campaigns API

Version 11

 

Intro

Campaigns supports the ability to start a campaign from a call to an API or by using Domo DataSet Alerts.

Triggering a Campaign from an API Call

Endpoint

The endpoint to call directly to trigger a campaign is:

https://campaigns-prod.domolabs.io/api/v1/campaigns/start

Object

Call a POST event to the endpoint above with the following JSON object:

{
  "campaignId": 0,
  "domoAccessToken": "",
  "domoAccessTokenOwnerEmailAddress": "",
  "emailAddresses": [],
  "instance": ""
  "isTest": false
}
Campaign Id

The id of the campaign you want to start.  You can get the campaign id by editing the campaign and going to the "SETTINGS" tab:

Settings.PNG

 

Domo Access Token

A Domo access token that has been generated in Domo.  You can generate Domo Access Tokens by logging in,  going to the Admin Settings section, going to "Security", and selecting "Access tokens".  There you can simply generate a new access token to use for calls to the API.

AccessToken.PNG

 

Domo Access Token Owner Email Address

The email address of the user who owns the Domo Access Token specified above.

Email Addresses (OPTIONAL)

A list of email addresses the campaign should be delivered to.  If no email addresses are selected, the entire campaign will be started and delivered to all recipients in the distribution list.  These email addresses MUST exist in your distribution list.  If you specify an email address that does not exist in your distribution list, no email will be delivered to that email address.

Instance

You Domo instance (e.g. domo.domo.com). 

Is Test (OPTIONAL)

You can use this flag to send a test Campaign.  This can help you test your Campaign, connection, access token, etc. without actually sending an email to your customers.  This uses the same Test functionality you can find in the Distribution List in Campaigns itself.  Please note that if you set this flag to true, you MUST specify at least 1 email address in the Email Addresses field.  You cannot send a Test Campaign without specifying at least one email address.

Summary
Path https://campaigns-prod.domolabs.io/api/v1/campaigns/start
Since version 1.0
Description Run a campaign and send an email to a everyone in the distribution list OR to a selected list of people
Auth NONE, Roles: anonymous
Produces
application/json
Consumes
application/json
Body object
startcampaign
Response status code
200 - OK
Response object
void