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

Authorizations

Authorization
string
header
required

A valid API key generated in Topsort's UI.

Body

application/json

Category or search slot create request.

dimensions
object
required

The dimensions of the slot per device type.

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

The unique external slot ID that represents the slot.

Minimum length: 1
Example:

"sidebar-2"

Response

Successful Response

The ad config slot model

dimensions
object
required

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

Example:
{
  "desktop": { "height": 20, "width": 20 },
  "mobile": { "height": 10, "width": 10 }
}
externalId
string
required

The external ID provided by marketplaces.

Minimum length: 1
id
string<uuid>
required

The ID of the ad config slot.

marketplaceId
string<uuid>
required

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

position
enum<string>
required

The position of the ad config slot.

Available options:
landing,
category_search,
category,
search
isActive
boolean
default:true

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

page
object

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