Campaigns
Calls are made to https://api.footer365.net with an API key as a bearer token. This page is generated from the API's own description, which you can download.
/v1/campaigns
Lists the campaigns the key can see
Every campaign of your organisation the key can see, newest first, in one response, with its status and clicks. draft is set when a change to a running campaign's banner is saved beside the live one, waiting to be published or approved; what goes out is the live banner until then. A key made by an administrator limited to part of the organisation gets no clicks for a campaign aimed at people outside that part. Needs campaigns.read.
Answers 200 with CampaignList.
/v1/campaigns/{id}
Reads one campaign
One campaign: its status, dates, the rules it is aimed at and its clicks. Needs campaigns.read.
| Parameter | In | Type | About it |
|---|---|---|---|
id | path | string (uuid) | The campaign's id. |
Answers 200 with CampaignDetail.
/v1/campaigns/{id}/pause
Pauses a running campaign
Pauses an active campaign, as the Pause button on the Campaigns page does, so its banner stops going out until it is resumed. Pausing a paused campaign changes nothing; any other status is refused with campaign_not_running. A draft of its banner is left as it is. A key made by an administrator limited to part of the organisation can only pause a campaign aimed wholly inside that part, and is refused with campaign_outside_scope for any other. Needs campaigns.write.
| Parameter | In | Type | About it |
|---|---|---|---|
id | path | string (uuid) | The campaign's id. |
Answers 200 with CampaignChange.
/v1/campaigns/{id}/resume
Resumes a paused campaign
Turns a paused campaign back on, as the Activate button on the Campaigns page does, with the same checks: refused with campaign_refused while its link is listed as unsafe or the account is flagged, and its links are checked with Google first when that was not done in the last day. Resuming an active campaign changes nothing; any other status is refused with campaign_not_paused. It resumes with its live banner: a draft of the banner is never published here, and still needs publishing, or approval where its folder requires it, in the portal. A key made by an administrator limited to part of the organisation has the same limit as for pausing. Needs campaigns.write.
| Parameter | In | Type | About it |
|---|---|---|---|
id | path | string (uuid) | The campaign's id. |
Answers 200 with CampaignChange.
Types
CampaignList
| Property | Type | About it |
|---|---|---|
items |
array of CampaignDetail | Each campaign, newest first. |
CampaignDetail
| Property | Type | About it |
|---|---|---|
id |
string (uuid) | The campaign's id. |
name |
string | Its name. |
status |
string | draft, scheduled, active, paused or ended. |
startsAt |
string (date-time) | When it starts, in UTC. |
endsAt |
string (date-time), or null | When it ends, in UTC, or null for no end. |
stoppedForUnsafeLink |
boolean | Whether it is stopped because its link is listed as unsafe, which only replacing the link lifts. |
targetRuleIds |
array of string (uuid) | The rules it is aimed at; empty means none. |
clicks |
integer, or null | The clicks on its links so far; null for a key made by an administrator limited to part of the organisation when the campaign is aimed at people outside that part. |
folder |
ApiFolder, or null | |
createdAt |
string (date-time) | When it was made, in UTC. |
draft |
ApiDraft, or null |
CampaignChange
| Property | Type | About it |
|---|---|---|
changed |
boolean | False when the campaign was already as asked, so nothing was changed. |
notice |
string, or null | Something to know although it was changed, such as a link that could not be checked yet, or null. |
campaign |
CampaignDetail | The campaign as it now is. |
ApiFolder
| Property | Type | About it |
|---|---|---|
id |
string (uuid) | The folder's id. |
name |
string | The folder's name. |
ApiDraft
| Property | Type | About it |
|---|---|---|
status |
string | Where it stands: draft, awaiting_approval or scheduled. |
savedAt |
string (date-time) | When it was last saved, in UTC. |
publishAt |
string (date-time), or null | When it is set to publish, in UTC, or null. |
Errors are written the same way for every call; see Errors. Answers may gain fields within a version, so ignore any you do not recognise.