POST
/
v2
/
offsite-ads
/
campaigns
curl --request POST \
  --url https://api.topsort.com/v2/offsite-ads/campaigns \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "budget": 123,
  "dsp": "google_ads",
  "endDate": "2023-11-07T05:31:56Z",
  "locationIds": [
    "<string>"
  ],
  "name": "<string>",
  "productIds": [
    "<string>"
  ],
  "startDate": "2023-11-07T05:31:56Z"
}'
{
  "jobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
budget
integer
required

The campaign budget in minor currency units.

dsp
enum<string>
required
Available options:
google_ads,
meta
locationIds
string[]
required

List of location IDs to target.

name
string
required

The name of the campaign.

startDate
string
required

The start date and time of the campaign (UTC).

endDate
string

The end date and time of the campaign (UTC), optional.

productIds
string[]

List of product IDs to target, optional.

Response

202
application/json
Successful Response
jobId
string
required

The unique identifier for the queued job.