The Campaign API allows your third-party software to access information relating to all existing Publish campaigns in your Social Media Management organization. In addition, you can also use the Campaign API to create campaigns, update and delete existing campaigns, and add or remove existing stock items in campaigns.
Note:
This article offers an introduction to the Social Media Management Campaign API. For developer information, please visit Social Media Management's API Technical Documentation. Visit our article on Getting Access to Social Media Management APIs for first-time steps.
In this article:
Campaign API endpoints
There are eight endpoints available in the Campaign API:
- Create Campaign
- Get All Campaigns
- Get Campaign by ID
- Get Campaigns by Resource IDs
- Update Campaign
- Delete Campaign
- Add Template to Campaign
- Delete Attachment from Campaign
- Create Campaign
-
Using the Create Campaign endpoint, you can create new Publish campaigns which will appear on the Publish calendar for your organization.
When you’re creating the campaign, you must include the title for the campaign, the color (as it will appear on the calendar), the included Social Media Management teams, the start and end date, and a user to receive a reminder. In addition, you have the option to include a campaign description, time zone, and any existing or new stock items.
- Get All Campaigns
- Use this endpoint to retrieve all existing campaigns. Results can be filtered by teams, time range, and labels. The returned data contains information about the campaign title, description, reminders, assigned teams, labels, and start and end dates.
- Please bear in mind that results will not return the stock items attached to the campaigns.
- Get Campaign by ID
-
The Get Campaign by ID endpoint will return information on any single specific campaign. Please see below for information on how to obtain a particular Campaign ID.
The returned data will contain the campaign title, description, reminders, assigned teams, labels, the start and end dates, and any stock items attached to the campaign.
- Get Campaigns by Resource IDs
-
Find out which campaigns are associated with a particular stock item. Please see below for information on how to obtain the ID of a stock item.
Results will return the name and IDs of any applicable campaigns associated with the stock item.
- Update Campaign
- Using the ID of any existing campaign, you can update the campaign’s title, color on the Social Media Management calendar, teams, the start and end dates, and reminders.
- Delete Campaign
-
Using the ID of any existing campaign, you can choose to delete the Campaign entirely.
- Add Template to Campaign
- Using the ID of a template (stock) item from the Content Pool, you can add it to an existing campaign by specifying the Campaign ID.
- Delete Attachment from Campaign
-
Using both the existing attachment (stock) item ID and the existing Campaign ID, you can use this endpoint to remove the item from the campaign.
Finding a Campaign ID
To update or find information on any specific campaign, you will first need the Campaign ID. There are two ways to find your Campaign ID.
Via the Campaign API
Using the Get All Campaigns endpoint, your results will include information relating to all existing campaigns, including the Campaign ID for each.
Via Social Media Management
In Social Media Management, any user with access to the campaign on the Publish calendar can click to view more information about the campaign. The Campaign ID will be visible in the URL as shown below.
Finding a Stock ID
To use either the Add Template to Campaign or Delete Attachment from Campaign endpoints, you will first need the Stock ID of an existing Stock item. There are two ways to locate an existing Stock ID.
Via the Content Pool API
Using the Search Stocks endpoint of the Content Pool API, you can use various criteria to search through all existing stock items in the Content Pool. Matching results will contain information about each stock item including the Stock ID.
Via Social Media Management
In Social Media Management, any user with access to the Content Pool or any applicable campaigns on the Publish calendar can click to open and view existing stock items. In the editor, the Stock ID will appear in the URL as shown below.
Benefits of the Campaign API
Often used with a Digital Asset Management (DAM) system, you may decide to push content directly from your DAM system directly to a Social Media Management campaign. Once you push assets to your campaigns, content creators may subsequently utilize the assets when creating future posts in Publish.
Accessing technical documentation
For general information about the features of our available APIs, check out our Introduction to APIs section. To view technical documentation for each Social Media Management API, please visit: falconio.docs.apiary.io.