Create Campaigns

The campaigns POST function allows you to create a new campaign with the supplied fields.


While id, createdDate, and modifiedDate are given when retrieving a campaign object, they should be left off the POST function body because they are set by the service. The campaignTypeId, name, and archived fields are required. The description field is optional.

On success, a 201 code is returned with the created campaign.

This request requires an access token with “campaigns-read” scope.



Request Body

The data used to create the campaign.

  "campaignTypeId": number,
  "name": string,
  "description": string,
  "archived": boolean


A response containing the newly created campaign.

  "id": number,
  "siteId": number,
  "createdDate": ISO-8601 datetime,
  "modifiedDate": ISO-8601 datetime,
  "campaignTypeId": number,
  "name": string,
  "description": string,
  "archived": boolean

Python Code Example

from __future__ import print_function
# Requests documentation:
import requests
# API authorization
bronto_access_token = "access token"
session = requests.Session()
session.headers["Authorization"] = "Bearer " + bronto_access_token
url = ""
json = { "campaignTypeId": 1, "name": "campaign name", "archived": False }
response =, json=json)
if response.ok:
    campaigns = response.json()
    print("campaign:", campaigns)
    print("Could not post campaign (status code={}, content='{}', headers={})".format(
        response.status_code, response.text, response.headers