AdUnits

Operations related to ad unit resources. This is only for Node customers.

You can generate and copy your API key from your account dashboard: https://app.pubstack.io/settings/api-keys

Get all ad units

get
Authorizations
x-api-keystringRequired

You can generate and copy your API key from your account dashboard: https://app.pubstack.io/settings/api-keys

Query parameters
pageinteger · min: 1Optional

Page number (≥ 1)

Default: 1
limitinteger · min: 1 · max: 100Optional

Number of items per page (1–100)

Default: 10
sortBystringOptional

Sort field

Default: name
sortOrderstring · enumOptional

Sort order

Default: ascendingPossible values:
searchstringOptional

Free text search term

Responses
200

Paginated list of ad units

application/json
Responseall of
get
/pbs/adunits
GET /public/v1/pbs/adunits HTTP/1.1
Host: api.pubstack.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "id": "text",
      "name": "text",
      "env": "s2s"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 1,
    "total": 1,
    "totalPages": 1
  }
}

Create a new ad unit

post
Authorizations
x-api-keystringRequired

You can generate and copy your API key from your account dashboard: https://app.pubstack.io/settings/api-keys

Body
namestring · min: 1Required

Ad unit's name

Responses
post
/pbs/adunits
POST /public/v1/pbs/adunits HTTP/1.1
Host: api.pubstack.io
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "name": "text"
}
{
  "id": "text",
  "name": "text",
  "env": "s2s"
}

Update an ad unit

put
Authorizations
x-api-keystringRequired

You can generate and copy your API key from your account dashboard: https://app.pubstack.io/settings/api-keys

Path parameters
adunitIdstringRequired
Body
namestring · min: 1Required

Ad unit's name

Responses
200

Ad unit updated

application/json
Responseone of
or
put
/pbs/adunits/{adunitId}
PUT /public/v1/pbs/adunits/{adunitId} HTTP/1.1
Host: api.pubstack.io
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "name": "text"
}
{
  "id": "text",
  "name": "text",
  "env": "s2s"
}

Last updated