Get Campaigns Types

This returns a list of all available campaign types.

Overview

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

URI

GET: https://rest.bronto.com/campaigns/type

Response

A response containing the campaign with the given ID.

[
  {
    "id":number,
    "name":string,
    "description":string
  }
]

Python Code Example

from __future__ import print_function
 
# Requests documentation:  http://docs.python-requests.org/
import requests
 
 
# API authorization
bronto_access_token = "access token"
session = requests.Session()
session.headers["Authorization"] = "Bearer " + bronto_access_token
 
url = "https://rest.bronto.com/campaigns/type/"
 
response = session.get(url)
 
if response.ok:
    campaign_types = response.json()
    print("campaign types:", campaign_types)
else:
    print("Could not get campaign types (status code={}, content='{}', headers={})".format(
        response.status_code, response.text, response.headers
    ))