Skip to main content
POST
/
public
/
v1
/
campaign-service
/
campaigns
/
{campaign-id}
/
bids
Create Campaign Bids
curl --request POST \
  --url https://api.topsort.com/public/v1/campaign-service/campaigns/{campaign-id}/bids \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "bids": [
    {
      "amount": 1,
      "location": "Santiago",
      "target": {
        "id": "p_8983",
        "type": "product"
      },
      "trigger": {
        "type": "<string>",
        "value": {
          "words": [
            "<string>"
          ],
          "matchType": "exact"
        }
      },
      "triggers": [],
      "formatProperties": {
        "bannerAssets": [
          {
            "url": "<string>",
            "contentType": "image/png",
            "dimensions": {
              "width": 1920,
              "height": 1080
            },
            "size": 123,
            "assetId": "asset_01j713j64yfsvtj4bs3ccpy5ca",
            "content": {},
            "jsonTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
          }
        ],
        "slotId": "<string>",
        "deviceType": "desktop",
        "adFormat": "<string>"
      }
    }
  ]
}'
{
  "hasMore": true,
  "next": {
    "offset": 123,
    "limit": 123
  },
  "bids": [
    {
      "bidId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "amount": 1,
      "target": {
        "id": "p_8983",
        "type": "product"
      },
      "isActive": true,
      "trigger": {
        "type": "<string>",
        "value": {
          "words": [
            "<string>"
          ],
          "matchType": "exact"
        }
      },
      "triggers": [
        {
          "type": "<string>",
          "value": {
            "words": [
              "<string>"
            ],
            "matchType": "exact"
          }
        }
      ],
      "location": "Santiago",
      "bidsBehaviorData": "<string>",
      "campaignId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "formatProperties": {
        "bannerAssets": [
          {
            "url": "<string>",
            "contentType": "image/png",
            "dimensions": {
              "width": 1920,
              "height": 1080
            },
            "size": 123,
            "assetId": "asset_01j713j64yfsvtj4bs3ccpy5ca",
            "content": {},
            "jsonTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
          }
        ],
        "slotId": "<string>",
        "deviceType": "desktop",
        "adFormat": "<string>"
      },
      "state": "active"
    }
  ]
}

Authorizations

Authorization
string
header
required

A valid API key generated in Topsort's UI.

Path Parameters

campaign-id
string<uuid>
required

The ID of the campaign.

Query Parameters

skip_existing_bids
boolean
default:false

Skip creating bids that already exist. Existing bids will not be updated and will not be returned in the response.

Body

application/json
bids
BidCreate · object[]
required

An array of bids to be created.

Required array length: 1 - 500 elements

Response

Successful Response

The public response body of the bids endpoints.

hasMore
boolean
required

Whether this is the last page of results or not.

bids
Bid · object[]
required

An array of bids.

Maximum length: 500
next
object | null

The parameters that should be used to fetch the next page.