Skip to main content
POST
/
public
/
v1
/
campaign-service
/
campaigns
/
{campaign-id}
/
restrictions
Create Campaign Restriction
curl --request POST \
  --url https://api.topsort.com/public/v1/campaign-service/campaigns/{campaign-id}/restrictions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "limit": 123,
  "restrictionTypeId": 123
}'
{
  "campaignId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "createdAt": "2023-11-07T05:31:56Z",
  "id": 123,
  "limit": 123,
  "marketplaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "restrictionType": {
    "frequencyType": "daily",
    "id": 123,
    "interactionType": "impressions",
    "level": "campaign"
  },
  "status": "active",
  "updatedAt": "2023-11-07T05:31:56Z"
}

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.

Body

application/json

Limit-based restrictions for a campaign.

limit
integer
required

The limit of the restriction.

restrictionTypeId
integer
required

The type of restriction.

Response

Successful Response

Limit-based restrictions for a campaign.

campaignId
string<uuid>
required

The ID of the campaign.

createdAt
string<date-time>
required

The creation date of the restriction.

id
integer
required

The ID of the restriction.

limit
integer
required

The limit of the restriction.

marketplaceId
string<uuid>
required

The ID of the marketplace.

restrictionType
object
required

The type of restriction.

status
enum<string>
required

The status of the restriction.

Available options:
active,
inactive
updatedAt
string<date-time>
required

The last update date of the restriction.

I