Skip to main content
POST
Needs campaigns:create, and a role in the workspace that can create campaigns: owners, managers, content managers and content creators can. See Permissions.
Makes a campaign in a workspace. name, start_date and end_date are needed: the start must be in the future and the end after it. Send the answer’s id as a post’s campaign_id when you create or update it.
start_date and end_date are read as UTC, and an offset in them is ignored. The answer gives them in the workspace’s timezone. In a workspace on Europe/London, 2030-03-15 09:00 comes back as 2030-03-15 09:00, but 2030-06-01 09:00 comes back as 2030-06-01 10:00 (British Summer Time); in America/New_York, 2030-03-15 09:00 comes back as 2030-03-15 05:00. Work out the UTC time before you send it.
Leave status out and it follows the dates: SCHEDULED until the start, ACTIVE until the end, then COMPLETED. Send DRAFT or CANCELLED to hold it at that status. Sending SCHEDULED, ACTIVE or COMPLETED changes nothing: the dates decide which of the three it shows. The status only describes the campaign: it doesn’t hold back or send its posts. Campaigns are on paid plans. When the workspace owner is on Free, nothing is saved and the answer is 403 with error: plan_limit_reached and limit: campaigns. The owner’s key gets upgrade_url and upgrade_plan; anyone else’s is told to ask the owner (owner_plan: true, no upgrade_url).

Errors

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
workspace_id
integer
required

The workspace. It must be one the key can reach.

name
string
required
Maximum string length: 255
start_date
string
required

When it starts, like 2030-03-15 09:00, read as UTC. It must be in the future.

end_date
string
required

When it ends, like 2030-03-22 18:00, read as UTC. It must be after start_date.

status
enum<string> | null

DRAFT or CANCELLED holds the campaign at that status. SCHEDULED, ACTIVE and COMPLETED follow the dates whatever you send, so sending one of them only lifts a hold. Left out or null: it follows the dates.

Available options:
DRAFT,
SCHEDULED,
ACTIVE,
COMPLETED,
CANCELLED,
null
description
string | null
Maximum string length: 255

Response

The campaign.

A campaign that groups posts.

id
integer
required

The campaign's id. Send it as a post's campaign_id.

name
string
required
Maximum string length: 255
status
enum<string>
required

SCHEDULED until start_date, ACTIVE until end_date, then COMPLETED: these follow the dates when the campaign is read. DRAFT and CANCELLED are holds set on the campaign, which stay until it is changed. The status only describes the campaign: it doesn't hold back or send its posts.

Available options:
DRAFT,
SCHEDULED,
ACTIVE,
COMPLETED,
CANCELLED
start_date
string
required

When it starts, in the workspace's timezone, as Y-m-d H:i.

end_date
string
required

When it ends, in the workspace's timezone, as Y-m-d H:i.

description
string | null
required
Maximum string length: 255
workspace
object
required

The campaign's workspace, as List workspaces gives it, with no accounts or brand_voice.