POST /hub/v1/campaigns

Overview

Creates a campaign.

URL Parameters

Name Type Description
name string Required Name of the campaign with a maximum length of 128 characters
description string Required Description of the campaign with a maximum length of 512 characters
campaignCode string Required Unique identifier for the campaign with a maximum length of 36 characters
color string Required Hex color value
favorite boolean Required Determines if the campaign will be flagged as a favorite

Usage

Example Request

Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
POST /hub/v1/campaigns
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN

{
    "name": "Annual Sale 2012",
    "description": "Yearly sale",
    "campaignCode": "annual2012",
    "color": "0000ff",
    "favorite": false
}

Example Response

HTTP/1.1 202 Accepted
{
    "id": "505",
    "createdDate": "2012-12-12T09:59:42",
    "modifiedDate": "2012-12-12T09:59:42",
    "name": "Annual Sale 2012",
    "description": "Yearly sale",
    "campaignCode": "annual2012",
    "color": "0000ff",
    "favorite": false
}
Last Updated: Jun 8, 2021