Skip to main content
POST
/
public
/
v1
/
media-service
/
slots
Create Slot
curl --request POST \
  --url https://api.topsort.com/public/v1/media-service/slots \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "slotId": "<string>",
  "dimensions": {
    "desktop": {
      "width": 123,
      "height": 123
    },
    "mobile": {
      "width": 123,
      "height": 123
    }
  },
  "position": "category"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "externalId": "<string>",
  "position": "landing",
  "marketplaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "dimensions": {},
  "page": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "url": "<string>",
    "marketplaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "imageUrl": "<string>"
  },
  "isActive": true
}

Authorizations

Authorization
string
header
required

A valid API key generated in Topsort's UI.

Body

application/json

Category or search slot create request.

slotId
string
required

The unique external slot ID that represents the slot.

Minimum string length: 1
dimensions
SlotCreateRequestDimensions · object
required

The dimensions of the slot per device type.

position
enum<string>
required
Available options:
category,
search

Response

Successful Response

The ad config slot model

id
string<uuid>
required

The ID of the ad config slot.

externalId
string
required

The external ID provided by marketplaces.

Minimum string length: 1
position
enum<string>
required

The position of the ad config slot.

Available options:
landing,
category_search,
category,
search
marketplaceId
string<uuid>
required

The ID of the marketplace that the ad config slot belongs to.

dimensions
Dimensions · object
required

The slot dimensions. There can be at most one dimension for each device type.

page
AdConfigPage · object

The page that the ad config slot belongs to. Only 'landing' slots can belong to a page.

isActive
boolean
default:true

Indicates whether the ad config slot is active. If false, the slot cannot be used in campaigns.