POST
/
public
/
v1
/
toppie
/
campaigns
[BETA] Create Toppie Campaign
curl --request POST \
  --url https://api.topsort.com/public/v1/toppie/campaigns \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "budget": 10000000000,
  "budgetPeriod": "daily",
  "endDate": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "startDate": "2023-11-07T05:31:56Z",
  "targetRoas": 10.25,
  "targets": [
    "<string>"
  ]
}'
{
  "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "adFormat": "banner",
  "bidCount": 123,
  "budget": 123,
  "budgetPeriod": "daily",
  "chargeType": "CPM",
  "createdAt": "2023-11-07T05:31:56Z",
  "currencyCode": "USD",
  "endDate": "2023-11-07T05:31:56Z",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "isActive": true,
  "name": "<string>",
  "startDate": "2023-11-07T05:31:56Z",
  "targetRoas": 10.25
}

Authorizations

Authorization
string
header
required

A valid API key generated in Topsort's UI.

Body

application/json

Campaign fields to create a new agency campaign.

budget
integer
required

Total budget for this campaign, to be distributed across marketplaces

Required range: 0 < x < 20000000000
name
string
required

Campaign name, this will be propagated to campaigns in marketplaces

Required string length: 1 - 75
targetRoas
number
required

Target ROAS for the campaign

Required range: 0.5 <= x <= 20
targets
string[]
required

List of targets for the campaign

budgetPeriod
enum<string>

The periodicity of the budget

Available options:
daily,
weekly,
monthly,
total
endDate
string<date-time>

Date when to stop the campaign, specified in RFC 3339, if not set the campaign will never stop. This date must be greater than the start date and must be in the future. Must include the Timezone definition.

startDate
string<date-time>

Date when to start the campaign, specified in RFC 3339, if not set that campaign will start immediately after the campaign creation. Must include the Timezone definition.

Response

Successful Response

Represents a public version of an agency campaign, used in API responses.

accountId
string<uuid>
required

Account that owns this campaign

adFormat
enum<string>
required

The ad format for this campaign

Available options:
banner,
listing
budget
integer
required

Total budget for this campaign

budgetPeriod
enum<string>
required

The periodicity of the budget

Available options:
daily,
weekly,
monthly,
total
chargeType
enum<string>
required

The charge type for this campaign

Available options:
CPM,
CPC,
CPA
createdAt
string<date-time>
required

Date and time when the campaign was created

currencyCode
string
required

Currency code this campaign is working with in ISO 4217 format

Example:

"USD"

endDate
string<date-time>
required

Date when the campaign ends, specified in RFC 3339. Must include the Timezone definition.

id
string<uuid>
required

Internal identifier for the agency campaign

isActive
boolean
required

Flag to indicate if the campaign is active or not

name
string
required

Campaign name

startDate
string<date-time>
required

Date when the campaign starts, specified in RFC 3339. Must include the Timezone definition.

targetRoas
number
required

Target ROAS for the campaign

Required range: 0.5 <= x <= 20
bidCount
integer

Bid count for the campaign (optional)