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": "sidebar-2",
  "dimensions": {
    "desktop": {
      "width": 1,
      "height": 1
    },
    "mobile": {
      "width": 1,
      "height": 1
    }
  },
  "position": "category"
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "externalId": "<string>",
  "position": "landing",
  "page": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "Homepage",
    "url": "https://app.example.com/main",
    "imageUrl": "<string>",
    "marketplaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "marketplaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "dimensions": {
    "desktop": {
      "height": 20,
      "width": 20
    },
    "mobile": {
      "height": 10,
      "width": 10
    }
  },
  "isActive": true
}

Authorizations

Authorization
string
header
required

A valid API key generated in Topsort's UI.

Body

application/json
  • CategoryOrSearchSlotCreateRequest
  • LandingPageSlotCreateRequestItem

Category or search slot create request.

slotId
string
required

The unique external slot ID that represents the slot.

Minimum length: 1
Examples:

"sidebar-2"

dimensions
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 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
object
required

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

Examples:
{
"desktop": { "height": 20, "width": 20 },
"mobile": { "height": 10, "width": 10 }
}
page
object | null

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

isActive
boolean
default:true

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