1. Authorization

1.1. Login

This `POST` request will return result login and token

1.1.1. Request Body

Path Type Description Required

email

string

User email

+

password

string

User password

+

1.1.2. HTTP Request

URL

POST api/users/login HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
DATA
{
    "email": "test@example.org",
    "password": "password"
}

1.1.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/users/login' -i -X POST \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
    -d '{
    "email": "test@example.org",
    "password": "password"
}'

1.1.4. Response Body

Path Type Description

access_token

string

This token is used in queries. HEADER: "Authorization: Bearer <this token>"

token_type

string

Token type

expires_in

int

Time token live in seconds

1.1.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    X-ratelimit-limit: 10
    X-ratelimit-remaining: 9
    Access-control-allow-origin: *
{
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMvYXBpL3VzZXJzL2xvZ2luIiwiaWF0IjoxNzMxNDEyNTE3LCJleHAiOjE3MzE0MTYxMTcsIm5iZiI6MTczMTQxMjUxNywianRpIjoiRVJ0SXdQZGhYQURjYnNHZiIsInN1YiI6IjIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.OulWLIpMwG_Lqv3nXGdqd48uccSb8QQxmZuWLAAoFAE",
    "token_type": "bearer",
    "expires_in": "60"
}

1.2. Log out

A `POST` request will return result logout

1.2.1. HTTP Request

URL

POST api/logout HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTcsImV4cCI6MTczMTQxNjExNywibmJmIjoxNzMxNDEyNTE3LCJqdGkiOiJZZEk2TElGcEtKNnNwUTlMIiwic3ViIjoiMyIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.6Hgpv64NL-b4LSq4RXBMxAvqafTRHzEdCayk-z3NPyc
DATA
{}

1.2.2. Curl request

$ curl 'https://dsp-api.smartyads.com/api/logout' -i -X POST \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTcsImV4cCI6MTczMTQxNjExNywibmJmIjoxNzMxNDEyNTE3LCJqdGkiOiJZZEk2TElGcEtKNnNwUTlMIiwic3ViIjoiMyIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.6Hgpv64NL-b4LSq4RXBMxAvqafTRHzEdCayk-z3NPyc' \
    -d '{}'

1.2.3. Response Body

Path Type Description

message

string

Result message

1.2.4. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
{
    "message": "Successfully logged out"
}

2. Statistic

2.1. Statistic

A `POST` request will return statistic.

2.1.1. Request Body

Path Type Description Required

timezone

integer

Timezone
"Etc/GMT+12"…​"Etc/GMT+1", "Etc/GMT", "Etc/GMT-1"…​"Etc/GMT-12" \n"America/Anchorage"…​"Europe/Istanbul", "Asia/Tokyo"

from

date

Start date (yyyy-mm-dd)

+

to

date

End date (yyyy-mm-dd)

+

groupBy

array

Grouping fields:
YMD - Date
YMDH - Date time. Period: 2 days max
campaignId - Campaign
creativeId - Creative
country - Country
connectionType - Connection Type
carrier - Carrier
sspId - Ssp
region - Region
city - City
browser - Browser
os - Device OS
appName - App Name
siteName - Domain Name
source - Source
originalPubId - Publisher Id
sitePage - Site Page
trafficType - Media Type
requestType - Traffic Type
deviceType - Mobile Type
language - Language
size - Width x Height
isPmpReq - Pmp

+

agregatedFields

array

Agregated fields:
bids - Bids
wins - Wins
impressions - Impressions
clicks - Clicks
conversions - Conversions
reach - Reach
dspSpend - Spend
ecpm - eCPM
ecpc - eCPC
ctr - CTR
winrate - Win Rate

+

orderField

string

Sorting field

orderDir

string

Sort order: "asc" or "desc"

page

integer

Pagination: page number

rowsOnPage

integer

Pagination: rows on page (min:10, max:50000)

2.1.2. HTTP Request

URL

POST api/statistic HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjEsImV4cCI6MTczMTQxNjEyMSwibmJmIjoxNzMxNDEyNTIxLCJqdGkiOiJ2TXRKWVJqc1BMNHBETEYxIiwic3ViIjoiNDYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.Oti9tHQlaJQNJtU1uE3HB0MK3fkJtqfILahlWUNHOww
DATA
{
    "timezone": "Etc\/GMT+10",
    "from": "2024-11-10",
    "to": "2024-11-12",
    "groupBy": [
        "YMD",
        "campaignId",
        "creativeId"
    ],
    "agregatedFields": [
        "bids",
        "wins",
        "impressions",
        "clicks",
        "dspSpend",
        "winrate",
        "ctr"
    ],
    "orderField": "YMD",
    "orderDir": "desc",
    "page": 1,
    "rowsOnPage": 25
}

2.1.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/statistic' -i -X POST \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjEsImV4cCI6MTczMTQxNjEyMSwibmJmIjoxNzMxNDEyNTIxLCJqdGkiOiJ2TXRKWVJqc1BMNHBETEYxIiwic3ViIjoiNDYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.Oti9tHQlaJQNJtU1uE3HB0MK3fkJtqfILahlWUNHOww' \
    -d '{
    "timezone": "Etc\/GMT+10",
    "from": "2024-11-10",
    "to": "2024-11-12",
    "groupBy": [
        "YMD",
        "campaignId",
        "creativeId"
    ],
    "agregatedFields": [
        "bids",
        "wins",
        "impressions",
        "clicks",
        "dspSpend",
        "winrate",
        "ctr"
    ],
    "orderField": "YMD",
    "orderDir": "desc",
    "page": 1,
    "rowsOnPage": 25
}'

2.1.4. Response Body

Path Type Description

status

string

Report status

data.*.YMD

date

Date

data.*.campaignId

integer

Campaign id

data.*.campaignId_dict

string

Campaign name

data.*.creativeId

integer

Creative id

data.*.creativeId_dict

string

Creative name

data.*.bids

integer

Bids

data.*.wins

integer

Wins

data.*.impressions

integer

Impressions

data.*.dspSpend

float

Spend, $

data.*.winrate

float

Win Rate, %

data.*.ecpm

integer

eCPM, $

data.*.clicks

integer

Clicks

data.*.conversions

integer

Conversions

data.*.ctr

float

CTR, %

totals.YMD

date

Date

totals.campaignId

integer

Campaign id

totals.campaignId_dict

string

Campaign name

totals.creativeId

integer

Creative id

totals.creativeId_dict

string

Creative name

totals.bids

integer

Bids

totals.wins

integer

Wins

totals.impressions

integer

Impressions

totals.dspSpend

float

Spend, $

totals.winrate

float

Win Rate, %

totals.ecpm

integer

eCPM, $

totals.clicks

integer

Clicks

totals.conversions

integer

Conversions

totals.ctr

float

CTR, %

pagination.page

integer

Pagination: current page number

pagination.per_page

integer

Pagination: items per page

pagination.total

integer

Pagination: total items count

2.1.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "status": "success",
    "data": [
        {
            "YMD": "2024-11-12",
            "campaignId": 1,
            "campaignId_dict": "Et unde| id# 1",
            "creativeId": 12,
            "creativeId_dict": "Tempore aperiam| id# 12",
            "bids": 989,
            "wins": 582,
            "impressions": 434,
            "dspSpend": 0.18222,
            "winrate": 58.84732052578362,
            "ecpm": 0.41986175115207375,
            "clicks": 15,
            "conversions": 25,
            "ctr": 3.456221198156682
        },
        {
            "YMD": "2024-11-12",
            "campaignId": 2,
            "campaignId_dict": "Sit et| id# 2",
            "creativeId": 11,
            "creativeId_dict": "Qui molestias| id# 11",
            "bids": 493,
            "wins": 192,
            "impressions": 150,
            "dspSpend": 0.20095,
            "winrate": 38.945233265720084,
            "ecpm": 1.3396666666666666,
            "clicks": 28,
            "conversions": 24,
            "ctr": 18.666666666666668
        },
        {
            "YMD": "2024-11-12",
            "campaignId": 2,
            "campaignId_dict": "Qui velit| id# 2",
            "creativeId": 12,
            "creativeId_dict": "Magnam cupiditate| id# 12",
            "bids": 358,
            "wins": 128,
            "impressions": 90,
            "dspSpend": 0.12236,
            "winrate": 35.754189944134076,
            "ecpm": 1.3595555555555556,
            "clicks": 38,
            "conversions": 45,
            "ctr": 42.22222222222222
        },
        {
            "YMD": "2024-11-11",
            "campaignId": 1,
            "campaignId_dict": "Dolorem eligendi| id# 1",
            "creativeId": 11,
            "creativeId_dict": "Unde quaerat| id# 11",
            "bids": 234,
            "wins": 150,
            "impressions": 127,
            "dspSpend": 0.41258,
            "winrate": 64.1025641025641,
            "ecpm": 3.2486614173228343,
            "clicks": 45,
            "conversions": 40,
            "ctr": 35.43307086614173
        },
        {
            "YMD": "2024-11-12",
            "campaignId": 1,
            "campaignId_dict": "Molestias fugit| id# 1",
            "creativeId": 11,
            "creativeId_dict": "Ex aut| id# 11",
            "bids": 522,
            "wins": 248,
            "impressions": 179,
            "dspSpend": 0.15399,
            "winrate": 47.509578544061306,
            "ecpm": 0.8602793296089385,
            "clicks": 14,
            "conversions": 2,
            "ctr": 7.82122905027933
        },
        {
            "YMD": "2024-11-11",
            "campaignId": 1,
            "campaignId_dict": "Et quod| id# 1",
            "creativeId": 12,
            "creativeId_dict": "Fuga dolorem| id# 12",
            "bids": 810,
            "wins": 344,
            "impressions": 245,
            "dspSpend": 0.42243,
            "winrate": 42.46913580246913,
            "ecpm": 1.7242040816326532,
            "clicks": 18,
            "conversions": 28,
            "ctr": 7.346938775510204
        },
        {
            "YMD": "2024-11-11",
            "campaignId": 2,
            "campaignId_dict": "Sed quia| id# 2",
            "creativeId": 11,
            "creativeId_dict": "Quia aut| id# 11",
            "bids": 475,
            "wins": 279,
            "impressions": 240,
            "dspSpend": 0.20736,
            "winrate": 58.73684210526316,
            "ecpm": 0.864,
            "clicks": 38,
            "conversions": 40,
            "ctr": 15.833333333333334
        },
        {
            "YMD": "2024-11-11",
            "campaignId": 2,
            "campaignId_dict": "Unde vel| id# 2",
            "creativeId": 12,
            "creativeId_dict": "Voluptas aspernatur| id# 12",
            "bids": 146,
            "wins": 55,
            "impressions": 48,
            "dspSpend": 0.31127,
            "winrate": 37.67123287671233,
            "ecpm": 6.484791666666666,
            "clicks": 26,
            "conversions": 13,
            "ctr": 54.166666666666664
        },
        {
            "YMD": "2024-11-10",
            "campaignId": 1,
            "campaignId_dict": "Culpa quae| id# 1",
            "creativeId": 11,
            "creativeId_dict": "Ipsa labore| id# 11",
            "bids": 811,
            "wins": 408,
            "impressions": 343,
            "dspSpend": 0.1026,
            "winrate": 50.30826140567201,
            "ecpm": 0.29912536443148685,
            "clicks": 35,
            "conversions": 17,
            "ctr": 10.204081632653061
        },
        {
            "YMD": "2024-11-10",
            "campaignId": 1,
            "campaignId_dict": "Voluptatum voluptas| id# 1",
            "creativeId": 12,
            "creativeId_dict": "Dolorem autem| id# 12",
            "bids": 110,
            "wins": 73,
            "impressions": 55,
            "dspSpend": 0.39429,
            "winrate": 66.36363636363636,
            "ecpm": 7.16890909090909,
            "clicks": 24,
            "conversions": 44,
            "ctr": 43.63636363636363
        },
        {
            "YMD": "2024-11-10",
            "campaignId": 2,
            "campaignId_dict": "Voluptates quaerat| id# 2",
            "creativeId": 11,
            "creativeId_dict": "Consequatur est| id# 11",
            "bids": 485,
            "wins": 164,
            "impressions": 146,
            "dspSpend": 0.45576,
            "winrate": 33.81443298969072,
            "ecpm": 3.1216438356164384,
            "clicks": 39,
            "conversions": 8,
            "ctr": 26.71232876712329
        },
        {
            "YMD": "2024-11-10",
            "campaignId": 2,
            "campaignId_dict": "Ex molestiae| id# 2",
            "creativeId": 12,
            "creativeId_dict": "Et sint| id# 12",
            "bids": 138,
            "wins": 44,
            "impressions": 32,
            "dspSpend": 0.16018,
            "winrate": 31.884057971014492,
            "ecpm": 5.005624999999999,
            "clicks": 31,
            "conversions": 1,
            "ctr": 96.875
        }
    ],
    "totals": {
        "YMD": "",
        "campaignId": 0,
        "campaignId_dict": "",
        "creativeId": 0,
        "creativeId_dict": "",
        "bids": 5571,
        "wins": 2667,
        "impressions": 2089,
        "dspSpend": 3.12599,
        "winrate": 47.20054049139345,
        "ecpm": 2.6580269799635334,
        "clicks": 351,
        "conversions": 287,
        "ctr": 30.1978435679264
    },
    "pagination": {
        "page": 1,
        "per_page": 25,
        "total": 12
    }
}

2.2. Filtering statistic

A `POST` request will return statistic.

2.2.1. Request Body

Path Type Description Required

timezone

integer

Timezone
"Etc/GMT+12"…​"Etc/GMT+1", "Etc/GMT", "Etc/GMT-1"…​"Etc/GMT-12" \n"America/Anchorage"…​"Europe/Istanbul", "Asia/Tokyo"

from

date

Start date (yyyy-mm-dd)

+

to

date

End date (yyyy-mm-dd)

+

groupBy

array

Grouping fields:
YMD - Date
YMDH - Date time. Period: 2 days max
campaignId - Campaign
creativeId - Creative
country - Country
connectionType - Connection Type
carrier - Carrier
sspId - Ssp
region - Region
city - City
browser - Browser
os - Device OS
appName - App Name
siteName - Domain Name
source - Source
originalPubId - Publisher Id
sitePage - Site Page
trafficType - Media Type
requestType - Traffic Type
deviceType - Mobile Type
language - Language
size - Width x Height
isPmpReq - Pmp

+

agregatedFields

array

Agregated fields:
bids - Bids
wins - Wins
impressions - Impressions
clicks - Clicks
conversions - Conversions
reach - Reach
dspSpend - Spend
ecpm - eCPM
ecpc - eCPC
ctr - CTR
winrate - Win Rate

+

filter.campaignId

integer

Filtering by Campaign Id(cid)

filter.creativeId

integer

Filtering by Creative Id(bid)

orderField

string

Sorting field

orderDir

string

Sort order: "asc" or "desc"

page

integer

Pagination: page number

rowsOnPage

integer

Pagination: rows on page (min:10, max:50000)

2.2.2. HTTP Request

URL

POST api/statistic HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjIsImV4cCI6MTczMTQxNjEyMiwibmJmIjoxNzMxNDEyNTIyLCJqdGkiOiJNOGY3U0NwMXpxT2RkQVZkIiwic3ViIjoiNDciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.dLjRnthn4MlPftMx8QpItu9y4A9aX1lil3JwCmRxaD0
DATA
{
    "timezone": "UTC",
    "from": "2024-11-10",
    "to": "2024-11-12",
    "groupBy": [
        "YMD",
        "campaignId",
        "creativeId"
    ],
    "agregatedFields": [
        "bids",
        "wins",
        "impressions",
        "clicks",
        "dspSpend",
        "winrate",
        "ctr"
    ],
    "filter": {
        "campaignId": 1,
        "creativeId": 10
    },
    "orderField": "YMD",
    "orderDir": "desc",
    "page": 1,
    "rowsOnPage": 25
}

2.2.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/statistic' -i -X POST \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjIsImV4cCI6MTczMTQxNjEyMiwibmJmIjoxNzMxNDEyNTIyLCJqdGkiOiJNOGY3U0NwMXpxT2RkQVZkIiwic3ViIjoiNDciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.dLjRnthn4MlPftMx8QpItu9y4A9aX1lil3JwCmRxaD0' \
    -d '{
    "timezone": "UTC",
    "from": "2024-11-10",
    "to": "2024-11-12",
    "groupBy": [
        "YMD",
        "campaignId",
        "creativeId"
    ],
    "agregatedFields": [
        "bids",
        "wins",
        "impressions",
        "clicks",
        "dspSpend",
        "winrate",
        "ctr"
    ],
    "filter": {
        "campaignId": 1,
        "creativeId": 10
    },
    "orderField": "YMD",
    "orderDir": "desc",
    "page": 1,
    "rowsOnPage": 25
}'

2.2.4. Response Body

Path Type Description

status

string

Report status

data.*.YMD

date

Date

data.*.campaignId

integer

Campaign id

data.*.campaignId_dict

string

Campaign name

data.*.creativeId

integer

Creative id

data.*.creativeId_dict

string

Creative name

data.*.bids

integer

Bids

data.*.wins

integer

Wins

data.*.impressions

integer

Impressions

data.*.dspSpend

float

Spend, $

data.*.winrate

float

Win Rate, %

data.*.ecpm

integer

eCPM, $

data.*.clicks

integer

Clicks

data.*.conversions

integer

Conversions

data.*.ctr

float

CTR, %

totals.YMD

date

Date

totals.campaignId

integer

Campaign id

totals.campaignId_dict

string

Campaign name

totals.creativeId

integer

Creative id

totals.creativeId_dict

string

Creative name

totals.bids

integer

Bids

totals.wins

integer

Wins

totals.impressions

integer

Impressions

totals.dspSpend

float

Spend, $

totals.winrate

float

Win Rate, %

totals.ecpm

integer

eCPM, $

totals.clicks

integer

Clicks

totals.conversions

integer

Conversions

totals.ctr

float

CTR, %

pagination.page

integer

Pagination: current page number

pagination.per_page

integer

Pagination: items per page

pagination.total

integer

Pagination: total items count

2.2.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "status": "success",
    "data": [
        {
            "YMD": "2024-11-11",
            "campaignId": 1,
            "campaignId_dict": "Accusamus iure| id# 1",
            "creativeId": 10,
            "creativeId_dict": "Omnis consequuntur| id# 10",
            "bids": 689,
            "wins": 269,
            "impressions": 232,
            "dspSpend": 0.31682,
            "winrate": 39.042089985486214,
            "ecpm": 1.365603448275862,
            "clicks": 7,
            "conversions": 50,
            "ctr": 3.0172413793103448
        },
        {
            "YMD": "2024-11-12",
            "campaignId": 1,
            "campaignId_dict": "Odit aut| id# 1",
            "creativeId": 10,
            "creativeId_dict": "Qui dolores| id# 10",
            "bids": 679,
            "wins": 311,
            "impressions": 242,
            "dspSpend": 0.44532,
            "winrate": 45.80265095729013,
            "ecpm": 1.8401652892561984,
            "clicks": 18,
            "conversions": 50,
            "ctr": 7.43801652892562
        },
        {
            "YMD": "2024-11-10",
            "campaignId": 1,
            "campaignId_dict": "Nisi temporibus| id# 1",
            "creativeId": 10,
            "creativeId_dict": "Consequuntur ipsa| id# 10",
            "bids": 904,
            "wins": 325,
            "impressions": 238,
            "dspSpend": 0.33257,
            "winrate": 35.95132743362832,
            "ecpm": 1.3973529411764705,
            "clicks": 25,
            "conversions": 46,
            "ctr": 10.504201680672269
        }
    ],
    "totals": {
        "YMD": "",
        "campaignId": 0,
        "campaignId_dict": "",
        "creativeId": 0,
        "creativeId_dict": "",
        "bids": 2272,
        "wins": 905,
        "impressions": 712,
        "dspSpend": 1.09471,
        "winrate": 40.26535612546822,
        "ecpm": 1.5343738929028437,
        "clicks": 50,
        "conversions": 146,
        "ctr": 6.986486529636077
    },
    "pagination": {
        "page": 1,
        "per_page": 25,
        "total": 3
    }
}

3. Campaigns

3.1. Campaigns list

A `GET` request will return a list of an campaigns.

3.1.1. HTTP Request

URL

GET api/campaigns HTTP/1.1

HEADER
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTcsImV4cCI6MTczMTQxNjExNywibmJmIjoxNzMxNDEyNTE3LCJqdGkiOiJld1dtZHUzNGNkcnRveml3Iiwic3ViIjoiNCIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.Erov92umY6yHXl7tfjAjJVGC3CNaszAP7QW2fHsi8Ek
DATA
{}

3.1.2. Curl request

$ curl 'https://dsp-api.smartyads.com/api/campaigns' -i -X GET \
            -H 'Accept: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTcsImV4cCI6MTczMTQxNjExNywibmJmIjoxNzMxNDEyNTE3LCJqdGkiOiJld1dtZHUzNGNkcnRveml3Iiwic3ViIjoiNCIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.Erov92umY6yHXl7tfjAjJVGC3CNaszAP7QW2fHsi8Ek' \
    -d '{}'

3.1.3. Response Body

Path Type Description

data.*.id

integer

Campaign Id(test)

data.*.userId

integer

User Id

data.*.isActive

boolean

Campaign On/Off

data.*.isRunning

boolean

Campaign running status

data.*.type

string

Campaign type: banner, native, video, audio

data.*.name

string

Campaign name

data.*.isRewarded

integer

Rewarded video (for video creatives)

data.*.isDesktopWeb

boolean

Traffic Type: Desktop Websites

data.*.isMobileApp

boolean

Traffic Type: Mobile Applications

data.*.isMobileWeb

boolean

Traffic Type: Mobile Websites

data.*.isSmartphone

boolean

Traffic Type: Smartphones

data.*.isTablet

boolean

Traffic Type: Tablets

data.*.isCTV

boolean

Traffic Type: CTVs

data.*.isDOOH

boolean

Traffic Type: DOOH

data.*.aDomain

integer

Top level domain

data.*.dateStart

date

Date start

data.*.dateEnd

date

Date end

data.*.geoCountries

array

GEO Targeting: countries list

data.*.geoCountriesIsInclude

boolean

GEO Targeting: countries list type (true: whitelist, false: blacklist)

data.*.geoRegions

array

GEO Targeting: regions list

data.*.geoRegionsIsInclude

boolean

GEO Targeting: regions list type (true: whitelist, false: blacklist)

data.*.geoCities

array

GEO Targeting: cities list

data.*.geoCitiesIsInclude

boolean

GEO Targeting: cities list type (true: whitelist, false: blacklist)

data.*.contentCategories

array

Targeting: IAB Categories list

data.*.contentCategoriesIsInclude

boolean

Targeting: IAB Categories list type (true: whitelist, false: blacklist)

data.*.userAgeMin

integer

Targeting: Age range from

data.*.userAgeMax

integer

Targeting: Age range to

data.*.connectionTypes

array

Targeting: Connection types list

data.*.clickedInventoryCategories

array

Сlicked Inventory Categories

data.*.deviceCarrier

array

Targeting: List of network operators.

data.*.deviceCarrierIsInclude

boolean

Targeting: List of network operators type (true: whitelist, false: blacklist)

data.*.OS

array

Targeting: The operating system of user's device

data.*.OSIsInclude

boolean

Targeting: The operating system of user's device list type (true: whitelist, false: blacklist)

data.*.browser

array

Targeting: The user's browsers list

data.*.browserIsInclude

boolean

Targeting: The user's browsers list type (true: whitelist, false: blacklist)

data.*.deviceLanguage

array

Targeting: The languages of user's browser

data.*.deviceLanguageIsInclude

boolean

Targeting: The languages of user's browser list type (true: whitelist, false: blacklist)

data.*.spentDailyLimit

integer

Daily spent limit

data.*.spentTotalLimit

integer

Total spent limit

data.*.impressionsDailyLimit

integer

Daily impressions limit

data.*.impressionsTotalLimit

integer

Total impressions limit

data.*.clicksDailyLimit

integer

Daily clicks limit

data.*.clicksTotalLimit

integer

Total clicks limit

data.*.budgetUse

integer

Distribution: pacer, fast pacer - Evenly distribution fast - ASAP distribution

data.*.allSources

boolean

Inventory: Use all SSP endpoints

data.*.cpm

float

cpm

data.*.adaptiveCpm

boolean

adaptiveCpm

data.*.useCpm

boolean

use cpm

data.*.extendedStatus

string

Campaign extended status

data.*.createdAt

datetime

Date of creation

data.*.updatedAt

datetime

Date of last modification

data.*.deletedAt

datetime

Date of deletion

meta.pagination.total

integer

Pagination: total items count

meta.pagination.count

integer

Pagination: page items count

meta.pagination.per_page

integer

Pagination: items per page

meta.pagination.current_page

integer

Pagination: current page number

meta.pagination.total_pages

integer

Pagination: total pages count

meta.pagination.links

array

Pagination: urls to next,prev page

3.1.4. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "data": [
        {
            "id": 1,
            "userId": 4,
            "isActive": false,
            "isRunning": false,
            "type": "video",
            "name": "Quos.",
            "isRewarded": false,
            "isDesktopWeb": true,
            "isMobileApp": true,
            "isMobileWeb": false,
            "isSmartphone": true,
            "isTablet": false,
            "isCTV": false,
            "isDOOH": false,
            "aDomain": "ledner.com",
            "dateStart": "2023-08-03",
            "dateEnd": "2025-03-25",
            "geoCountries": [],
            "geoCountriesIsInclude": true,
            "geoRegions": [],
            "geoRegionsIsInclude": true,
            "geoCities": [],
            "geoCitiesIsInclude": true,
            "contentCategories": [],
            "contentCategoriesIsInclude": true,
            "userAgeMin": 0,
            "userAgeMax": 0,
            "connectionTypes": [
                "wifi"
            ],
            "clickedInventoryCategories": [],
            "deviceCarrier": [],
            "deviceCarrierIsInclude": true,
            "OS": [],
            "OSIsInclude": true,
            "browser": [],
            "browserIsInclude": true,
            "deviceLanguage": [],
            "deviceLanguageIsInclude": true,
            "spentDailyLimit": 149,
            "spentTotalLimit": 8638,
            "impressionsDailyLimit": 279162,
            "impressionsTotalLimit": 400000,
            "clicksDailyLimit": 0,
            "clicksTotalLimit": 0,
            "budgetUse": "fast",
            "allSources": true,
            "cpm": 0,
            "adaptiveCpm": false,
            "useCpm": false,
            "extendedStatus": "Campaign is not active",
            "createdAt": "2024-11-12",
            "updatedAt": "2024-11-12",
            "deletedAt": null
        },
        {
            "id": 2,
            "userId": 4,
            "isActive": false,
            "isRunning": false,
            "type": "video",
            "name": "Et.",
            "isRewarded": false,
            "isDesktopWeb": false,
            "isMobileApp": true,
            "isMobileWeb": true,
            "isSmartphone": true,
            "isTablet": true,
            "isCTV": false,
            "isDOOH": true,
            "aDomain": "douglas.com",
            "dateStart": "2023-04-25",
            "dateEnd": "2025-03-08",
            "geoCountries": [],
            "geoCountriesIsInclude": true,
            "geoRegions": [],
            "geoRegionsIsInclude": true,
            "geoCities": [],
            "geoCitiesIsInclude": true,
            "contentCategories": [],
            "contentCategoriesIsInclude": true,
            "userAgeMin": 0,
            "userAgeMax": 0,
            "connectionTypes": [
                "wifi"
            ],
            "clickedInventoryCategories": [],
            "deviceCarrier": [],
            "deviceCarrierIsInclude": true,
            "OS": [],
            "OSIsInclude": true,
            "browser": [],
            "browserIsInclude": true,
            "deviceLanguage": [],
            "deviceLanguageIsInclude": true,
            "spentDailyLimit": 440,
            "spentTotalLimit": 1822,
            "impressionsDailyLimit": 271660,
            "impressionsTotalLimit": 400000,
            "clicksDailyLimit": 0,
            "clicksTotalLimit": 0,
            "budgetUse": "fast",
            "allSources": true,
            "cpm": 0,
            "adaptiveCpm": false,
            "useCpm": false,
            "extendedStatus": "Campaign is not active",
            "createdAt": "2024-11-12",
            "updatedAt": "2024-11-12",
            "deletedAt": null
        }
    ],
    "meta": {
        "pagination": {
            "total": 2,
            "count": 2,
            "per_page": 15,
            "current_page": 1,
            "total_pages": 1,
            "links": []
        }
    }
}

3.2. Get by ID

A `GET` request with a path parameter of the id will return the campaign with that id.

3.2.1. HTTP Request

URL

GET api/campaigns/3 HTTP/1.1

HEADER
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJBRDEzNzloYlFkNWo4VEhLIiwic3ViIjoiNSIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.TQcKLfxPHPTp89GBnVtoiO4_MADzp7Y2E91HXDTqwYs
DATA
{}

3.2.2. Curl request

$ curl 'https://dsp-api.smartyads.com/api/campaigns/3' -i -X GET \
            -H 'Accept: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJBRDEzNzloYlFkNWo4VEhLIiwic3ViIjoiNSIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.TQcKLfxPHPTp89GBnVtoiO4_MADzp7Y2E91HXDTqwYs' \
    -d '{}'

3.2.3. Response Body

Path Type Description

data.id

integer

Campaign Id

data.userId

integer

User Id

data.isActive

boolean

Campaign On/Off

data.isRunning

boolean

Campaign running status

data.type

string

Campaign type: banner, native, video, audio

data.name

string

Campaign name

data.isRewarded

integer

Rewarded video (for video creatives)

data.isDesktopWeb

boolean

Traffic Type: Desktop Websites

data.isMobileApp

boolean

Traffic Type: Mobile Applications

data.isMobileWeb

boolean

Traffic Type: Mobile Websites

data.isSmartphone

boolean

Traffic Type: Smartphones

data.isTablet

boolean

Traffic Type: Tablets

data.isCTV

boolean

Traffic Type: CTV

data.isDOOH

boolean

Traffic Type: DOOH

data.aDomain

integer

Top level domain

data.dateStart

date

Date start

data.dateEnd

date

Date end

data.geoCountries

array

GEO Targeting: countries list

data.geoCountriesIsInclude

boolean

GEO Targeting: countries list type (true: whitelist, false: blacklist)

data.geoRegions

array

GEO Targeting: regions list

data.geoRegionsIsInclude

boolean

GEO Targeting: regions list type (true: whitelist, false: blacklist)

data.geoCities

array

GEO Targeting: cities list

data.geoCitiesIsInclude

boolean

GEO Targeting: cities list type (true: whitelist, false: blacklist)

data.contentCategories

array

Targeting: IAB Categories list

data.contentCategoriesIsInclude

boolean

Targeting: IAB Categories list type (true: whitelist, false: blacklist)

data.userAgeMin

integer

Targeting: Age range from

data.userAgeMax

integer

Targeting: Age range to

data.connectionTypes

array

Targeting: Connection types list

data.clickedInventoryCategories

array

Сlicked Inventory Categories

data.deviceCarrier

array

Targeting: List of network operators.

data.deviceCarrierIsInclude

boolean

Targeting: List of network operators type (true: whitelist, false: blacklist)

data.OS

array

Targeting: The operating system of user's device

data.OSIsInclude

boolean

Targeting: The operating system of user's device list type (true: whitelist, false: blacklist)

data.browser

array

Targeting: The user's browsers list

data.browserIsInclude

boolean

Targeting: The user's browsers list type (true: whitelist, false: blacklist)

data.deviceLanguage

array

Targeting: The languages of user's browser

data.deviceLanguageIsInclude

boolean

Targeting: The languages of user's browser list type (true: whitelist, false: blacklist)

data.spentDailyLimit

integer

Daily spent limit

data.spentTotalLimit

integer

Total spent limit

data.impressionsDailyLimit

integer

Daily impressions limit

data.impressionsTotalLimit

integer

Total impressions limit

data.clicksDailyLimit

integer

Daily clicks limit

data.clicksTotalLimit

integer

Total clicks limit

data.budgetUse

integer

Distribution: pacer, fast pacer - Evenly distribution fast - ASAP distribution

data.allSources

boolean

Inventory: Use all SSP endpoints

data.classicPush

boolean

Push - PUSH Campaigns

data.inPagePush

string

In-Page Push - PUSH Campaigns

data.pricingModel

string

Pricing model: CPM - PUSH Campaigns

data.cpm

float

cpm

data.adaptiveCpm

boolean

adaptiveCpm

data.useCpm

boolean

use cpm

data.landingPageUrl

string

Landing page URL - PUSH Campaigns

data.googleAnalyticsTrackingCode

string

Google Analytics tracking code - PUSH Campaigns

data.dynamicTargeting

array

SmartCPC: Dynamic targeting - only for CPC Pricing model

data.subscriptionAge

array

Subscription Age - only for CPC Pricing model

data.frequencyType

string

Frequency Type (user, ip).Required if frequency is on.

data.frequency

boolean

Frequency on/off.

data.frequencyCap

integer

Show ads no more than "Frequency Cap" times in "Frequency Period".Required if frequency is on.

data.frequencyPeriod

integer

Frequency Period (min-1,max-3). Required if frequency is on.

data.extendedStatus

string

Campaign extended status

data.createdAt

datetime

Date of creation

data.updatedAt

datetime

Date of last modification

data.deletedAt

datetime

Date of deletion

data.pretarget

int

pretarget

data.pretargets

array

pretargets

3.2.4. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "data": {
        "id": 3,
        "userId": 5,
        "isActive": false,
        "isRunning": false,
        "type": "video",
        "name": "Test Campaign #1",
        "isRewarded": false,
        "isDesktopWeb": true,
        "isMobileApp": false,
        "isMobileWeb": false,
        "isSmartphone": false,
        "isTablet": false,
        "isCTV": false,
        "isDOOH": false,
        "aDomain": "hane.net",
        "dateStart": "2023-06-09",
        "dateEnd": "2025-01-13",
        "geoCountries": [],
        "geoCountriesIsInclude": true,
        "geoRegions": [],
        "geoRegionsIsInclude": true,
        "geoCities": [],
        "geoCitiesIsInclude": true,
        "contentCategories": [],
        "contentCategoriesIsInclude": true,
        "userAgeMin": 0,
        "userAgeMax": 0,
        "connectionTypes": [
            "wifi"
        ],
        "clickedInventoryCategories": [],
        "deviceCarrier": [],
        "deviceCarrierIsInclude": true,
        "OS": [],
        "OSIsInclude": true,
        "browser": [],
        "browserIsInclude": true,
        "deviceLanguage": [],
        "deviceLanguageIsInclude": true,
        "spentDailyLimit": 332,
        "spentTotalLimit": 2620,
        "impressionsDailyLimit": 246418,
        "impressionsTotalLimit": 400000,
        "clicksDailyLimit": 0,
        "clicksTotalLimit": 0,
        "budgetUse": "fast",
        "allSources": true,
        "classicPush": true,
        "inPagePush": true,
        "pricingModel": null,
        "cpm": 0,
        "adaptiveCpm": false,
        "useCpm": false,
        "landingPageUrl": "",
        "googleAnalyticsTrackingCode": null,
        "dynamicTargeting": [],
        "subscriptionAge": [],
        "frequencyType": "user",
        "frequency": 0,
        "frequencyCap": 1,
        "frequencyPeriod": 1,
        "extendedStatus": "Campaign is not active",
        "createdAt": "2024-11-12",
        "updatedAt": "2024-11-12",
        "deletedAt": null,
        "pretarget": null,
        "pretargets": []
    }
}

3.3. Create a Custom Banner/Native/Video/Audio Campaigns

A `POST` request will create new campaign.

3.3.1. Request Body

Path Type Description Required

type

string

Campaign type: banner, native, video, audio

+

name

string

Campaign name

+

aDomain

integer

Top level domain

+

isRewarded

integer

Rewarded video (for video creatives)

isDesktopWeb

boolean

Traffic Type: Desktop Websites

isMobileApp

boolean

Traffic Type: Mobile Applications

isMobileWeb

boolean

Traffic Type: Mobile Websites

isSmartphone

boolean

Traffic Type: Smartphones

isTablet

boolean

Traffic Type: Tablets

contentCategories

array

Targeting: IAB Categories list

contentCategoriesIsInclude

boolean

Targeting: IAB Categories list type (true: whitelist, false: blacklist)

userAgeMin

integer

Targeting: Age range from

userAgeMax

integer

Targeting: Age range to

connectionTypes

array

Targeting: Connection types list

deviceCarrier

array

Targeting: List of network operators.

deviceCarrierIsInclude

boolean

Targeting: List of network operators type (true: whitelist, false: blacklist)

OS

array

Targeting: The operating system of user's device

OSIsInclude

boolean

Targeting: The operating system of user's device list type (true: whitelist, false: blacklist)

browser

array

Targeting: The user's browsers list

browserIsInclude

boolean

Targeting: The user's browsers list type (true: whitelist, false: blacklist)

deviceLanguage

array

Targeting: The languages of user's browser

deviceLanguageIsInclude

boolean

Targeting: The languages of user's browser list type (true: whitelist, false: blacklist)

spentDailyLimit

integer

Daily spent limit

spentTotalLimit

integer

Total spent limit

impressionsDailyLimit

integer

Daily impressions limit

impressionsTotalLimit

integer

Total impressions limit

clicksDailyLimit

integer

Daily clicks limit

clicksTotalLimit

integer

Total clicks limit

budgetUse

integer

Distribution: pacer, fast pacer - Evenly distribution fast - ASAP distribution

dateStart

date

Date start

dateEnd

date

Date end

3.3.2. HTTP Request

URL

POST api/campaigns HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiIwaksxNXBvSFRSYktkVW85Iiwic3ViIjoiNiIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.afCnIQrT5I4v1Tn8fxb5Ls2c5soFEtzQPBgeQ0ciQp8
DATA
{
    "type": "banner",
    "name": "New Campaign #2",
    "aDomain": "mayert.net",
    "isRewarded": true,
    "isDesktopWeb": true,
    "isMobileApp": true,
    "isMobileWeb": true,
    "isSmartphone": true,
    "isTablet": true,
    "contentCategories": [
        "IAB1",
        "IAB3"
    ],
    "contentCategoriesIsInclude": false,
    "userAgeMin": 18,
    "userAgeMax": 50,
    "connectionTypes": [
        "ethernet",
        "cellular_all",
        "cellular_3g",
        "cellular_4g",
        "wifi"
    ],
    "deviceCarrier": [
        "ISP Green-Stiedemann",
        "ISP Simonis Inc"
    ],
    "deviceCarrierIsInclude": false,
    "OS": [
        "Android 8.0",
        "Android 8.1",
        "Android 9.0",
        "Android 10.0",
        "Android 11.0",
        "Android 12.0",
        "Android 13.0",
        "iOS"
    ],
    "OSIsInclude": true,
    "browser": [
        "Chrome",
        "IE",
        "Edge"
    ],
    "browserIsInclude": true,
    "deviceLanguage": [
        "ab",
        "aa"
    ],
    "deviceLanguageIsInclude": true,
    "spentDailyLimit": 200,
    "spentTotalLimit": 1000,
    "impressionsDailyLimit": 100000,
    "impressionsTotalLimit": 1000000,
    "clicksDailyLimit": 500,
    "clicksTotalLimit": 1000,
    "budgetUse": "fast",
    "dateStart": "2024-08-07",
    "dateEnd": "2025-10-03"
}

3.3.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/campaigns' -i -X POST \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiIwaksxNXBvSFRSYktkVW85Iiwic3ViIjoiNiIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.afCnIQrT5I4v1Tn8fxb5Ls2c5soFEtzQPBgeQ0ciQp8' \
    -d '{
    "type": "banner",
    "name": "New Campaign #2",
    "aDomain": "mayert.net",
    "isRewarded": true,
    "isDesktopWeb": true,
    "isMobileApp": true,
    "isMobileWeb": true,
    "isSmartphone": true,
    "isTablet": true,
    "contentCategories": [
        "IAB1",
        "IAB3"
    ],
    "contentCategoriesIsInclude": false,
    "userAgeMin": 18,
    "userAgeMax": 50,
    "connectionTypes": [
        "ethernet",
        "cellular_all",
        "cellular_3g",
        "cellular_4g",
        "wifi"
    ],
    "deviceCarrier": [
        "ISP Green-Stiedemann",
        "ISP Simonis Inc"
    ],
    "deviceCarrierIsInclude": false,
    "OS": [
        "Android 8.0",
        "Android 8.1",
        "Android 9.0",
        "Android 10.0",
        "Android 11.0",
        "Android 12.0",
        "Android 13.0",
        "iOS"
    ],
    "OSIsInclude": true,
    "browser": [
        "Chrome",
        "IE",
        "Edge"
    ],
    "browserIsInclude": true,
    "deviceLanguage": [
        "ab",
        "aa"
    ],
    "deviceLanguageIsInclude": true,
    "spentDailyLimit": 200,
    "spentTotalLimit": 1000,
    "impressionsDailyLimit": 100000,
    "impressionsTotalLimit": 1000000,
    "clicksDailyLimit": 500,
    "clicksTotalLimit": 1000,
    "budgetUse": "fast",
    "dateStart": "2024-08-07",
    "dateEnd": "2025-10-03"
}'

3.3.4. Response Body

Path Type Description

data.id

integer

Campaign Id

data.userId

integer

User Id

data.isActive

boolean

Campaign On/Off

data.isRunning

boolean

Campaign running status

data.type

string

Campaign type: banner, native, video, audio

data.name

string

Campaign name

data.isRewarded

integer

Rewarded video (for video creatives)

data.isDesktopWeb

boolean

Traffic Type: Desktop Websites

data.isMobileApp

boolean

Traffic Type: Mobile Applications

data.isMobileWeb

boolean

Traffic Type: Mobile Websites

data.isSmartphone

boolean

Traffic Type: Smartphones

data.isTablet

boolean

Traffic Type: Tablets

data.isCTV

boolean

Traffic Type: CTV

data.isDOOH

boolean

Traffic Type: DOOH

data.aDomain

integer

Top level domain

data.dateStart

date

Date start

data.dateEnd

date

Date end

data.geoCountries

array

GEO Targeting: countries list

data.geoCountriesIsInclude

boolean

GEO Targeting: countries list type (true: whitelist, false: blacklist)

data.geoRegions

array

GEO Targeting: regions list

data.geoRegionsIsInclude

boolean

GEO Targeting: regions list type (true: whitelist, false: blacklist)

data.geoCities

array

GEO Targeting: cities list

data.geoCitiesIsInclude

boolean

GEO Targeting: cities list type (true: whitelist, false: blacklist)

data.contentCategories

array

Targeting: IAB Categories list

data.contentCategoriesIsInclude

boolean

Targeting: IAB Categories list type (true: whitelist, false: blacklist)

data.userAgeMin

integer

Targeting: Age range from

data.userAgeMax

integer

Targeting: Age range to

data.connectionTypes

array

Targeting: Connection types list

data.clickedInventoryCategories

array

Сlicked Inventory Categories

data.deviceCarrier

array

Targeting: List of network operators.

data.deviceCarrierIsInclude

boolean

Targeting: List of network operators type (true: whitelist, false: blacklist)

data.OS

array

Targeting: The operating system of user's device

data.OSIsInclude

boolean

Targeting: The operating system of user's device list type (true: whitelist, false: blacklist)

data.browser

array

Targeting: The user's browsers list

data.browserIsInclude

boolean

Targeting: The user's browsers list type (true: whitelist, false: blacklist)

data.deviceLanguage

array

Targeting: The languages of user's browser

data.deviceLanguageIsInclude

boolean

Targeting: The languages of user's browser list type (true: whitelist, false: blacklist)

data.spentDailyLimit

integer

Daily spent limit

data.spentTotalLimit

integer

Total spent limit

data.impressionsDailyLimit

integer

Daily impressions limit

data.impressionsTotalLimit

integer

Total impressions limit

data.clicksDailyLimit

integer

Daily clicks limit

data.clicksTotalLimit

integer

Total clicks limit

data.budgetUse

integer

Distribution: pacer, fast pacer - Evenly distribution fast - ASAP distribution

data.allSources

boolean

Inventory: Use all SSP endpoints

data.classicPush

boolean

Push - PUSH Campaigns

data.inPagePush

string

In-Page Push - PUSH Campaigns

data.pricingModel

string

Pricing model: CPM - PUSH Campaigns

data.cpm

float

cpm

data.adaptiveCpm

boolean

adaptiveCpm

data.useCpm

boolean

use cpm

data.landingPageUrl

string

Landing page URL - PUSH Campaigns

data.googleAnalyticsTrackingCode

string

Google Analytics tracking code - PUSH Campaigns

data.dynamicTargeting

array

SmartCPC: Dynamic targeting - only for CPC Pricing model

data.subscriptionAge

array

Subscription Age - only for CPC Pricing model

data.frequencyType

string

Frequency Type (user, ip).Required if frequency is on.

data.frequency

boolean

Frequency on/off.

data.frequencyCap

integer

Show ads no more than "Frequency Cap" times in "Frequency Period".Required if frequency is on.

data.frequencyPeriod

integer

Frequency Period (min-1,max-3). Required if frequency is on.

data.extendedStatus

string

Campaign extended status

data.createdAt

datetime

Date of creation

data.updatedAt

datetime

Date of last modification

data.deletedAt

datetime

Date of deletion

data.pretarget

int

pretarget

data.pretargets

array

pretargets

3.3.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "data": {
        "id": 4,
        "userId": 6,
        "isActive": null,
        "isRunning": false,
        "type": "banner",
        "name": "New Campaign #2",
        "isRewarded": true,
        "isDesktopWeb": true,
        "isMobileApp": true,
        "isMobileWeb": true,
        "isSmartphone": true,
        "isTablet": true,
        "isCTV": true,
        "isDOOH": true,
        "aDomain": "mayert.net",
        "dateStart": "2024-08-07",
        "dateEnd": "2025-10-03",
        "geoCountries": [],
        "geoCountriesIsInclude": false,
        "geoRegions": [],
        "geoRegionsIsInclude": null,
        "geoCities": [],
        "geoCitiesIsInclude": false,
        "contentCategories": [
            "IAB1",
            "IAB3"
        ],
        "contentCategoriesIsInclude": false,
        "userAgeMin": 18,
        "userAgeMax": 50,
        "connectionTypes": [
            "ethernet",
            "cellular_all",
            "cellular_3g",
            "cellular_4g",
            "wifi"
        ],
        "clickedInventoryCategories": [],
        "deviceCarrier": [
            "ISP Green-Stiedemann",
            "ISP Simonis Inc"
        ],
        "deviceCarrierIsInclude": false,
        "OS": [
            "Android 8.0",
            "Android 8.1",
            "Android 9.0",
            "Android 10.0",
            "Android 11.0",
            "Android 12.0",
            "Android 13.0",
            "iOS"
        ],
        "OSIsInclude": true,
        "browser": [
            "Chrome",
            "IE",
            "Edge"
        ],
        "browserIsInclude": true,
        "deviceLanguage": [
            "ab",
            "aa"
        ],
        "deviceLanguageIsInclude": true,
        "spentDailyLimit": 200,
        "spentTotalLimit": 1000,
        "impressionsDailyLimit": 100000,
        "impressionsTotalLimit": 1000000,
        "clicksDailyLimit": 500,
        "clicksTotalLimit": 1000,
        "budgetUse": "fast",
        "allSources": false,
        "classicPush": false,
        "inPagePush": false,
        "pricingModel": null,
        "cpm": null,
        "adaptiveCpm": null,
        "useCpm": null,
        "landingPageUrl": null,
        "googleAnalyticsTrackingCode": null,
        "dynamicTargeting": [],
        "subscriptionAge": [],
        "frequencyType": null,
        "frequency": null,
        "frequencyCap": 0,
        "frequencyPeriod": 0,
        "extendedStatus": "Campaign is not active",
        "createdAt": "2024-11-12",
        "updatedAt": "2024-11-12",
        "deletedAt": null,
        "pretarget": null,
        "pretargets": []
    }
}

3.4. Update a Custom Campaign

A `PATCH` request will update campaign.

3.4.1. Request Body

Path Type Description Required

name

string

Campaign name

3.4.2. HTTP Request

URL

PATCH api/campaigns/5 HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJqazA0UEF0ak1iczdzeURvIiwic3ViIjoiNyIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.bmJudIw5dFm6JWjGCWHiFB6E5IiWgFwec5l_ATbJHlo
DATA
{
    "name": "Updated Campaign #3"
}

3.4.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/campaigns/5' -i -X PATCH \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJqazA0UEF0ak1iczdzeURvIiwic3ViIjoiNyIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.bmJudIw5dFm6JWjGCWHiFB6E5IiWgFwec5l_ATbJHlo' \
    -d '{
    "name": "Updated Campaign #3"
}'

3.4.4. Response Body

Path Type Description

data.id

integer

Campaign Id

data.userId

integer

User Id

data.isActive

boolean

Campaign On/Off

data.isRunning

boolean

Campaign running status

data.type

string

Campaign type: banner, native, video, audio

data.name

string

Campaign name

data.isRewarded

integer

Rewarded video (for video creatives)

data.isDesktopWeb

boolean

Traffic Type: Desktop Websites

data.isMobileApp

boolean

Traffic Type: Mobile Applications

data.isMobileWeb

boolean

Traffic Type: Mobile Websites

data.isSmartphone

boolean

Traffic Type: Smartphones

data.isTablet

boolean

Traffic Type: Tablets

data.isCTV

boolean

Traffic Type: CTV

data.isDOOH

boolean

Traffic Type: DOOH

data.aDomain

integer

Top level domain

data.dateStart

date

Date start

data.dateEnd

date

Date end

data.geoCountries

array

GEO Targeting: countries list

data.geoCountriesIsInclude

boolean

GEO Targeting: countries list type (true: whitelist, false: blacklist)

data.geoRegions

array

GEO Targeting: regions list

data.geoRegionsIsInclude

boolean

GEO Targeting: regions list type (true: whitelist, false: blacklist)

data.geoCities

array

GEO Targeting: cities list

data.geoCitiesIsInclude

boolean

GEO Targeting: cities list type (true: whitelist, false: blacklist)

data.contentCategories

array

Targeting: IAB Categories list

data.contentCategoriesIsInclude

boolean

Targeting: IAB Categories list type (true: whitelist, false: blacklist)

data.userAgeMin

integer

Targeting: Age range from

data.userAgeMax

integer

Targeting: Age range to

data.connectionTypes

array

Targeting: Connection types list

data.clickedInventoryCategories

array

Сlicked Inventory Categories

data.deviceCarrier

array

Targeting: List of network operators.

data.deviceCarrierIsInclude

boolean

Targeting: List of network operators type (true: whitelist, false: blacklist)

data.OS

array

Targeting: The operating system of user's device

data.OSIsInclude

boolean

Targeting: The operating system of user's device list type (true: whitelist, false: blacklist)

data.browser

array

Targeting: The user's browsers list

data.browserIsInclude

boolean

Targeting: The user's browsers list type (true: whitelist, false: blacklist)

data.deviceLanguage

array

Targeting: The languages of user's browser

data.deviceLanguageIsInclude

boolean

Targeting: The languages of user's browser list type (true: whitelist, false: blacklist)

data.spentDailyLimit

integer

Daily spent limit

data.spentTotalLimit

integer

Total spent limit

data.impressionsDailyLimit

integer

Daily impressions limit

data.impressionsTotalLimit

integer

Total impressions limit

data.clicksDailyLimit

integer

Daily clicks limit

data.clicksTotalLimit

integer

Total clicks limit

data.budgetUse

integer

Distribution: pacer, fast pacer - Evenly distribution fast - ASAP distribution

data.allSources

boolean

Inventory: Use all SSP endpoints

data.classicPush

boolean

Push - PUSH Campaigns

data.inPagePush

string

In-Page Push - PUSH Campaigns

data.pricingModel

string

Pricing model: CPM - PUSH Campaigns

data.cpm

float

cpm

data.adaptiveCpm

boolean

adaptiveCpm

data.useCpm

boolean

use cpm

data.landingPageUrl

string

Landing page URL - PUSH Campaigns

data.googleAnalyticsTrackingCode

string

Google Analytics tracking code - PUSH Campaigns

data.dynamicTargeting

array

SmartCPC: Dynamic targeting - only for CPC Pricing model

data.subscriptionAge

array

Subscription Age - only for CPC Pricing model

data.frequencyType

string

Frequency Type (user, ip).Required if frequency is on.

data.frequency

boolean

Frequency on/off.

data.frequencyCap

integer

Show ads no more than "Frequency Cap" times in "Frequency Period".Required if frequency is on.

data.frequencyPeriod

integer

Frequency Period (min-1,max-3). Required if frequency is on.

data.extendedStatus

string

Campaign extended status

data.createdAt

datetime

Date of creation

data.updatedAt

datetime

Date of last modification

data.deletedAt

datetime

Date of deletion

data.pretarget

int

pretarget

data.pretargets

array

pretargets

3.4.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "data": {
        "id": 5,
        "userId": 7,
        "isActive": true,
        "isRunning": false,
        "type": "video",
        "name": "Updated Campaign #3",
        "isRewarded": false,
        "isDesktopWeb": true,
        "isMobileApp": true,
        "isMobileWeb": false,
        "isSmartphone": true,
        "isTablet": false,
        "isCTV": false,
        "isDOOH": false,
        "aDomain": "kerluke.com",
        "dateStart": "2023-06-04",
        "dateEnd": "2024-12-31",
        "geoCountries": [],
        "geoCountriesIsInclude": true,
        "geoRegions": [],
        "geoRegionsIsInclude": true,
        "geoCities": [],
        "geoCitiesIsInclude": true,
        "contentCategories": [],
        "contentCategoriesIsInclude": true,
        "userAgeMin": 0,
        "userAgeMax": 0,
        "connectionTypes": [
            "wifi"
        ],
        "clickedInventoryCategories": [],
        "deviceCarrier": [],
        "deviceCarrierIsInclude": true,
        "OS": [],
        "OSIsInclude": true,
        "browser": [],
        "browserIsInclude": true,
        "deviceLanguage": [],
        "deviceLanguageIsInclude": true,
        "spentDailyLimit": 257,
        "spentTotalLimit": 8572,
        "impressionsDailyLimit": 295555,
        "impressionsTotalLimit": 400000,
        "clicksDailyLimit": 0,
        "clicksTotalLimit": 0,
        "budgetUse": "fast",
        "allSources": true,
        "classicPush": true,
        "inPagePush": true,
        "pricingModel": null,
        "cpm": 0,
        "adaptiveCpm": false,
        "useCpm": false,
        "landingPageUrl": "",
        "googleAnalyticsTrackingCode": null,
        "dynamicTargeting": [],
        "subscriptionAge": [],
        "frequencyType": "user",
        "frequency": 0,
        "frequencyCap": 1,
        "frequencyPeriod": 1,
        "extendedStatus": "Low Balance",
        "createdAt": "2024-11-12",
        "updatedAt": "2024-11-12",
        "deletedAt": null,
        "pretarget": null,
        "pretargets": []
    }
}

3.5. Delete a Custom Campaign

A `DELETE` request will delete campaign.

3.5.1. HTTP Request

URL

DELETE api/campaigns/6 HTTP/1.1

HEADER
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJLWkl0am9DY3ZRZE1nOTZrIiwic3ViIjoiOCIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.Nzq82smE_MMmRHG5kzKdSgM4sbThocvteQVk7GQW8m0
Content-type: application/x-www-form-urlencoded
DATA
{}

3.5.2. Curl request

$ curl 'https://dsp-api.smartyads.com/api/campaigns/6' -i -X DELETE \
            -H 'Accept: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJLWkl0am9DY3ZRZE1nOTZrIiwic3ViIjoiOCIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.Nzq82smE_MMmRHG5kzKdSgM4sbThocvteQVk7GQW8m0' \
                -H 'Content-type: application/x-www-form-urlencoded' \
    -d '{}'

3.5.3. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{}

4. Upload media

4.1. Store Image

A `POST` request will upload image

4.1.1. Request Body

Path Type Description Required

media_assets

file

Array of files to upload

+

4.1.2. HTTP Request

URL

POST api/media-asset/upload/image HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjAsImV4cCI6MTczMTQxNjEyMCwibmJmIjoxNzMxNDEyNTIwLCJqdGkiOiJoMjlrNnd2TWVWYTZwYVdZIiwic3ViIjoiMzciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.4_0OMzCXAmAbspBk7nFoq8FCwcDzQkZi5AFLgycgO5c
DATA
{
    "media_assets": [
        <Binary file>
    ]
}

4.1.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/media-asset/upload/image' -i -X POST \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjAsImV4cCI6MTczMTQxNjEyMCwibmJmIjoxNzMxNDEyNTIwLCJqdGkiOiJoMjlrNnd2TWVWYTZwYVdZIiwic3ViIjoiMzciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.4_0OMzCXAmAbspBk7nFoq8FCwcDzQkZi5AFLgycgO5c' \
    -d '{
    "media_assets": [
        <Binary file>
    ]
}'

4.1.4. Response Body

Path Type Description

message

string

Result message

data.*.id

integer

Media id

data.*.userId

integer

User Id

data.*.mediaType

string

Media type (html, image, video)

data.*.originName

string

Original file name

data.*.name

string

Uploaded file name

data.*.extension

string

Uploaded file extension

data.*.url

string

Uploaded file url

data.*.width

integer

Uploaded file image width

data.*.height

integer

Uploaded file image height

data.*.weight

integer

Uploaded file size kB

data.*.createdAt

datetime

Date of creation

data.*.updatedAt

datetime

Date of last modification

4.1.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "message": "MediaAsset created.",
    "data": [
        {
            "id": 20,
            "userId": 37,
            "mediaType": "image",
            "originName": "test-image.png",
            "name": "test-image.png",
            "extension": "png",
            "url": "\/storage\/test-image.png",
            "width": 10,
            "height": 10,
            "weight": 91,
            "createdAt": "2024-11-12 11:55:20",
            "updatedAt": "2024-11-12 11:55:20"
        }
    ]
}

4.2. Store video

A `POST` request will upload video

4.2.1. Request Body

Path Type Description Required

media_assets

file

Array of files to upload

+

4.2.2. HTTP Request

URL

POST api/media-asset/upload/video HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjEsImV4cCI6MTczMTQxNjEyMSwibmJmIjoxNzMxNDEyNTIxLCJqdGkiOiI0Q3QyTHF0dmNDaHRXRDhGIiwic3ViIjoiMzgiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.LRcTERRTqPb4xUozZ_LNUSRq8w7ObwMTDZWtyAeVWXs
DATA
{
    "media_assets": [
        <Binary file>
    ]
}

4.2.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/media-asset/upload/video' -i -X POST \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjEsImV4cCI6MTczMTQxNjEyMSwibmJmIjoxNzMxNDEyNTIxLCJqdGkiOiI0Q3QyTHF0dmNDaHRXRDhGIiwic3ViIjoiMzgiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.LRcTERRTqPb4xUozZ_LNUSRq8w7ObwMTDZWtyAeVWXs' \
    -d '{
    "media_assets": [
        <Binary file>
    ]
}'

4.2.4. Response Body

Path Type Description

message

string

Result message

data.*.id

integer

Media id

data.*.userId

integer

User Id

data.*.mediaType

string

Media type (html, image, video)

data.*.originName

string

Original file name

data.*.name

string

Uploaded file name

data.*.extension

string

Uploaded file extension

data.*.url

string

Uploaded file url

data.*.width

integer

Uploaded file image width

data.*.height

integer

Uploaded file image height

data.*.weight

integer

Uploaded file size kB

data.*.mimeType

string

Video mime type

data.*.bitrate

integer

Video bitrate

data.*.duration

integer

Video duration (in seconds)

data.*.durationTime

string

Video duration (in text format)

data.*.playtime

integer

Video playtime

data.*.createdAt

datetime

Date of creation

data.*.updatedAt

datetime

Date of last modification

4.2.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "message": "MediaAsset created.",
    "data": [
        {
            "id": 21,
            "userId": 38,
            "mediaType": "video",
            "originName": "test-video.mp4",
            "name": "test-video.mp4",
            "extension": "mp4",
            "url": "\/storage\/test-video.mp4",
            "width": 320,
            "height": 240,
            "weight": 5312,
            "mimeType": "video\/quicktime",
            "bitrate": 201493,
            "duration": 0,
            "durationTime": "00:00:00",
            "playtime": "00:00:00",
            "createdAt": "2024-11-12 11:55:21",
            "updatedAt": "2024-11-12 11:55:21"
        }
    ]
}

4.3. Store HTML

A `POST` request will upload HTML

4.3.1. Request Body

Path Type Description Required

media_assets

file

Array of files to upload

+

4.3.2. HTTP Request

URL

POST api/media-asset/upload/html HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjEsImV4cCI6MTczMTQxNjEyMSwibmJmIjoxNzMxNDEyNTIxLCJqdGkiOiIwZEpQbnZaU2tZdkxyZnBLIiwic3ViIjoiMzkiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.y29IJvm4n6yW7-a6eZVQGKGb89OMQHA-mdUpTpwNIGM
DATA
{
    "media_assets": [
        <Binary file>
    ]
}

4.3.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/media-asset/upload/html' -i -X POST \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjEsImV4cCI6MTczMTQxNjEyMSwibmJmIjoxNzMxNDEyNTIxLCJqdGkiOiIwZEpQbnZaU2tZdkxyZnBLIiwic3ViIjoiMzkiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.y29IJvm4n6yW7-a6eZVQGKGb89OMQHA-mdUpTpwNIGM' \
    -d '{
    "media_assets": [
        <Binary file>
    ]
}'

4.3.4. Response Body

Path Type Description

message

string

Result message

data.*.id

integer

Media id

data.*.userId

integer

User Id

data.*.mediaType

string

Media type (html, image, video)

data.*.originName

string

Original file name

data.*.name

string

Uploaded file name

data.*.extension

string

Uploaded file extension

data.*.url

string

Uploaded file url

data.*.width

integer

Uploaded file image width

data.*.height

integer

Uploaded file image height

data.*.weight

integer

Uploaded file size kB

data.*.createdAt

datetime

Date of creation

data.*.updatedAt

datetime

Date of last modification

4.3.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "message": "MediaAsset created.",
    "data": [
        {
            "id": 22,
            "userId": 39,
            "mediaType": "html",
            "originName": "test-html.zip",
            "name": "TEST\/index.html",
            "extension": "zip",
            "url": "\/storage\/TEST\/index.html",
            "width": 0,
            "height": 0,
            "weight": 0,
            "createdAt": "2024-11-12 11:55:21",
            "updatedAt": "2024-11-12 11:55:21"
        }
    ]
}

4.4. Store filter list

A `POST` request will upload video

4.4.1. HTTP Request

URL

POST api/parsefile HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjEsImV4cCI6MTczMTQxNjEyMSwibmJmIjoxNzMxNDEyNTIxLCJqdGkiOiJmSDhuMUI4TlVsdEZkTlpBIiwic3ViIjoiNDAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.P3AdnaXL3tDDhSl7OK_Up0JrLPMN4Pdl5XNVjwg-S10
DATA
{
    "file": <Binary file>
}

4.4.2. Curl request

$ curl 'https://dsp-api.smartyads.com/api/parsefile' -i -X POST \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjEsImV4cCI6MTczMTQxNjEyMSwibmJmIjoxNzMxNDEyNTIxLCJqdGkiOiJmSDhuMUI4TlVsdEZkTlpBIiwic3ViIjoiNDAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.P3AdnaXL3tDDhSl7OK_Up0JrLPMN4Pdl5XNVjwg-S10' \
    -d '{
    "file": <Binary file>
}'

4.4.3. Response Body

Path Type Description

message

string

Result message

items

array

List array items

fileName

string

File name

countItems

integer

Count items

4.4.4. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "message": "success",
    "items": [
        "test.com"
    ],
    "fileName": "1731412521_test-filter.csv",
    "countItems": 0
}

5. Creatives

5.1. Creatives list

A `GET` request will return a list of an creatives.

5.1.1. HTTP Request

URL

GET api/creatives HTTP/1.1

HEADER
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTksImV4cCI6MTczMTQxNjExOSwibmJmIjoxNzMxNDEyNTE5LCJqdGkiOiJZZ2lhaHhBNDF5bnJsWUZuIiwic3ViIjoiMjAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.aysGOhuP0KYZHpXuiV3Pl1CXdst_V8wPfS6qrtyJpZI
DATA
{}

5.1.2. Curl request

$ curl 'https://dsp-api.smartyads.com/api/creatives' -i -X GET \
            -H 'Accept: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTksImV4cCI6MTczMTQxNjExOSwibmJmIjoxNzMxNDEyNTE5LCJqdGkiOiJZZ2lhaHhBNDF5bnJsWUZuIiwic3ViIjoiMjAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.aysGOhuP0KYZHpXuiV3Pl1CXdst_V8wPfS6qrtyJpZI' \
    -d '{}'

5.1.3. Response Body

Path Type Description

data.*.id

integer

Creative Id

data.*.userId

integer

User Id

data.*.isActive

boolean

Creative status

data.*.approved

string

Creative approval status (approved, pending, disapproved)

data.*.creativeType

string

Creative type: banner, native, video, audio

data.*.name

string

Creative name

data.*.frequencyType

string

Identify the user to limit the number of the ad shows for the specific user (user, ip). Required if frequency is on.

data.*.frequency

string

Frequency on/off

data.*.frequencyCap

integer

Show ads no more than "Frequency Cap" times in "Frequency Period". Required if frequency is on.

data.*.frequencyPeriod

integer

Frequency period in days (min-1,max-3). Required if frequency is on.

data.*.bidPrice

float

CPM

data.*.autoresize

boolean

autoresize

data.*.adaptiveCpm

bool

adaptiveCpm

data.*.size

string

Image width and height

data.*.weight

string

File size

data.*.folderId

string

Folder Id

data.*.createdAt

datetime

Date of creation

data.*.updatedAt

datetime

Date of last modification

data.*.pendingAt

datetime

Date of pending start

data.*.deletedAt

datetime

Date of deletion

data.*.media.id

integer

Media Id

data.*.media.userId

string

User Id

data.*.media.mediaType

string

Media type (html, image, video)

data.*.media.originName

string

Uploaded file original name

data.*.media.name

string

Uploaded file name

data.*.media.extension

string

Uploaded file extention

data.*.media.url

string

Uploaded file URL

data.*.media.width

integer

Uploaded file image width

data.*.media.height

integer

Uploaded file image height

data.*.media.weight

integer

Uploaded file size

data.*.relation.banner.apiFramework

integer

Rich Media: 0-NO MRAID, 3-MRAID1, 5-MRAID2, 6-MRAID3, 10-ALL MRAID

data.*.relation.banner.admBody

string

Third-party tag

data.*.relation.banner.bannerType

String

Banner type (banner,inBannerVideo)

data.*.relation.banner.clickUrl

string

Click URL

data.*.relation.banner.width

integer

Banner width

data.*.relation.banner.height

integer

Banner height

data.*.relation.banner.childrenCreative

string

childrenCreative

data.*.relation.banner.statusChildrenCreative

string

statusChildrenCreative

data.*.relation.banner.main

boolean

Main creative

data.*.relation.native.smallImageId

integer

Logo media id

data.*.relation.native.largeImageId

integer

Image media id

data.*.relation.native.smallImage.id

integer

Logo media id

data.*.relation.native.smallImage.folderId

string

Folder id

data.*.relation.native.smallImage.userId

integer

User id

data.*.relation.native.smallImage.width

string

width

data.*.relation.native.smallImage.height

string

height

data.*.relation.native.smallImage.name

string

name

data.*.relation.native.smallImage.url

string

url

data.*.relation.native.smallImage.href

string

href

data.*.relation.native.smallImage.originName

string

originName

data.*.relation.native.smallImage.path

string

path

data.*.relation.native.smallImage.extension

string

extension

data.*.relation.native.smallImage.mediaType

string

mediaType

data.*.relation.native.smallImage.createdAt

string

createdAt

data.*.relation.native.smallImage.updatedAt

string

updatedAt

data.*.relation.native.smallImage.deletedAt

string

updatedAt

data.*.relation.native.smallImage.weight

string

weight

data.*.relation.native.largeImage.id

integer

Image media id

data.*.relation.native.largeImage.folderId

string

Folder id

data.*.relation.native.largeImage.userId

integer

User id

data.*.relation.native.largeImage.width

string

width

data.*.relation.native.largeImage.height

string

height

data.*.relation.native.largeImage.name

string

name

data.*.relation.native.largeImage.url

string

url

data.*.relation.native.largeImage.href

string

href

data.*.relation.native.largeImage.originName

string

originName

data.*.relation.native.largeImage.path

string

path

data.*.relation.native.largeImage.extension

string

extension

data.*.relation.native.largeImage.mediaType

string

mediaType

data.*.relation.native.largeImage.createdAt

string

createdAt

data.*.relation.native.largeImage.updatedAt

string

updatedAt

data.*.relation.native.largeImage.deletedAt

string

updatedAt

data.*.relation.native.largeImage.weight

string

weight

data.*.relation.native.assetDataDesc

string

Ad text

data.*.relation.native.assetTitle

string

Ad title

data.*.relation.native.assetDataSponsored

string

Brand name

data.*.relation.native.assetCtaText

string

CTA button text

data.*.relation.native.clickUrl

string

Click URL

data.*.relation.native.displayUrl

string

Display URL

data.*.relation.native.impTracker

string

Impression Tracker

data.*.relation.video.sizes

string

Player size

data.*.relation.video.admBody

string

Third-party tag

data.*.relation.video.mimeType

array

MIME types ("[video/mpeg, video/mp4, video/quicktime, video/x-flv, application/x-shockwave-flash, application/javascript, video/x-ms-wmv, video/webm]")

data.*.relation.video.width

integer

Video width

data.*.relation.video.height

integer

Video height

data.*.relation.video.duration

integer

Video duration

data.*.relation.video.clickUrl

string

Click URL

data.*.relation.video.partyTagFormat

integer

3 party tag format (0-NO VPAID, 1-VPAID 1, 2-VPAID 2, 3-ALL VPAID)

meta.pagination.total

integer

Pagination: total items count

meta.pagination.count

integer

Pagination: page items count

meta.pagination.per_page

integer

Pagination: items per page

meta.pagination.current_page

integer

Pagination: current page number

meta.pagination.total_pages

integer

Pagination: total pages count

meta.pagination.links

object

Pagination links

5.1.4. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "data": [
        {
            "id": 8,
            "userId": 20,
            "isActive": 1,
            "approved": "pending",
            "creativeType": "banner",
            "name": "Banner creative #1",
            "frequencyType": "user",
            "frequency": 0,
            "frequencyCap": 0,
            "frequencyPeriod": 1,
            "bidPrice": "11.74",
            "autoresize": 0,
            "adaptiveCpm": false,
            "size": "512 x 131",
            "weight": "0.19 MB",
            "folderId": null,
            "createdAt": "2024-11-12 00:00:00",
            "updatedAt": "2024-11-12 11:55:19",
            "pendingAt": null,
            "deletedAt": null,
            "media": {
                "id": 8,
                "userId": 20,
                "mediaType": "image",
                "originName": "image.jpg",
                "name": "20_8145167fe715269df844e1acf264b20d.jpg",
                "extension": "jpg",
                "url": "http:\/\/langworth.net\/et-voluptas-vitae-illum-dolor-fugit-officiis-est-animi20_8145167fe715269df844e1acf264b20d.jpg",
                "width": 273,
                "height": 343,
                "weight": 201687
            },
            "relation": {
                "banner": {
                    "apiFramework": 0,
                    "admBody": "<a target=\"_blank\" href=\"http:\/\/www.nolan.net\/quidem-laboriosam-minus-ipsa-laboriosam-quod\" ><img src=\"http:\/\/reynolds.com\/id-ea-quo-nulla-aut-a-quos-perspiciatis\/10.jpg\"\/><\/a>",
                    "bannerType": "banner",
                    "clickUrl": "http:\/\/www.armstrong.biz\/id-qui-praesentium-amet",
                    "width": 512,
                    "height": 131,
                    "childrenCreative": null,
                    "statusChildrenCreative": [],
                    "main": 1
                }
            }
        },
        {
            "id": 9,
            "userId": 20,
            "isActive": 0,
            "approved": "pending",
            "creativeType": "native",
            "name": "Native creative #1",
            "frequencyType": "ip",
            "frequency": 0,
            "frequencyCap": 3,
            "frequencyPeriod": 1,
            "bidPrice": "9.57",
            "autoresize": 0,
            "adaptiveCpm": false,
            "size": "409 x 197",
            "weight": "0.00 MB",
            "folderId": null,
            "createdAt": "2024-11-12 00:00:00",
            "updatedAt": "2024-11-12 11:55:19",
            "pendingAt": null,
            "deletedAt": null,
            "media": {
                "id": 9,
                "userId": 20,
                "mediaType": "image",
                "originName": "image.jpg",
                "name": "20_8145167fe715269df844e1acf264b20d.jpg",
                "extension": "jpg",
                "url": "http:\/\/ohara.com\/20_8145167fe715269df844e1acf264b20d.jpg",
                "width": 215,
                "height": 311,
                "weight": 485856
            },
            "relation": {
                "native": {
                    "smallImageId": 9,
                    "largeImageId": 10,
                    "smallImage": {
                        "id": 9,
                        "folderId": null,
                        "userId": 20,
                        "width": 215,
                        "height": 311,
                        "name": "20_8145167fe715269df844e1acf264b20d.jpg",
                        "url": "http:\/\/ohara.com\/20_8145167fe715269df844e1acf264b20d.jpg",
                        "href": null,
                        "originName": "image.jpg",
                        "path": null,
                        "extension": "jpg",
                        "mediaType": "image",
                        "createdAt": "2024-11-12T11:55:19.000000Z",
                        "updatedAt": "2024-11-12T11:55:19.000000Z",
                        "deletedAt": null,
                        "weight": 485856
                    },
                    "largeImage": {
                        "id": 10,
                        "folderId": null,
                        "userId": 20,
                        "width": 409,
                        "height": 197,
                        "name": "20_8145167fe715269df844e1acf264b20d.jpg",
                        "url": "https:\/\/gerhold.com\/tempore-non-perferendis-repellendus-sed-molestiae-ipsum-ut.html20_8145167fe715269df844e1acf264b20d.jpg",
                        "href": null,
                        "originName": "image.jpg",
                        "path": null,
                        "extension": "jpg",
                        "mediaType": "image",
                        "createdAt": "2024-11-12T11:55:19.000000Z",
                        "updatedAt": "2024-11-12T11:55:19.000000Z",
                        "deletedAt": null,
                        "weight": 162623
                    },
                    "assetDataDesc": "Non sed ut aut impedit.",
                    "assetTitle": "Ut voluptatibus ut eius.",
                    "assetDataSponsored": "Et aut odio sint voluptate aut velit molestiae.",
                    "assetCtaText": "Sed nihil ut et ex.",
                    "clickUrl": "https:\/\/williamson.com\/dolore-tenetur-possimus-vel-quam-voluptatem.html",
                    "displayUrl": "http:\/\/www.kuhic.com\/fugiat-dolor-eius-dicta",
                    "impTracker": null
                }
            }
        },
        {
            "id": 10,
            "userId": 20,
            "isActive": 0,
            "approved": "pending",
            "creativeType": "video",
            "name": "Video creative #1",
            "frequencyType": "ip",
            "frequency": 0,
            "frequencyCap": 4,
            "frequencyPeriod": 1,
            "bidPrice": "0.61",
            "autoresize": 0,
            "adaptiveCpm": false,
            "size": "342 x 101",
            "weight": "0.44 MB",
            "folderId": null,
            "createdAt": "2024-11-12 00:00:00",
            "updatedAt": "2024-11-12 11:55:19",
            "pendingAt": null,
            "deletedAt": null,
            "media": {
                "id": 11,
                "userId": 20,
                "mediaType": "video",
                "originName": "video.mp4",
                "name": "20_8145167fe715269df844e1acf264b20d.mp4",
                "extension": "mp4",
                "url": "http:\/\/greenfelder.info\/minus-dolor-qui-in-eos-adipisci-delectus-officiis20_8145167fe715269df844e1acf264b20d.mp4",
                "width": 468,
                "height": 430,
                "weight": 460846
            },
            "relation": {
                "video": {
                    "sizes": "x-large",
                    "admBody": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<VAST version=\"2.0\">\n<Ad id=\"[HASH]\">\n    <InLine>\n        <AdSystem>DSP<\/AdSystem>\n        <AdTitle>Smartyads<\/AdTitle>\n        <Description>RTB<\/Description>\n        <Creatives>\n            <Creative AdID=\"572\">\n                <Linear>\n                    <Duration>00:00:09<\/Duration>\n                    <VideoClicks>\n                        <ClickThrough><![CDATA[https:\/\/picsum.photos\/]]><\/ClickThrough>\n                    <\/VideoClicks>\n                    <MediaFiles>\n                        <MediaFile delivery=\"streaming\" type=\"video\/quicktime\" width=\"640\" height=\"360\"><![CDATA[http:\/\/72.mp4]]><\/MediaFile>\n                    <\/MediaFiles>\n                <\/Linear>\n            <\/Creative>\n        <\/Creatives>\n    <\/InLine>\n<\/Ad>\n<\/VAST>",
                    "mimeType": [
                        "video\/quicktime"
                    ],
                    "width": 342,
                    "height": 101,
                    "duration": 8,
                    "clickUrl": "http:\/\/www.lueilwitz.com\/fugiat-aut-a-odit-doloribus-libero-accusamus",
                    "partyTagFormat": 0
                }
            }
        }
    ],
    "meta": {
        "pagination": {
            "total": 3,
            "count": 3,
            "per_page": 15,
            "current_page": 1,
            "total_pages": 1,
            "links": []
        }
    }
}

5.2. Get by ID (Banner creative)

A `GET` request with a path parameter of the id will return the creative with that id.

5.2.1. HTTP Request

URL

GET api/creatives/11 HTTP/1.1

HEADER
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTksImV4cCI6MTczMTQxNjExOSwibmJmIjoxNzMxNDEyNTE5LCJqdGkiOiJweW9NVktOd3VZTThqRVNCIiwic3ViIjoiMjEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.yiT6rti7lsm5li1YMGf1I6jL16aoRY-bXiTb0XgvpfM
DATA
{}

5.2.2. Curl request

$ curl 'https://dsp-api.smartyads.com/api/creatives/11' -i -X GET \
            -H 'Accept: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTksImV4cCI6MTczMTQxNjExOSwibmJmIjoxNzMxNDEyNTE5LCJqdGkiOiJweW9NVktOd3VZTThqRVNCIiwic3ViIjoiMjEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.yiT6rti7lsm5li1YMGf1I6jL16aoRY-bXiTb0XgvpfM' \
    -d '{}'

5.2.3. Response Body

Path Type Description

data.id

integer

Creative Id

data.userId

integer

User Id

data.isActive

boolean

Creative status

data.approved

string

Creative approval status (approved, pending, disapproved)

data.creativeType

string

Creative type: banner, native, video, audio

data.name

string

Creative name

data.frequencyType

string

Frequency Type (user, ip).Required if frequency is on.

data.frequency

boolean

Frequency on/off.

data.frequencyCap

integer

Show ads no more than "Frequency Cap" times in "Frequency Period".Required if frequency is on.

data.frequencyPeriod

integer

Frequency Period (min-1,max-3). Required if frequency is on.

data.bidPrice

float

CPM

data.autoresize

boolean

autoresize

data.adaptiveCpm

bool

adaptiveCpm

data.size

string

Image width and height

data.weight

string

File size

data.folderId

string

Folder Id

data.createdAt

datetime

Date of creation

data.updatedAt

datetime

Date of last modification

data.pendingAt

datetime

Date of pending start

data.deletedAt

datetime

Date of deletion

data.media.id

integer

Media Id

data.media.userId

string

User Id

data.media.mediaType

string

Media type (html, image, video)

data.media.originName

string

Uploaded file original name

data.media.name

string

Uploaded file name

data.media.extension

string

Uploaded file extention

data.media.url

string

Uploaded file URL

data.media.width

integer

Uploaded file image width

data.media.height

integer

Uploaded file image height

data.media.weight

integer

Uploaded file size

data.media.modifiedUrl

any

data.relation.banner.apiFramework

integer

Rich Media: 0-NO MRAID, 3-MRAID1, 5-MRAID2, 6-MRAID3, 10-ALL MRAID

data.relation.banner.admBody

string

Third-party tag

data.relation.banner.bannerType

String

Banner type (banner,inBannerVideo)

data.relation.banner.clickUrl

string

Click URL

data.relation.banner.width

integer

Banner width

data.relation.banner.height

integer

Banner height

5.2.4. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "data": {
        "id": 11,
        "userId": 21,
        "isActive": 1,
        "approved": "pending",
        "creativeType": "banner",
        "name": "Banner creative #2",
        "frequencyType": "user",
        "frequency": 0,
        "frequencyCap": 9,
        "frequencyPeriod": 1,
        "bidPrice": "11.76",
        "autoresize": 0,
        "adaptiveCpm": false,
        "size": "668 x 128",
        "weight": "0.36 MB",
        "folderId": null,
        "createdAt": "2024-11-12 00:00:00",
        "updatedAt": "2024-11-12 11:55:19",
        "pendingAt": null,
        "deletedAt": null,
        "relation": {
            "banner": {
                "apiFramework": 0,
                "admBody": "<a target=\"_blank\" href=\"http:\/\/runolfsdottir.com\/et-perferendis-quam-voluptatem-hic-sunt-assumenda\" ><img src=\"http:\/\/lesch.info\/cumque-voluptatem-et-adipisci-fugiat-quaerat-laboriosam.html\/10.jpg\"\/><\/a>",
                "bannerType": "banner",
                "clickUrl": "http:\/\/www.fadel.com\/",
                "width": 668,
                "height": 128
            }
        }
    }
}

5.3. Get by ID (Native creative)

A `GET` request with a path parameter of the id will return the creative with that id.

5.3.1. HTTP Request

URL

GET api/creatives/12 HTTP/1.1

HEADER
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTksImV4cCI6MTczMTQxNjExOSwibmJmIjoxNzMxNDEyNTE5LCJqdGkiOiI2cWZtd3NnRW04MHM3SVdjIiwic3ViIjoiMjIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.kpK99t114FdEUHEP9Xtwt6CKTuRQhvptsD_ufD3RpyE
DATA
{}

5.3.2. Curl request

$ curl 'https://dsp-api.smartyads.com/api/creatives/12' -i -X GET \
            -H 'Accept: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTksImV4cCI6MTczMTQxNjExOSwibmJmIjoxNzMxNDEyNTE5LCJqdGkiOiI2cWZtd3NnRW04MHM3SVdjIiwic3ViIjoiMjIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.kpK99t114FdEUHEP9Xtwt6CKTuRQhvptsD_ufD3RpyE' \
    -d '{}'

5.3.3. Response Body

Path Type Description

data.id

integer

Creative Id

data.userId

integer

User Id

data.isActive

boolean

Creative status

data.approved

string

Creative approval status (approved, pending, disapproved)

data.creativeType

string

Creative type: banner, native, video, audio

data.name

string

Creative name

data.frequencyType

string

Frequency Type (user, ip).Required if frequency is on.

data.frequency

boolean

Frequency on/off.

data.frequencyCap

integer

Show ads no more than "Frequency Cap" times in "Frequency Period".Required if frequency is on.

data.frequencyPeriod

integer

Frequency Period (min-1,max-3). Required if frequency is on.

data.bidPrice

float

CPM

data.autoresize

boolean

autoresize

data.adaptiveCpm

bool

adaptiveCpm

data.size

string

Image width and height

data.weight

string

File size

data.folderId

string

Folder Id

data.createdAt

datetime

Date of creation

data.updatedAt

datetime

Date of last modification

data.pendingAt

datetime

Date of pending start

data.deletedAt

datetime

Date of deletion

data.media.id

integer

Media Id

data.media.userId

string

User Id

data.media.mediaType

string

Media type (html, image, video)

data.media.originName

string

Uploaded file original name

data.media.name

string

Uploaded file name

data.media.extension

string

Uploaded file extention

data.media.url

string

Uploaded file URL

data.media.width

integer

Uploaded file image width

data.media.height

integer

Uploaded file image height

data.media.weight

integer

Uploaded file size

data.media.modifiedUrl

any

data.relation.native.smallImageId

integer

Logo media id

data.relation.native.largeImageId

integer

Image media id

data.relation.native.smallImage.id

integer

Logo media id

data.relation.native.smallImage.folderId

string

Folder id

data.relation.native.smallImage.userId

integer

User id

data.relation.native.smallImage.width

string

width

data.relation.native.smallImage.height

string

height

data.relation.native.smallImage.name

string

name

data.relation.native.smallImage.url

string

url

data.relation.native.smallImage.href

string

href

data.relation.native.smallImage.originName

string

originName

data.relation.native.smallImage.path

string

path

data.relation.native.smallImage.extension

string

extension

data.relation.native.smallImage.mediaType

string

mediaType

data.relation.native.smallImage.createdAt

string

createdAt

data.relation.native.smallImage.updatedAt

string

updatedAt

data.relation.native.smallImage.deletedAt

string

updatedAt

data.relation.native.smallImage.weight

string

weight

data.relation.native.largeImage.id

integer

Image media id

data.relation.native.largeImage.folderId

string

Folder id

data.relation.native.largeImage.userId

integer

User id

data.relation.native.largeImage.width

string

width

data.relation.native.largeImage.height

string

height

data.relation.native.largeImage.name

string

name

data.relation.native.largeImage.url

string

url

data.relation.native.largeImage.href

string

href

data.relation.native.largeImage.originName

string

originName

data.relation.native.largeImage.path

string

path

data.relation.native.largeImage.extension

string

extension

data.relation.native.largeImage.mediaType

string

mediaType

data.relation.native.largeImage.createdAt

string

createdAt

data.relation.native.largeImage.updatedAt

string

updatedAt

data.relation.native.largeImage.deletedAt

string

updatedAt

data.relation.native.largeImage.weight

string

weight

data.relation.native.assetDataDesc

string

Ad text

data.relation.native.assetTitle

string

Ad title

data.relation.native.assetDataSponsored

string

Brand name

data.relation.native.assetCtaText

string

CTA button text

data.relation.native.clickUrl

string

Click URL

data.relation.native.displayUrl

string

Display URL

data.relation.native.impTracker

string

Impression tracker

5.3.4. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "data": {
        "id": 12,
        "userId": 22,
        "isActive": 0,
        "approved": "pending",
        "creativeType": "native",
        "name": "Native creative #2",
        "frequencyType": "ip",
        "frequency": 0,
        "frequencyCap": 2,
        "frequencyPeriod": 1,
        "bidPrice": "10.16",
        "autoresize": 0,
        "adaptiveCpm": false,
        "size": "111 x 329",
        "weight": "0.00 MB",
        "folderId": null,
        "createdAt": "2024-11-12 00:00:00",
        "updatedAt": "2024-11-12 11:55:19",
        "pendingAt": null,
        "deletedAt": null,
        "relation": {
            "native": {
                "smallImageId": 13,
                "largeImageId": 14,
                "smallImage": {
                    "id": 13,
                    "folderId": null,
                    "userId": 22,
                    "width": 255,
                    "height": 315,
                    "name": "22_8145167fe715269df844e1acf264b20d.jpg",
                    "url": "http:\/\/green.com\/voluptates-repellat-soluta-beatae-non22_8145167fe715269df844e1acf264b20d.jpg",
                    "href": null,
                    "originName": "image.jpg",
                    "path": null,
                    "extension": "jpg",
                    "mediaType": "image",
                    "createdAt": "2024-11-12T11:55:19.000000Z",
                    "updatedAt": "2024-11-12T11:55:19.000000Z",
                    "deletedAt": null,
                    "weight": 443439
                },
                "largeImage": {
                    "id": 14,
                    "folderId": null,
                    "userId": 22,
                    "width": 111,
                    "height": 329,
                    "name": "22_8145167fe715269df844e1acf264b20d.jpg",
                    "url": "http:\/\/kassulke.net\/maiores-rerum-omnis-a-voluptas-odio-quos-et22_8145167fe715269df844e1acf264b20d.jpg",
                    "href": null,
                    "originName": "image.jpg",
                    "path": null,
                    "extension": "jpg",
                    "mediaType": "image",
                    "createdAt": "2024-11-12T11:55:19.000000Z",
                    "updatedAt": "2024-11-12T11:55:19.000000Z",
                    "deletedAt": null,
                    "weight": 338485
                },
                "assetDataDesc": "Neque et vitae est sit.",
                "assetTitle": "Et neque sed nihil.",
                "assetDataSponsored": "Quae vero est amet adipisci ea repellendus.",
                "assetCtaText": "Sed quis commodi omnis.",
                "clickUrl": "http:\/\/www.luettgen.org\/aut-soluta-sit-voluptatum-labore-eveniet-est.html",
                "displayUrl": "http:\/\/greenfelder.info\/",
                "impTracker": null
            }
        }
    }
}

5.4. Get by ID (Video creative)

A `GET` request with a path parameter of the id will return the creative with that id.

5.4.1. HTTP Request

URL

GET api/creatives/13 HTTP/1.1

HEADER
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTksImV4cCI6MTczMTQxNjExOSwibmJmIjoxNzMxNDEyNTE5LCJqdGkiOiI4Mmd4WHJIdEQ4U1NLUmtTIiwic3ViIjoiMjMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.HXH9SDzISM6ZF36PCdghRzHr6YuhvTZFpTimDl6xXvs
DATA
{}

5.4.2. Curl request

$ curl 'https://dsp-api.smartyads.com/api/creatives/13' -i -X GET \
            -H 'Accept: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTksImV4cCI6MTczMTQxNjExOSwibmJmIjoxNzMxNDEyNTE5LCJqdGkiOiI4Mmd4WHJIdEQ4U1NLUmtTIiwic3ViIjoiMjMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.HXH9SDzISM6ZF36PCdghRzHr6YuhvTZFpTimDl6xXvs' \
    -d '{}'

5.4.3. Response Body

Path Type Description

data.id

integer

Creative Id

data.userId

integer

User Id

data.isActive

boolean

Creative status

data.approved

string

Creative approval status (approved, pending, disapproved)

data.creativeType

string

Creative type: banner, native, video, audio

data.name

string

Creative name

data.frequencyType

string

Frequency Type (user, ip).Required if frequency is on.

data.frequency

boolean

Frequency on/off.

data.frequencyCap

integer

Show ads no more than "Frequency Cap" times in "Frequency Period".Required if frequency is on.

data.frequencyPeriod

integer

Frequency Period (min-1,max-3). Required if frequency is on.

data.bidPrice

float

CPM

data.autoresize

boolean

autoresize

data.adaptiveCpm

bool

adaptiveCpm

data.size

string

Image width and height

data.weight

string

File size

data.folderId

string

Folder Id

data.createdAt

datetime

Date of creation

data.updatedAt

datetime

Date of last modification

data.pendingAt

datetime

Date of pending start

data.deletedAt

datetime

Date of deletion

data.media.id

integer

Media Id

data.media.userId

string

User Id

data.media.mediaType

string

Media type (html, image, video)

data.media.originName

string

Uploaded file original name

data.media.name

string

Uploaded file name

data.media.extension

string

Uploaded file extention

data.media.url

string

Uploaded file URL

data.media.width

integer

Uploaded file image width

data.media.height

integer

Uploaded file image height

data.media.weight

integer

Uploaded file size

data.media.modifiedUrl

any

data.relation.video.sizes

string

Player size

data.relation.video.admBody

string

Third-party tag

data.relation.video.mimeType

array

MIME types

data.relation.video.width

integer

Video width

data.relation.video.height

integer

Video height

data.relation.video.duration

integer

Video duration

data.relation.video.clickUrl

string

Click URL

data.relation.video.partyTagFormat

integer

3 party tag format (0-NO VPAID, 1-VPAID 1, 2-VPAID 2, 3-ALL VPAID)

5.4.4. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "data": {
        "id": 13,
        "userId": 23,
        "isActive": 0,
        "approved": "pending",
        "creativeType": "video",
        "name": "Video creative #2",
        "frequencyType": "ip",
        "frequency": 0,
        "frequencyCap": 1,
        "frequencyPeriod": 1,
        "bidPrice": "3.09",
        "autoresize": 0,
        "adaptiveCpm": false,
        "size": "635 x 276",
        "weight": "0.35 MB",
        "folderId": null,
        "createdAt": "2024-11-12 00:00:00",
        "updatedAt": "2024-11-12 11:55:19",
        "pendingAt": null,
        "deletedAt": null,
        "relation": {
            "video": {
                "sizes": "medium",
                "admBody": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<VAST version=\"2.0\">\n<Ad id=\"[HASH]\">\n    <InLine>\n        <AdSystem>DSP<\/AdSystem>\n        <AdTitle>Smartyads<\/AdTitle>\n        <Description>RTB<\/Description>\n        <Creatives>\n            <Creative AdID=\"572\">\n                <Linear>\n                    <Duration>00:00:09<\/Duration>\n                    <VideoClicks>\n                        <ClickThrough><![CDATA[https:\/\/picsum.photos\/]]><\/ClickThrough>\n                    <\/VideoClicks>\n                    <MediaFiles>\n                        <MediaFile delivery=\"streaming\" type=\"video\/quicktime\" width=\"640\" height=\"360\"><![CDATA[http:\/\/72.mp4]]><\/MediaFile>\n                    <\/MediaFiles>\n                <\/Linear>\n            <\/Creative>\n        <\/Creatives>\n    <\/InLine>\n<\/Ad>\n<\/VAST>",
                "mimeType": [
                    "video\/mpeg"
                ],
                "width": 635,
                "height": 276,
                "duration": 8,
                "clickUrl": "http:\/\/www.abshire.org\/",
                "partyTagFormat": 0
            }
        }
    }
}

5.5. Create a Custom Banner Creative with Third-party tag

A `POST` request will create new creative.

5.5.1. Request Body

Path Type Description Required

name

string

Creative name

+

creativeType

string

Creative type: banner, native, video, audio

+

frequencyType

string

Frequency Type (user, ip).Required if frequency is on.

frequencyCap

integer

Show ads no more than "Frequency Cap" times in "Frequency Period".Required if frequency is on.

frequency

boolean

Frequency on/off.

frequencyPeriod

integer

Frequency Period (min-1,max-3). Required if frequency is on.

bidPrice

float

CPM

+

banner.apiFramework

integer

Rich Media: 0-NO MRAID, 3-MRAID1, 5-MRAID2, 6-MRAID3, 10-ALL MRAID

banner.width

integer

Banner width

+

banner.height

integer

Banner height

+

banner.admBody

string

Third-party tag

+

categories.IAB1

array

Categories (required if subCategories is empty)

+

subCategories.IAB1

array

SubCategories (required if categories is empty)

+

5.5.2. HTTP Request

URL

POST api/creatives HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTksImV4cCI6MTczMTQxNjExOSwibmJmIjoxNzMxNDEyNTE5LCJqdGkiOiJOYmFwTGprb1p2aDd0RXNkIiwic3ViIjoiMjQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.2VfDXCtv2nDRFMJTpzm5AaJT7Xm50uNLpDcUtzuzSBk
DATA
{
    "name": "Banner creative #3",
    "creativeType": "banner",
    "frequencyType": "user",
    "frequencyCap": 1,
    "frequency": 1,
    "frequencyPeriod": 1,
    "bidPrice": 0.5,
    "banner": {
        "apiFramework": 0,
        "width": 320,
        "height": 200,
        "admBody": "<iframe src=\"url.to.script\"><\/iframe>"
    },
    "categories": {
        "IAB1": true
    },
    "subCategories": {
        "IAB1": [
            "IAB1-1"
        ]
    }
}

5.5.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/creatives' -i -X POST \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTksImV4cCI6MTczMTQxNjExOSwibmJmIjoxNzMxNDEyNTE5LCJqdGkiOiJOYmFwTGprb1p2aDd0RXNkIiwic3ViIjoiMjQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.2VfDXCtv2nDRFMJTpzm5AaJT7Xm50uNLpDcUtzuzSBk' \
    -d '{
    "name": "Banner creative #3",
    "creativeType": "banner",
    "frequencyType": "user",
    "frequencyCap": 1,
    "frequency": 1,
    "frequencyPeriod": 1,
    "bidPrice": 0.5,
    "banner": {
        "apiFramework": 0,
        "width": 320,
        "height": 200,
        "admBody": "<iframe src=\"url.to.script\"><\/iframe>"
    },
    "categories": {
        "IAB1": true
    },
    "subCategories": {
        "IAB1": [
            "IAB1-1"
        ]
    }
}'

5.5.4. Response Body

Path Type Description

message

string

Result message

data.id

integer

Creative Id

data.userId

integer

User Id

data.isActive

boolean

Creative status

data.approved

string

Creative approval status (approved, pending, disapproved)

data.creativeType

string

Creative type: banner, native, video, audio

data.name

string

Creative name

data.frequencyType

string

Frequency Type (user, ip).Required if frequency is on.

data.frequency

boolean

Frequency on/off.

data.frequencyCap

integer

Show ads no more than "Frequency Cap" times in "Frequency Period".Required if frequency is on.

data.frequencyPeriod

integer

Frequency Period (min-1,max-3). Required if frequency is on.

data.bidPrice

float

CPM

data.autoresize

boolean

autoresize

data.adaptiveCpm

bool

adaptiveCpm

data.size

string

Image width and height

data.weight

string

File size

data.folderId

string

Folder Id

data.createdAt

datetime

Date of creation

data.updatedAt

datetime

Date of last modification

data.pendingAt

datetime

Date of pending start

data.deletedAt

datetime

Date of deletion

data.relation.banner.apiFramework

integer

Rich Media: 0-NO MRAID, 3-MRAID1, 5-MRAID2, 6-MRAID3, 10-ALL MRAID

data.relation.banner.admBody

string

Third-party tag

data.relation.banner.bannerType

String

Banner type (banner,inBannerVideo)

data.relation.banner.clickUrl

string

Click URL

data.relation.banner.width

integer

Banner width

data.relation.banner.height

integer

Banner height

5.5.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "message": "Creative created.",
    "data": {
        "id": 14,
        "userId": 24,
        "isActive": null,
        "approved": null,
        "creativeType": "banner",
        "name": "Banner creative #3",
        "frequencyType": "user",
        "frequency": 1,
        "frequencyCap": 1,
        "frequencyPeriod": 1,
        "bidPrice": 0.5,
        "autoresize": null,
        "adaptiveCpm": null,
        "size": "320 x 200",
        "weight": "0.00 MB",
        "folderId": null,
        "createdAt": "2024-11-12 00:00:00",
        "updatedAt": "2024-11-12 11:55:19",
        "pendingAt": null,
        "deletedAt": null,
        "relation": {
            "banner": {
                "apiFramework": 0,
                "admBody": "<iframe src=\"url.to.script\"><\/iframe>",
                "bannerType": null,
                "clickUrl": null,
                "width": 320,
                "height": 200
            }
        }
    }
}

5.6. Create a Custom Banner Creative with Media image

A `POST` request will create new creative.

5.6.1. Request Body

Path Type Description Required

name

string

Creative name

+

creativeType

string

Creative type: banner, native, video, audio

+

mediaId

array

Media image Id

+

frequency

boolean

Frequency on/off.

bidPrice

float

CPM

+

banner.apiFramework

integer

Rich Media: 0-NO MRAID, 3-MRAID1, 5-MRAID2, 6-MRAID3, 10-ALL MRAID

banner.width

integer

Banner width

+

banner.height

integer

Banner height

+

banner.clickUrl

string

Click URL

+

subCategories.IAB1

array

SubCategories (required if categories is empty)

+

categories.IAB1

array

Categories (required if subCategories is empty)

+

5.6.2. HTTP Request

URL

POST api/creatives HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTksImV4cCI6MTczMTQxNjExOSwibmJmIjoxNzMxNDEyNTE5LCJqdGkiOiJhMDQwS0lIYTcxRXFXWXdWIiwic3ViIjoiMjUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.b_68qfXCsNRowNyPG93vCHBOcETG0Jft5Xa04PqZ_vM
DATA
{
    "name": "Banner creative #4",
    "creativeType": "banner",
    "mediaId": 16,
    "frequency": 0,
    "bidPrice": 0.5,
    "banner": {
        "apiFramework": 0,
        "width": 320,
        "height": 200,
        "clickUrl": "http:\/\/www.jacobson.com\/est-fuga-ad-est-qui-maiores"
    },
    "subCategories": {
        "IAB1": [
            "IAB1-1"
        ]
    },
    "categories": {
        "IAB1": true
    }
}

5.6.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/creatives' -i -X POST \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTksImV4cCI6MTczMTQxNjExOSwibmJmIjoxNzMxNDEyNTE5LCJqdGkiOiJhMDQwS0lIYTcxRXFXWXdWIiwic3ViIjoiMjUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.b_68qfXCsNRowNyPG93vCHBOcETG0Jft5Xa04PqZ_vM' \
    -d '{
    "name": "Banner creative #4",
    "creativeType": "banner",
    "mediaId": 16,
    "frequency": 0,
    "bidPrice": 0.5,
    "banner": {
        "apiFramework": 0,
        "width": 320,
        "height": 200,
        "clickUrl": "http:\/\/www.jacobson.com\/est-fuga-ad-est-qui-maiores"
    },
    "subCategories": {
        "IAB1": [
            "IAB1-1"
        ]
    },
    "categories": {
        "IAB1": true
    }
}'

5.6.4. Response Body

Path Type Description

message

string

Result message

data.id

integer

Creative Id

data.userId

integer

User Id

data.isActive

boolean

Creative status

data.approved

string

Creative approval status (approved, pending, disapproved)

data.creativeType

string

Creative type: banner, native, video, audio

data.name

string

Creative name

data.frequencyType

string

Frequency Type (user, ip).Required if frequency is on.

data.frequency

boolean

Frequency on/off.

data.frequencyCap

integer

Show ads no more than "Frequency Cap" times in "Frequency Period".Required if frequency is on.

data.frequencyPeriod

integer

Frequency Period (min-1,max-3). Required if frequency is on.

data.bidPrice

float

CPM

data.autoresize

boolean

autoresize

data.adaptiveCpm

bool

adaptiveCpm

data.size

string

Image width and height

data.weight

string

File size

data.folderId

string

Folder Id

data.createdAt

datetime

Date of creation

data.updatedAt

datetime

Date of last modification

data.pendingAt

datetime

Date of pending start

data.deletedAt

datetime

Date of deletion

data.media.id

integer

Media Id

data.media.userId

string

User Id

data.media.mediaType

string

Media type (html, image, video)

data.media.originName

string

Uploaded file original name

data.media.name

string

Uploaded file name

data.media.extension

string

Uploaded file extention

data.media.url

string

Uploaded file URL

data.media.width

integer

Uploaded file image width

data.media.height

integer

Uploaded file image height

data.media.weight

integer

Uploaded file size

data.media.modifiedUrl

any

data.relation.banner.apiFramework

integer

Rich Media: 0-NO MRAID, 3-MRAID1, 5-MRAID2, 6-MRAID3, 10-ALL MRAID

data.relation.banner.admBody

string

Third-party tag

data.relation.banner.bannerType

String

Banner type (banner,inBannerVideo)

data.relation.banner.clickUrl

string

Click URL

data.relation.banner.width

integer

Banner width

data.relation.banner.height

integer

Banner height

5.6.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "message": "Creative created.",
    "data": {
        "id": 15,
        "userId": 25,
        "isActive": null,
        "approved": null,
        "creativeType": "banner",
        "name": "Banner creative #4",
        "frequencyType": null,
        "frequency": 0,
        "frequencyCap": null,
        "frequencyPeriod": null,
        "bidPrice": 0.5,
        "autoresize": null,
        "adaptiveCpm": null,
        "size": "328 x 430",
        "weight": "0.47 MB",
        "folderId": null,
        "createdAt": "2024-11-12 00:00:00",
        "updatedAt": "2024-11-12 11:55:19",
        "pendingAt": null,
        "deletedAt": null,
        "relation": {
            "banner": {
                "apiFramework": 0,
                "admBody": "<a target=\"_blank\" href=\"https:\/\/www.jacobson.com\/est-fuga-ad-est-qui-maiores\" ><img src=\"https:\/\/mitchell.net\/ad-et-et-aliquam-sunt-animi-quia-exercitationem-sit.html25_8145167fe715269df844e1acf264b20d.jpg\"\/><\/a>",
                "bannerType": null,
                "clickUrl": "https:\/\/www.jacobson.com\/est-fuga-ad-est-qui-maiores",
                "width": 328,
                "height": 430
            }
        }
    }
}

5.7. Create a Custom Banner Creative with Rich Media Html

A `POST` request will create new creative.

5.7.1. Request Body

Path Type Description Required

name

string

Creative name

+

creativeType

string

Creative type: banner, native, video, audio

+

mediaId

array

HTML Media Id

+

frequency

boolean

Frequency on/off.

bidPrice

float

CPM

+

banner.apiFramework

integer

Rich Media: 0-NO MRAID, 3-MRAID1, 5-MRAID2, 6-MRAID3, 10-ALL MRAID

banner.width

integer

Banner width

+

banner.height

integer

Banner height

+

subCategories.IAB1

array

SubCategories (required if categories is empty)

+

categories.IAB1

array

Categories (required if subCategories is empty)

+

5.7.2. HTTP Request

URL

POST api/creatives HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTksImV4cCI6MTczMTQxNjExOSwibmJmIjoxNzMxNDEyNTE5LCJqdGkiOiJrV2htUHAydzZPQmJUTnBsIiwic3ViIjoiMjYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.-0lhdKRwFQeouKhAkDOsUG4j-afCX-ue6RZlxZIC3EY
DATA
{
    "name": "Banner creative #5",
    "creativeType": "banner",
    "mediaId": 17,
    "frequency": 0,
    "bidPrice": 0.5,
    "banner": {
        "apiFramework": 3,
        "width": 320,
        "height": 200
    },
    "subCategories": {
        "IAB1": [
            "IAB1-1"
        ]
    },
    "categories": {
        "IAB1": true
    }
}

5.7.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/creatives' -i -X POST \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTksImV4cCI6MTczMTQxNjExOSwibmJmIjoxNzMxNDEyNTE5LCJqdGkiOiJrV2htUHAydzZPQmJUTnBsIiwic3ViIjoiMjYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.-0lhdKRwFQeouKhAkDOsUG4j-afCX-ue6RZlxZIC3EY' \
    -d '{
    "name": "Banner creative #5",
    "creativeType": "banner",
    "mediaId": 17,
    "frequency": 0,
    "bidPrice": 0.5,
    "banner": {
        "apiFramework": 3,
        "width": 320,
        "height": 200
    },
    "subCategories": {
        "IAB1": [
            "IAB1-1"
        ]
    },
    "categories": {
        "IAB1": true
    }
}'

5.7.4. Response Body

Path Type Description

message

string

Result message

data.id

integer

Creative Id

data.userId

integer

User Id

data.isActive

boolean

Creative status

data.approved

string

Creative approval status (approved, pending, disapproved)

data.creativeType

string

Creative type: banner, native, video, audio

data.name

string

Creative name

data.frequencyType

string

Frequency Type (user, ip).Required if frequency is on.

data.frequency

boolean

Frequency on/off.

data.frequencyCap

integer

Show ads no more than "Frequency Cap" times in "Frequency Period".Required if frequency is on.

data.frequencyPeriod

integer

Frequency Period (min-1,max-3). Required if frequency is on.

data.bidPrice

float

CPM

data.autoresize

boolean

autoresize

data.adaptiveCpm

bool

adaptiveCpm

data.size

string

Image width and height

data.weight

string

File size

data.folderId

string

Folder Id

data.createdAt

datetime

Date of creation

data.updatedAt

datetime

Date of last modification

data.pendingAt

datetime

Date of pending start

data.deletedAt

datetime

Date of deletion

data.media.id

integer

Media Id

data.media.userId

string

User Id

data.media.mediaType

string

Media type (html, image, video)

data.media.originName

string

Uploaded file original name

data.media.name

string

Uploaded file name

data.media.extension

string

Uploaded file extention

data.media.url

string

Uploaded file URL

data.media.width

integer

Uploaded file image width

data.media.height

integer

Uploaded file image height

data.media.weight

integer

Uploaded file size

data.media.modifiedUrl

any

data.relation.banner.apiFramework

integer

Rich Media: 0-NO MRAID, 3-MRAID1, 5-MRAID2, 6-MRAID3, 10-ALL MRAID

data.relation.banner.admBody

string

Third-party tag

data.relation.banner.bannerType

String

Banner type (banner,inBannerVideo)

data.relation.banner.clickUrl

string

Click URL

data.relation.banner.width

integer

Banner width

data.relation.banner.height

integer

Banner height

5.7.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "message": "Creative created.",
    "data": {
        "id": 16,
        "userId": 26,
        "isActive": null,
        "approved": null,
        "creativeType": "banner",
        "name": "Banner creative #5",
        "frequencyType": null,
        "frequency": 0,
        "frequencyCap": null,
        "frequencyPeriod": null,
        "bidPrice": 0.5,
        "autoresize": null,
        "adaptiveCpm": null,
        "size": "320 x 200",
        "weight": "0.26 MB",
        "folderId": null,
        "createdAt": "2024-11-12 00:00:00",
        "updatedAt": "2024-11-12 11:55:19",
        "pendingAt": null,
        "deletedAt": null,
        "relation": {
            "banner": {
                "apiFramework": 3,
                "admBody": "<iframe src=\"https:\/\/www.trantow.com\/aut-et-nesciunt-qui-delectus-ex26_8145167fe715269df844e1acf264b20d\/index.html\"><\/iframe>",
                "bannerType": null,
                "clickUrl": null,
                "width": 320,
                "height": 200
            }
        }
    }
}

5.8. Create a Custom Native Creative

A `POST` request will create new creative.

5.8.1. Request Body

Path Type Description Required

name

string

Creative name

+

creativeType

string

Creative type: banner, native, video, audio

+

frequencyType

string

Frequency Type (user, ip).Required if frequency is on.

frequencyCap

integer

Show ads no more than "Frequency Cap" times in "Frequency Period".Required if frequency is on.

frequencyPeriod

integer

Frequency Period (min-1,max-3). Required if frequency is on.

frequency

boolean

Frequency on/off.

bidPrice

float

CPM

+

folderId

string

Folder Id

native.smallImageId

integer

Logo media id

native.largeImageId

integer

Image media id

+

native.assetDataDesc

string

Ad text

native.assetTitle

string

Ad title

native.assetDataSponsored

string

Brand name

native.assetCtaText

string

CTA button text

native.clickUrl

string

Click URL

+

native.displayUrl

string

Display URL

subCategories.IAB1

array

SubCategories (required if categories is empty)

+

categories.IAB1

array

Categories (required if subCategories is empty)

+

5.8.2. HTTP Request

URL

POST api/creatives HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTksImV4cCI6MTczMTQxNjExOSwibmJmIjoxNzMxNDEyNTE5LCJqdGkiOiIzQTVQczFJMTRTdmZNR3JvIiwic3ViIjoiMjciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.Z_PlKcrgIJz6HV64kfhr8oIUR4hg4tn9obrlOY3MZ3I
DATA
{
    "name": "Native creative #3",
    "creativeType": "native",
    "frequencyType": "user",
    "frequencyCap": 1,
    "frequencyPeriod": 1,
    "frequency": 1,
    "bidPrice": 0.5,
    "folderId": null,
    "native": {
        "smallImageId": 18,
        "largeImageId": 18,
        "assetDataDesc": "Id non iste qui.",
        "assetTitle": "Ea non.",
        "assetDataSponsored": "Rerum ex quia est ea.",
        "assetCtaText": "Eos aut est.",
        "clickUrl": "http:\/\/welch.org\/neque-voluptatibus-corporis-voluptas-impedit-voluptate-rerum-placeat.html",
        "displayUrl": "http:\/\/www.reichel.com\/"
    },
    "subCategories": {
        "IAB1": [
            "IAB1-1"
        ]
    },
    "categories": {
        "IAB1": true
    }
}

5.8.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/creatives' -i -X POST \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTksImV4cCI6MTczMTQxNjExOSwibmJmIjoxNzMxNDEyNTE5LCJqdGkiOiIzQTVQczFJMTRTdmZNR3JvIiwic3ViIjoiMjciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.Z_PlKcrgIJz6HV64kfhr8oIUR4hg4tn9obrlOY3MZ3I' \
    -d '{
    "name": "Native creative #3",
    "creativeType": "native",
    "frequencyType": "user",
    "frequencyCap": 1,
    "frequencyPeriod": 1,
    "frequency": 1,
    "bidPrice": 0.5,
    "folderId": null,
    "native": {
        "smallImageId": 18,
        "largeImageId": 18,
        "assetDataDesc": "Id non iste qui.",
        "assetTitle": "Ea non.",
        "assetDataSponsored": "Rerum ex quia est ea.",
        "assetCtaText": "Eos aut est.",
        "clickUrl": "http:\/\/welch.org\/neque-voluptatibus-corporis-voluptas-impedit-voluptate-rerum-placeat.html",
        "displayUrl": "http:\/\/www.reichel.com\/"
    },
    "subCategories": {
        "IAB1": [
            "IAB1-1"
        ]
    },
    "categories": {
        "IAB1": true
    }
}'

5.8.4. Response Body

Path Type Description

message

string

Result message

data.id

integer

Creative Id

data.userId

integer

User Id

data.isActive

boolean

Creative status

data.approved

string

Creative approval status (approved, pending, disapproved)

data.creativeType

string

Creative type: banner, native, video, audio

data.name

string

Creative name

data.frequencyType

string

Frequency Type (user, ip).Required if frequency is on.

data.frequency

boolean

Frequency on/off.

data.frequencyCap

integer

Show ads no more than "Frequency Cap" times in "Frequency Period".Required if frequency is on.

data.frequencyPeriod

integer

Frequency Period (min-1,max-3). Required if frequency is on.

data.bidPrice

float

CPM

data.autoresize

boolean

autoresize

data.adaptiveCpm

bool

adaptiveCpm

data.size

string

Image width and height

data.weight

string

File size

data.folderId

string

Folder Id

data.createdAt

datetime

Date of creation

data.updatedAt

datetime

Date of last modification

data.pendingAt

datetime

Date of pending start

data.deletedAt

datetime

Date of deletion

data.media.id

integer

Media Id

data.media.userId

string

User Id

data.media.mediaType

string

Media type (html, image, video)

data.media.originName

string

Uploaded file original name

data.media.name

string

Uploaded file name

data.media.extension

string

Uploaded file extention

data.media.url

string

Uploaded file URL

data.media.width

integer

Uploaded file image width

data.media.height

integer

Uploaded file image height

data.media.weight

integer

Uploaded file size

data.media.modifiedUrl

any

data.relation.native.smallImageId

integer

Logo media id

data.relation.native.largeImageId

integer

Image media id

data.relation.native.smallImage.id

integer

Logo media id

data.relation.native.smallImage.folderId

string

Folder id

data.relation.native.smallImage.userId

integer

User id

data.relation.native.smallImage.width

string

width

data.relation.native.smallImage.height

string

height

data.relation.native.smallImage.name

string

name

data.relation.native.smallImage.url

string

url

data.relation.native.smallImage.href

string

href

data.relation.native.smallImage.originName

string

originName

data.relation.native.smallImage.path

string

path

data.relation.native.smallImage.extension

string

extension

data.relation.native.smallImage.mediaType

string

mediaType

data.relation.native.smallImage.createdAt

string

createdAt

data.relation.native.smallImage.updatedAt

string

updatedAt

data.relation.native.smallImage.deletedAt

string

updatedAt

data.relation.native.smallImage.weight

string

weight

data.relation.native.largeImage.id

integer

Image media id

data.relation.native.largeImage.folderId

string

Folder id

data.relation.native.largeImage.userId

integer

User id

data.relation.native.largeImage.width

string

width

data.relation.native.largeImage.height

string

height

data.relation.native.largeImage.name

string

name

data.relation.native.largeImage.url

string

url

data.relation.native.largeImage.href

string

href

data.relation.native.largeImage.originName

string

originName

data.relation.native.largeImage.path

string

path

data.relation.native.largeImage.extension

string

extension

data.relation.native.largeImage.mediaType

string

mediaType

data.relation.native.largeImage.createdAt

string

createdAt

data.relation.native.largeImage.updatedAt

string

updatedAt

data.relation.native.largeImage.deletedAt

string

updatedAt

data.relation.native.largeImage.weight

string

weight

data.relation.native.assetDataDesc

string

Ad text

data.relation.native.assetTitle

string

Ad title

data.relation.native.assetDataSponsored

string

Brand name

data.relation.native.assetCtaText

string

CTA button text

data.relation.native.clickUrl

string

Click URL

data.relation.native.displayUrl

string

Display URL

data.relation.native.impTracker

string

Impression tracker

5.8.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "message": "Creative created.",
    "data": {
        "id": 17,
        "userId": 27,
        "isActive": null,
        "approved": null,
        "creativeType": "native",
        "name": "Native creative #3",
        "frequencyType": "user",
        "frequency": 1,
        "frequencyCap": 1,
        "frequencyPeriod": 1,
        "bidPrice": 0.5,
        "autoresize": null,
        "adaptiveCpm": null,
        "size": "313 x 331",
        "weight": "0.00 MB",
        "folderId": null,
        "createdAt": "2024-11-12 00:00:00",
        "updatedAt": "2024-11-12 11:55:19",
        "pendingAt": null,
        "deletedAt": null,
        "relation": {
            "native": {
                "smallImageId": 18,
                "largeImageId": 18,
                "smallImage": {
                    "id": 18,
                    "folderId": null,
                    "userId": 27,
                    "width": 313,
                    "height": 331,
                    "name": "27_8145167fe715269df844e1acf264b20d.jpg",
                    "url": "http:\/\/www.schoen.com\/pariatur-odit-ut-aspernatur-iure27_8145167fe715269df844e1acf264b20d.jpg",
                    "href": null,
                    "originName": "image.jpg",
                    "path": null,
                    "extension": "jpg",
                    "mediaType": "image",
                    "createdAt": "2024-11-12T11:55:19.000000Z",
                    "updatedAt": "2024-11-12T11:55:19.000000Z",
                    "deletedAt": null,
                    "weight": 487764
                },
                "largeImage": {
                    "id": 18,
                    "folderId": null,
                    "userId": 27,
                    "width": 313,
                    "height": 331,
                    "name": "27_8145167fe715269df844e1acf264b20d.jpg",
                    "url": "http:\/\/www.schoen.com\/pariatur-odit-ut-aspernatur-iure27_8145167fe715269df844e1acf264b20d.jpg",
                    "href": null,
                    "originName": "image.jpg",
                    "path": null,
                    "extension": "jpg",
                    "mediaType": "image",
                    "createdAt": "2024-11-12T11:55:19.000000Z",
                    "updatedAt": "2024-11-12T11:55:19.000000Z",
                    "deletedAt": null,
                    "weight": 487764
                },
                "assetDataDesc": "Id non iste qui.",
                "assetTitle": "Ea non.",
                "assetDataSponsored": "Rerum ex quia est ea.",
                "assetCtaText": "Eos aut est.",
                "clickUrl": "http:\/\/welch.org\/neque-voluptatibus-corporis-voluptas-impedit-voluptate-rerum-placeat.html",
                "displayUrl": "http:\/\/www.reichel.com\/",
                "impTracker": null
            }
        }
    }
}

5.9. Create a Custom Video Creative with Third-party tag

A `POST` request will create new creative.

5.9.1. Request Body

Path Type Description Required

name

string

Creative name

+

creativeType

string

Creative type: banner, native, video, audio

+

frequency

boolean

Frequency on/off.

bidPrice

float

CPM

+

video.sizes

string

Player size

+

video.mimeType

array

MIME types

+

video.admBody

string

Third-party tag

+

subCategories.IAB1

array

SubCategories (required if categories is empty)

+

categories.IAB1

array

Categories (required if subCategories is empty)

+

5.9.2. HTTP Request

URL

POST api/creatives HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTksImV4cCI6MTczMTQxNjExOSwibmJmIjoxNzMxNDEyNTE5LCJqdGkiOiJpRWVxYmlzY3VnYVVCdEc5Iiwic3ViIjoiMjgiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.9wqc6PmDlD8hFhC0IbGV01VTVnUpsnhZOF0OTgdYdj4
DATA
{
    "name": "Video creative #3",
    "creativeType": "video",
    "frequency": 0,
    "bidPrice": 100,
    "video": {
        "sizes": "small",
        "mimeType": [
            "video\/mp4"
        ],
        "admBody": "<iframe src=\"url.to.script\"><\/iframe>"
    },
    "subCategories": {
        "IAB1": [
            "IAB1-1"
        ]
    },
    "categories": {
        "IAB1": true
    }
}

5.9.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/creatives' -i -X POST \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTksImV4cCI6MTczMTQxNjExOSwibmJmIjoxNzMxNDEyNTE5LCJqdGkiOiJpRWVxYmlzY3VnYVVCdEc5Iiwic3ViIjoiMjgiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.9wqc6PmDlD8hFhC0IbGV01VTVnUpsnhZOF0OTgdYdj4' \
    -d '{
    "name": "Video creative #3",
    "creativeType": "video",
    "frequency": 0,
    "bidPrice": 100,
    "video": {
        "sizes": "small",
        "mimeType": [
            "video\/mp4"
        ],
        "admBody": "<iframe src=\"url.to.script\"><\/iframe>"
    },
    "subCategories": {
        "IAB1": [
            "IAB1-1"
        ]
    },
    "categories": {
        "IAB1": true
    }
}'

5.9.4. Response Body

Path Type Description

message

string

Result message

data.id

integer

Creative Id

data.userId

integer

User Id

data.isActive

boolean

Creative status

data.approved

string

Creative approval status (approved, pending, disapproved)

data.creativeType

string

Creative type: banner, native, video, audio

data.name

string

Creative name

data.frequencyType

string

Frequency Type (user, ip).Required if frequency is on.

data.frequency

boolean

Frequency on/off.

data.frequencyCap

integer

Show ads no more than "Frequency Cap" times in "Frequency Period".Required if frequency is on.

data.frequencyPeriod

integer

Frequency Period (min-1,max-3). Required if frequency is on.

data.bidPrice

float

CPM

data.autoresize

boolean

autoresize

data.adaptiveCpm

bool

adaptiveCpm

data.size

string

Image width and height

data.weight

string

File size

data.folderId

string

Folder Id

data.createdAt

datetime

Date of creation

data.updatedAt

datetime

Date of last modification

data.pendingAt

datetime

Date of pending start

data.deletedAt

datetime

Date of deletion

data.relation.video.sizes

string

Player size

data.relation.video.admBody

string

Third-party tag

data.relation.video.mimeType

array

MIME types

data.relation.video.width

integer

Video width

data.relation.video.height

integer

Video height

data.relation.video.duration

integer

Video duration

data.relation.video.clickUrl

string

Click URL

data.relation.video.partyTagFormat

integer

3 party tag format (0-NO VPAID, 1-VPAID 1, 2-VPAID 2, 3-ALL VPAID)

5.9.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "message": "Creative created.",
    "data": {
        "id": 18,
        "userId": 28,
        "isActive": null,
        "approved": null,
        "creativeType": "video",
        "name": "Video creative #3",
        "frequencyType": null,
        "frequency": 0,
        "frequencyCap": null,
        "frequencyPeriod": null,
        "bidPrice": 100,
        "autoresize": null,
        "adaptiveCpm": null,
        "size": "0 x 0",
        "weight": "0.00 MB",
        "folderId": null,
        "createdAt": "2024-11-12 00:00:00",
        "updatedAt": "2024-11-12 11:55:19",
        "pendingAt": null,
        "deletedAt": null,
        "relation": {
            "video": {
                "sizes": "small",
                "admBody": "<iframe src=\"url.to.script\"><\/iframe>",
                "mimeType": [
                    "video\/mp4"
                ],
                "width": 0,
                "height": 0,
                "duration": 0,
                "clickUrl": "",
                "partyTagFormat": null
            }
        }
    }
}

5.10. Create a Custom Video Creative with Media image

A `POST` request will create new creative.

5.10.1. Request Body

Path Type Description Required

name

string

Creative name

+

creativeType

string

Creative type: banner, native, video, audio

+

frequencyType

string

Frequency Type (user, ip).Required if frequency is on.

frequencyCap

integer

Show ads no more than "Frequency Cap" times in "Frequency Period".Required if frequency is on.

frequencyPeriod

integer

Frequency Period (min-1,max-3). Required if frequency is on.

frequency

boolean

Frequency on/off.

mediaId

array

Media video Id

+

bidPrice

float

CPM

+

video.clickUrl

string

Click URL

+

subCategories.IAB1

array

SubCategories (required if categories is empty)

+

categories.IAB1

array

Categories (required if subCategories is empty)

+

5.10.2. HTTP Request

URL

POST api/creatives HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTksImV4cCI6MTczMTQxNjExOSwibmJmIjoxNzMxNDEyNTE5LCJqdGkiOiJ2ejNJems5VFBuQkZ2YVJWIiwic3ViIjoiMjkiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.uTWU8PEaPV_IYix7rNduKPnAUfpEebwve0z1RNBs8zw
DATA
{
    "name": "Video creative #4",
    "creativeType": "video",
    "frequencyType": "user",
    "frequencyCap": 1,
    "frequencyPeriod": 1,
    "frequency": 1,
    "mediaId": 19,
    "bidPrice": 100,
    "video": {
        "clickUrl": "https:\/\/streich.info\/dicta-voluptatem-error-nostrum-omnis-perferendis-dolor-consequuntur.html"
    },
    "subCategories": {
        "IAB1": [
            "IAB1-1"
        ]
    },
    "categories": {
        "IAB1": true
    }
}

5.10.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/creatives' -i -X POST \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTksImV4cCI6MTczMTQxNjExOSwibmJmIjoxNzMxNDEyNTE5LCJqdGkiOiJ2ejNJems5VFBuQkZ2YVJWIiwic3ViIjoiMjkiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.uTWU8PEaPV_IYix7rNduKPnAUfpEebwve0z1RNBs8zw' \
    -d '{
    "name": "Video creative #4",
    "creativeType": "video",
    "frequencyType": "user",
    "frequencyCap": 1,
    "frequencyPeriod": 1,
    "frequency": 1,
    "mediaId": 19,
    "bidPrice": 100,
    "video": {
        "clickUrl": "https:\/\/streich.info\/dicta-voluptatem-error-nostrum-omnis-perferendis-dolor-consequuntur.html"
    },
    "subCategories": {
        "IAB1": [
            "IAB1-1"
        ]
    },
    "categories": {
        "IAB1": true
    }
}'

5.10.4. Response Body

Path Type Description

message

string

Result message

data.id

integer

Creative Id

data.userId

integer

User Id

data.isActive

boolean

Creative status

data.approved

string

Creative approval status (approved, pending, disapproved)

data.creativeType

string

Creative type: banner, native, video, audio

data.name

string

Creative name

data.frequencyType

string

Frequency Type (user, ip).Required if frequency is on.

data.frequency

boolean

Frequency on/off.

data.frequencyCap

integer

Show ads no more than "Frequency Cap" times in "Frequency Period".Required if frequency is on.

data.frequencyPeriod

integer

Frequency Period (min-1,max-3). Required if frequency is on.

data.bidPrice

float

CPM

data.autoresize

boolean

autoresize

data.adaptiveCpm

bool

adaptiveCpm

data.size

string

Image width and height

data.weight

string

File size

data.folderId

string

Folder Id

data.createdAt

datetime

Date of creation

data.updatedAt

datetime

Date of last modification

data.pendingAt

datetime

Date of pending start

data.deletedAt

datetime

Date of deletion

data.media.id

integer

Media Id

data.media.userId

string

User Id

data.media.mediaType

string

Media type (html, image, video)

data.media.originName

string

Uploaded file original name

data.media.name

string

Uploaded file name

data.media.extension

string

Uploaded file extention

data.media.url

string

Uploaded file URL

data.media.width

integer

Uploaded file image width

data.media.height

integer

Uploaded file image height

data.media.weight

integer

Uploaded file size

data.media.modifiedUrl

any

data.relation.video.sizes

string

Player size

data.relation.video.admBody

string

Third-party tag

data.relation.video.mimeType

array

MIME types

data.relation.video.width

integer

Video width

data.relation.video.height

integer

Video height

data.relation.video.duration

integer

Video duration

data.relation.video.clickUrl

string

Click URL

data.relation.video.partyTagFormat

integer

3 party tag format (0-NO VPAID, 1-VPAID 1, 2-VPAID 2, 3-ALL VPAID)

5.10.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "message": "Creative created.",
    "data": {
        "id": 19,
        "userId": 29,
        "isActive": null,
        "approved": null,
        "creativeType": "video",
        "name": "Video creative #4",
        "frequencyType": "user",
        "frequency": 1,
        "frequencyCap": 1,
        "frequencyPeriod": 1,
        "bidPrice": 100,
        "autoresize": null,
        "adaptiveCpm": null,
        "size": "224 x 337",
        "weight": "0.44 MB",
        "folderId": null,
        "createdAt": "2024-11-12 00:00:00",
        "updatedAt": "2024-11-12 11:55:20",
        "pendingAt": null,
        "deletedAt": null,
        "relation": {
            "video": {
                "sizes": "small",
                "admBody": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<VAST version=\"2.0\">\n<Ad id=\"[HASH]\">\n    <InLine>\n        <AdSystem>DSP<\/AdSystem>\n        <AdTitle>Smartyads<\/AdTitle>\n        <Description>RTB<\/Description>\n        <Creatives>\n            <Creative AdID=\"19\">\n                <Linear>\n                    <Duration>00:00:09<\/Duration>\n                    <VideoClicks>\n                        <ClickThrough><![CDATA[https:\/\/streich.info\/dicta-voluptatem-error-nostrum-omnis-perferendis-dolor-consequuntur.html]]><\/ClickThrough>\n                    <\/VideoClicks>\n                    <MediaFiles>\n                        <MediaFile delivery=\"\" type=\"video\/mp4\" width=\"224\" height=\"337\"><![CDATA[http:\/\/denesik.com\/ut-quia-unde-quis.html29_8145167fe715269df844e1acf264b20d.mp4]]><\/MediaFile>\n                    <\/MediaFiles>\n                <\/Linear>\n            <\/Creative>\n        <\/Creatives>\n    <\/InLine>\n<\/Ad>\n<\/VAST>",
                "mimeType": [
                    "video\/mp4"
                ],
                "width": 224,
                "height": 337,
                "duration": 9,
                "clickUrl": "https:\/\/streich.info\/dicta-voluptatem-error-nostrum-omnis-perferendis-dolor-consequuntur.html",
                "partyTagFormat": null
            }
        }
    }
}

5.11. Update a Custom Creative

A `PATCH` request will update creative.

5.11.1. Request Body

Path Type Description Required

isActive

boolean

Creative status

5.11.2. HTTP Request

URL

PUT api/creatives/20 HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjAsImV4cCI6MTczMTQxNjEyMCwibmJmIjoxNzMxNDEyNTIwLCJqdGkiOiJ5WGdqeGVWOXFoY21KRlRKIiwic3ViIjoiMzAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.KxprXPzlW4x1XX_vG5bHmDJQBjHXLlwvgRlxzD9-ifQ
DATA
{
    "isActive": true
}

5.11.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/creatives/20' -i -X PUT \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjAsImV4cCI6MTczMTQxNjEyMCwibmJmIjoxNzMxNDEyNTIwLCJqdGkiOiJ5WGdqeGVWOXFoY21KRlRKIiwic3ViIjoiMzAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.KxprXPzlW4x1XX_vG5bHmDJQBjHXLlwvgRlxzD9-ifQ' \
    -d '{
    "isActive": true
}'

5.11.4. Response Body

Path Type Description

message

string

Result message

data.id

integer

Creative Id

data.userId

integer

User Id

data.isActive

boolean

Creative status

data.approved

string

Creative approval status (approved, pending, disapproved)

data.creativeType

string

Creative type: banner, native, video, audio

data.name

string

Creative name

data.frequencyType

string

Frequency Type (user, ip).Required if frequency is on.

data.frequency

boolean

Frequency on/off.

data.frequencyCap

integer

Show ads no more than "Frequency Cap" times in "Frequency Period".Required if frequency is on.

data.frequencyPeriod

integer

Frequency Period (min-1,max-3). Required if frequency is on.

data.bidPrice

float

CPM

data.autoresize

boolean

autoresize

data.adaptiveCpm

bool

adaptiveCpm

data.size

string

Image width and height

data.weight

string

File size

data.folderId

string

Folder Id

data.createdAt

datetime

Date of creation

data.updatedAt

datetime

Date of last modification

data.pendingAt

datetime

Date of pending start

data.deletedAt

datetime

Date of deletion

data.relation.banner.apiFramework

integer

Rich Media: 0-NO MRAID, 3-MRAID1, 5-MRAID2, 6-MRAID3, 10-ALL MRAID

data.relation.banner.admBody

string

Third-party tag

data.relation.banner.bannerType

String

Banner type (banner,inBannerVideo)

data.relation.banner.clickUrl

string

Click URL

data.relation.banner.width

integer

Banner width

data.relation.banner.height

integer

Banner height

5.11.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "message": "Creative updated.",
    "data": {
        "id": 20,
        "userId": 30,
        "isActive": true,
        "approved": "pending",
        "creativeType": "banner",
        "name": "et ab",
        "frequencyType": "user",
        "frequency": 0,
        "frequencyCap": 0,
        "frequencyPeriod": 1,
        "bidPrice": "0.30",
        "autoresize": 0,
        "adaptiveCpm": false,
        "size": " x ",
        "weight": "0.00 MB",
        "folderId": null,
        "createdAt": "2024-11-12 00:00:00",
        "updatedAt": "2024-11-12 11:55:20",
        "pendingAt": null,
        "deletedAt": null,
        "relation": {
            "banner": {
                "apiFramework": null,
                "admBody": null,
                "bannerType": null,
                "clickUrl": null,
                "width": null,
                "height": null
            }
        }
    }
}

5.12. Delete a Custom Creative

A `DELETE` request will delete creative.

5.12.1. HTTP Request

URL

DELETE api/creatives/21 HTTP/1.1

HEADER
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjAsImV4cCI6MTczMTQxNjEyMCwibmJmIjoxNzMxNDEyNTIwLCJqdGkiOiJjcEhwbGEwb3BTUllhSlIxIiwic3ViIjoiMzEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.7vrfMgjeRfqUxeSYvp4IymEs709fIVVeA4Ll2WEjw6c
Content-type: application/x-www-form-urlencoded
DATA
{}

5.12.2. Curl request

$ curl 'https://dsp-api.smartyads.com/api/creatives/21' -i -X DELETE \
            -H 'Accept: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjAsImV4cCI6MTczMTQxNjEyMCwibmJmIjoxNzMxNDEyNTIwLCJqdGkiOiJjcEhwbGEwb3BTUllhSlIxIiwic3ViIjoiMzEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.7vrfMgjeRfqUxeSYvp4IymEs709fIVVeA4Ll2WEjw6c' \
                -H 'Content-type: application/x-www-form-urlencoded' \
    -d '{}'

5.12.3. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{}

6. Assign Creatives to Campaigns

6.1. Get list of Creatives assigned to Campaign

A `GET` request with Campaign Id in url will get list of Creatives assigned to Campaign

6.1.1. HTTP Request

URL

GET api/campaigns/10/creatives HTTP/1.1

HEADER
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJyb0RQdU04c2dWaHZ0YjJiIiwic3ViIjoiMTIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.-kjWesaW7tXfP-Q0Kz5XQOnH5hkyRrPaFZ8-f1tlo3c
DATA
{}

6.1.2. Curl request

$ curl 'https://dsp-api.smartyads.com/api/campaigns/10/creatives' -i -X GET \
            -H 'Accept: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJyb0RQdU04c2dWaHZ0YjJiIiwic3ViIjoiMTIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.-kjWesaW7tXfP-Q0Kz5XQOnH5hkyRrPaFZ8-f1tlo3c' \
    -d '{}'

6.1.3. Response Body

Path Type Description

data.*.id

integer

Creative Id

data.*.userId

integer

User Id

data.*.isActive

boolean

Creative status

data.*.approved

string

Creative approval status (approved, pending, disapproved)

data.*.creativeType

string

Creative type: banner, native, video, audio

data.*.name

string

Creative name

data.*.frequencyType

string

Identify the user to limit the number of the ad shows for the specific user (user, ip). Required if frequency is on.

data.*.frequency

string

Frequency on/off

data.*.frequencyCap

integer

Show ads no more than "Frequency Cap" times in "Frequency Period". Required if frequency is on.

data.*.frequencyPeriod

integer

Frequency period in days (min-1,max-3). Required if frequency is on.

data.*.bidPrice

float

CPM

data.*.autoresize

boolean

autoresize

data.*.adaptiveCpm

bool

adaptiveCpm

data.*.size

string

Image width and height

data.*.weight

string

File size

data.*.folderId

string

Folder Id

data.*.createdAt

datetime

Date of creation

data.*.updatedAt

datetime

Date of last modification

data.*.pendingAt

datetime

Date of pending start

data.*.deletedAt

datetime

Date of deletion

meta.pagination.total

integer

Pagination: total items count

meta.pagination.count

integer

Pagination: page items count

meta.pagination.per_page

integer

Pagination: items per page

meta.pagination.current_page

integer

Pagination: current page number

meta.pagination.total_pages

integer

Pagination: total pages count

meta.pagination.links

object

Pagination links

6.1.4. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "data": [
        {
            "id": 1,
            "userId": 12,
            "isActive": 1,
            "approved": "pending",
            "creativeType": "banner",
            "name": "Test Creative #1",
            "frequencyType": "ip",
            "frequency": 0,
            "frequencyCap": 3,
            "frequencyPeriod": 1,
            "bidPrice": "10.91",
            "autoresize": 0,
            "adaptiveCpm": false,
            "size": "628 x 349",
            "weight": "0.39 MB",
            "folderId": null,
            "createdAt": "2024-11-12 00:00:00",
            "updatedAt": "2024-11-12 11:55:18",
            "pendingAt": null,
            "deletedAt": null,
            "media": {
                "id": 1,
                "userId": 12,
                "mediaType": "image",
                "originName": "image.jpg",
                "name": "12_d6c4513a95b5ce0ae8ee3db4e204c416.jpg",
                "extension": "jpg",
                "url": "https:\/\/www.orn.net\/facilis-illo-odio-dolor-quod-aut12_d6c4513a95b5ce0ae8ee3db4e204c416.jpg",
                "width": 206,
                "height": 458,
                "weight": 403754
            },
            "relation": {
                "banner": {
                    "apiFramework": 0,
                    "admBody": "<a target=\"_blank\" href=\"https:\/\/moore.biz\/vitae-unde-est-molestiae-sed-recusandae.html\" ><img src=\"http:\/\/ward.com\/excepturi-dicta-explicabo-culpa-sapiente-nemo.html\/10.jpg\"\/><\/a>",
                    "bannerType": "banner",
                    "clickUrl": "http:\/\/pacocha.info\/exercitationem-facere-iste-voluptatibus-officia-eum-praesentium-rem",
                    "width": 628,
                    "height": 349,
                    "childrenCreative": null,
                    "statusChildrenCreative": [],
                    "main": 1
                }
            }
        }
    ],
    "meta": {
        "pagination": {
            "total": 1,
            "count": 1,
            "per_page": 1000,
            "current_page": 1,
            "total_pages": 1,
            "links": []
        }
    }
}

6.2. Replace Creatives assigned to Campaign

A `POST` request with Campaign Id in url will replace Creatives assigned to Campaign

6.2.1. Request Body

Path Type Description Required

ids

array

array of Creative ids

+

6.2.2. HTTP Request

URL

POST api/campaigns/11/creatives HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJzU20zanlaVlREMWU2cHFJIiwic3ViIjoiMTMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0._CPt9Ie1Rwi0BpKIZ5oKbKtCxyT4zEqJP_i4N3c96dk
DATA
{
    "ids": [
        2,
        3
    ]
}

6.2.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/campaigns/11/creatives' -i -X POST \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJzU20zanlaVlREMWU2cHFJIiwic3ViIjoiMTMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0._CPt9Ie1Rwi0BpKIZ5oKbKtCxyT4zEqJP_i4N3c96dk' \
    -d '{
    "ids": [
        2,
        3
    ]
}'

6.2.4. Response Body

Path Type Description

message

string

Result message

6.2.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "message": "Replaced."
}

6.3. Append Creatives assigned to Campaign

A `PATCH` request with Campaign Id in url will append Creatives assigned to Campaign

6.3.1. Request Body

Path Type Description Required

ids

array

array of Creative ids

+

6.3.2. HTTP Request

URL

PATCH api/campaigns/12/creatives HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJTWE9WaVZ5aUVnb3FBbnlVIiwic3ViIjoiMTQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.vkIzzaHEVKt9mNdg9oenEWCNkrjwiL9x0IEbvM41k9o
DATA
{
    "ids": [
        5
    ]
}

6.3.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/campaigns/12/creatives' -i -X PATCH \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJTWE9WaVZ5aUVnb3FBbnlVIiwic3ViIjoiMTQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.vkIzzaHEVKt9mNdg9oenEWCNkrjwiL9x0IEbvM41k9o' \
    -d '{
    "ids": [
        5
    ]
}'

6.3.4. Response Body

Path Type Description

message

string

Result message

6.3.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "message": "Appended."
}

6.4. Remove Creatives assigned to Campaign

A `DELETE` request with Campaign Id in url will remove Creatives assigned to Campaign

6.4.1. Request Body

Path Type Description Required

ids

array

array of Creative ids

+

6.4.2. HTTP Request

URL

DELETE api/campaigns/13/creatives HTTP/1.1

HEADER
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiI5dUdKNW40b3EzS2MyT0tkIiwic3ViIjoiMTUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.8j3zB7mCotRhYuoirWZrmYetHh-ncDGWna9hERPzpSY
Content-type: application/x-www-form-urlencoded
DATA
{
    "ids": [
        7
    ]
}

6.4.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/campaigns/13/creatives' -i -X DELETE \
            -H 'Accept: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiI5dUdKNW40b3EzS2MyT0tkIiwic3ViIjoiMTUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.8j3zB7mCotRhYuoirWZrmYetHh-ncDGWna9hERPzpSY' \
                -H 'Content-type: application/x-www-form-urlencoded' \
    -d '{
    "ids": [
        7
    ]
}'

6.4.4. Response Body

Path Type Description

message

string

Result message

deleted

boolean

Deleting result

6.4.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "message": "Deleted.",
    "deleted": true
}

7. Filterlists

7.1. Filter lists

A `GET` request will return a filter lists

7.1.1. HTTP Request

URL

GET api/filterlist HTTP/1.1

HEADER
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjAsImV4cCI6MTczMTQxNjEyMCwibmJmIjoxNzMxNDEyNTIwLCJqdGkiOiJpbjF4dzN1bEVZUTRvOW1FIiwic3ViIjoiMzIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.WT63vWbTtwlCIRJdF52VH0yAohTKdFyAsqSSsaN9rAg
DATA
{}

7.1.2. Curl request

$ curl 'https://dsp-api.smartyads.com/api/filterlist' -i -X GET \
            -H 'Accept: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjAsImV4cCI6MTczMTQxNjEyMCwibmJmIjoxNzMxNDEyNTIwLCJqdGkiOiJpbjF4dzN1bEVZUTRvOW1FIiwic3ViIjoiMzIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.WT63vWbTtwlCIRJdF52VH0yAohTKdFyAsqSSsaN9rAg' \
    -d '{}'

7.1.3. Response Body

Path Type Description

data.*.id

integer

List Id

data.*.isActive

bool

on/off

data.*.userId

integer

User Id

data.*.title

string

List title

data.*.type

string

Filter list type: listDomains, listApps, listBundles, listDeviceIfas, listPublishers, listIpAdresses, listSiteAndAppIds, listUrls, listTags

data.*.isInclude

boolean

White/Black list

data.*.count

integer

Object count

data.*.createdAt

datetime

Date of creation

data.*.updatedAt

datetime

Date of last modification

meta.pagination.total

integer

Pagination: total items count

meta.pagination.count

integer

Pagination: page items count

meta.pagination.per_page

integer

Pagination: items per page

meta.pagination.current_page

integer

Pagination: current page number

meta.pagination.total_pages

integer

Pagination: total pages count

meta.pagination.links

array

Pagination: array links

7.1.4. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "data": [
        {
            "id": 10,
            "isActive": 0,
            "userId": 32,
            "title": "Test Filter list #1",
            "type": "domain",
            "isInclude": "White",
            "count": 1,
            "createdAt": "2024-11-12",
            "updatedAt": "2024-11-12"
        },
        {
            "id": 11,
            "isActive": 0,
            "userId": 32,
            "title": "Test Filter list #2",
            "type": "ipAdresses",
            "isInclude": "White",
            "count": 2,
            "createdAt": "2024-11-12",
            "updatedAt": "2024-11-12"
        },
        {
            "id": 12,
            "isActive": 0,
            "userId": 32,
            "title": "Test Filter list #3",
            "type": "urls",
            "isInclude": "White",
            "count": 3,
            "createdAt": "2024-11-12",
            "updatedAt": "2024-11-12"
        }
    ],
    "meta": {
        "pagination": {
            "total": 3,
            "count": 3,
            "per_page": 15,
            "current_page": 1,
            "total_pages": 1,
            "links": []
        }
    }
}

7.2. Get filter lists by ID

A `GET` request will return a filter list  by ID

7.2.1. HTTP Request

URL

GET api/filterlist/13 HTTP/1.1

HEADER
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjAsImV4cCI6MTczMTQxNjEyMCwibmJmIjoxNzMxNDEyNTIwLCJqdGkiOiIxQk14YzNZZWRpT0E5U2dtIiwic3ViIjoiMzMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.bSvUG-YSUp2i-K64z7cYHtKLfmhvb7JN6wnyIyYaNCI
DATA
{}

7.2.2. Curl request

$ curl 'https://dsp-api.smartyads.com/api/filterlist/13' -i -X GET \
            -H 'Accept: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjAsImV4cCI6MTczMTQxNjEyMCwibmJmIjoxNzMxNDEyNTIwLCJqdGkiOiIxQk14YzNZZWRpT0E5U2dtIiwic3ViIjoiMzMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.bSvUG-YSUp2i-K64z7cYHtKLfmhvb7JN6wnyIyYaNCI' \
    -d '{}'

7.2.3. Response Body

Path Type Description

data.id

integer

List Id

data.userId

integer

User Id

data.isActive

bool

on/off

data.title

string

List title

data.type

string

Filter list type: listDomains, listApps, listBundles, listDeviceIfas, listPublishers, listIpAdresses, listSiteAndAppIds, listUrls, listTags

data.isInclude

boolean

White/Black list

data.createdAt

datetime

Date of creation

data.updatedAt

datetime

Date of last modification

data.items

array

items

data.listCount

integer

listCount

7.2.4. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "data": {
        "id": 13,
        "userId": 33,
        "isActive": 0,
        "title": "Test Filter list #4",
        "type": "domain",
        "isInclude": true,
        "createdAt": "2024-11-12",
        "updatedAt": "2024-11-12",
        "items": [
            "gaylord.org",
            "hauck.com",
            "reilly.com",
            "roob.info",
            "shanahan.com"
        ],
        "listCount": 5
    }
}

7.3. Create a filter lists

A `POST` request will set new filter list

7.3.1. Request Body

Path Type Description Required

title

string

List title

+

type

string

Filter list type: domain, apps, bundles, deviceIfas, publishers, ipAdresses, siteAndAppsIds, urls, tagIds

+

isInclude

bool

white/black

+

items

array

List array items (can be empty if there fileName)

fileName

string

null

File name from upload file - Store filter list

7.3.2. HTTP Request

URL

POST api/filterlist HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjAsImV4cCI6MTczMTQxNjEyMCwibmJmIjoxNzMxNDEyNTIwLCJqdGkiOiJKdlpGaDlsT1NlMHd0a3pxIiwic3ViIjoiMzQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.pbQ8WncOqpcsW-BOznOEZtwN4_TIRfH9CCcSXrMn8V0
DATA
{
    "title": "Test Filter list #5",
    "type": "ipAdresses",
    "isInclude": true,
    "items": [
        "235.180.29.213",
        "73.108.45.225",
        "90.238.45.37",
        "66.195.197.12",
        "101.216.167.58"
    ],
    "fileName": null
}

7.3.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/filterlist' -i -X POST \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjAsImV4cCI6MTczMTQxNjEyMCwibmJmIjoxNzMxNDEyNTIwLCJqdGkiOiJKdlpGaDlsT1NlMHd0a3pxIiwic3ViIjoiMzQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.pbQ8WncOqpcsW-BOznOEZtwN4_TIRfH9CCcSXrMn8V0' \
    -d '{
    "title": "Test Filter list #5",
    "type": "ipAdresses",
    "isInclude": true,
    "items": [
        "235.180.29.213",
        "73.108.45.225",
        "90.238.45.37",
        "66.195.197.12",
        "101.216.167.58"
    ],
    "fileName": null
}'

7.3.4. Response Body

Path Type Description

message

string

message

data.id

integer

List Id

data.userId

integer

User Id

data.isActive

bool

on/off

data.title

string

List title

data.type

string

Filter list type: listDomains, listApps, listBundles, listDeviceIfas, listPublishers, listIpAdresses, listSiteAndAppIds, listUrls, listTags

data.isInclude

boolean

White (1)/Black list(0)

data.createdAt

datetime

Date of creation

data.updatedAt

datetime

Date of last modification

data.items

array

List array items (can be empty if there fileName)

data.listCount

integer

list count

7.3.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "message": "FilterList created.",
    "data": {
        "id": 14,
        "userId": 34,
        "isActive": null,
        "title": "Test Filter list #5",
        "type": "ipAdresses",
        "isInclude": true,
        "createdAt": "2024-11-12",
        "updatedAt": "2024-11-12",
        "items": [],
        "listCount": 0
    }
}

7.4. Filter lists update

A `PATCH` request will update filter lists

7.4.1. Request Body

Path Type Description Required

title

string

List title

isInclude

bool

white/black

items

array

List array items (can be empty if there fileName)

fileName

string

null

File name from upload file - Store filter list

7.4.2. HTTP Request

URL

PUT api/filterlist/15 HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjAsImV4cCI6MTczMTQxNjEyMCwibmJmIjoxNzMxNDEyNTIwLCJqdGkiOiJMcEZUVWY1ZDdKNkxka2xPIiwic3ViIjoiMzUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.aSAmf9ebAGLxQlD87Ou2Ga-kWjujx0J_oyJWrhtSiEY
DATA
{
    "title": "Test FilterList #7",
    "isInclude": true,
    "items": [
        "http:\/\/www.casper.net\/modi-eius-et-nemo-rerum-dolores-est.html",
        "http:\/\/christiansen.com\/aperiam-consectetur-et-qui-iste",
        "https:\/\/www.cormier.com\/qui-sapiente-laboriosam-maiores-cum-ullam-aut"
    ],
    "fileName": null
}

7.4.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/filterlist/15' -i -X PUT \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjAsImV4cCI6MTczMTQxNjEyMCwibmJmIjoxNzMxNDEyNTIwLCJqdGkiOiJMcEZUVWY1ZDdKNkxka2xPIiwic3ViIjoiMzUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.aSAmf9ebAGLxQlD87Ou2Ga-kWjujx0J_oyJWrhtSiEY' \
    -d '{
    "title": "Test FilterList #7",
    "isInclude": true,
    "items": [
        "http:\/\/www.casper.net\/modi-eius-et-nemo-rerum-dolores-est.html",
        "http:\/\/christiansen.com\/aperiam-consectetur-et-qui-iste",
        "https:\/\/www.cormier.com\/qui-sapiente-laboriosam-maiores-cum-ullam-aut"
    ],
    "fileName": null
}'

7.4.4. Response Body

Path Type Description

message

string

Result message

data.id

integer

List Id

data.userId

integer

User Id

data.isActive

bool

on/off

data.title

string

List title

data.type

string

Filter list type: domain, apps, bundles, deviceIfas, publishers, ipAdresses, siteAndAppsIds, urls, tagIds

data.isInclude

boolean

white/black

data.createdAt

datetime

Date of creation

data.updatedAt

datetime

Date of last modification

data.items

array

List items

data.listCount

integer

listCount

7.4.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "message": "FilterList updated.",
    "data": {
        "id": 15,
        "userId": 35,
        "isActive": 0,
        "title": "Test FilterList #7",
        "type": "urls",
        "isInclude": true,
        "createdAt": "2024-11-12",
        "updatedAt": "2024-11-12",
        "items": [
            "http:\/\/lueilwitz.com\/",
            "http:\/\/www.koch.com\/"
        ],
        "listCount": 2
    }
}

7.5. Filter lists delete

A `DELETE` request will delete a filter lists

7.5.1. HTTP Request

URL

DELETE api/filterlist/16 HTTP/1.1

HEADER
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjAsImV4cCI6MTczMTQxNjEyMCwibmJmIjoxNzMxNDEyNTIwLCJqdGkiOiJpSFE3cEtabmpnV1NBSkMyIiwic3ViIjoiMzYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.yNxBX8MBzFpM8uZZiTQMHwJq82o62k0dKff24iNj08A
Content-type: application/x-www-form-urlencoded
DATA
{}

7.5.2. Curl request

$ curl 'https://dsp-api.smartyads.com/api/filterlist/16' -i -X DELETE \
            -H 'Accept: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjAsImV4cCI6MTczMTQxNjEyMCwibmJmIjoxNzMxNDEyNTIwLCJqdGkiOiJpSFE3cEtabmpnV1NBSkMyIiwic3ViIjoiMzYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.yNxBX8MBzFpM8uZZiTQMHwJq82o62k0dKff24iNj08A' \
                -H 'Content-type: application/x-www-form-urlencoded' \
    -d '{}'

7.5.3. Response Body

Path Type Description

message

string

Result message

deleted

boolean

is deleted

7.5.4. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "message": "FilterList deleted.",
    "deleted": true
}

8. Assign Filterlists to Campaigns

8.1. Get list of Filter Lists assigned to Campaign

A `GET` request with Campaign Id in url will get list of Filter Lists assigned to Campaign

8.1.1. HTTP Request

URL

GET api/campaigns/14/filterlists HTTP/1.1

HEADER
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJSVEZSUHZGOEhxcmFzeGY1Iiwic3ViIjoiMTYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.yq8CjnYMyGiRHVkdnVqD-imv9rGDElxnhawMKSrLuBw
DATA
{}

8.1.2. Curl request

$ curl 'https://dsp-api.smartyads.com/api/campaigns/14/filterlists' -i -X GET \
            -H 'Accept: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJSVEZSUHZGOEhxcmFzeGY1Iiwic3ViIjoiMTYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.yq8CjnYMyGiRHVkdnVqD-imv9rGDElxnhawMKSrLuBw' \
    -d '{}'

8.1.3. Response Body

Path Type Description

data.*.isInclude

boolean

List is Include

data.*.filterList.id

integer

List Id

data.*.filterList.isActive

bool

on/off

data.*.filterList.userId

integer

User Id

data.*.filterList.title

string

List title

data.*.filterList.type

string

Filter list type: listDomains, listApps, listBundles, listDeviceIfas, listPublishers, listIpAdresses, listSiteAndAppIds, listUrls, listTags

data.*.filterList.isInclude

boolean

White/Black list

data.*.filterList.count

integer

Object count

data.*.filterList.createdAt

datetime

Date of creation

data.*.filterList.updatedAt

datetime

Date of last modification

meta.pagination.total

integer

Pagination: total items count

meta.pagination.count

integer

Pagination: page items count

meta.pagination.per_page

integer

Pagination: items per page

meta.pagination.current_page

integer

Pagination: current page number

meta.pagination.total_pages

integer

Pagination: total pages count

meta.pagination.links

array

Pagination: array links

8.1.4. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "data": [
        {
            "isInclude": true,
            "filterList": {
                "id": 1,
                "isActive": 0,
                "userId": 16,
                "title": "Test Filter list #1",
                "type": "domain",
                "isInclude": "White",
                "count": 1,
                "createdAt": "2024-11-12",
                "updatedAt": "2024-11-12"
            }
        },
        {
            "isInclude": true,
            "filterList": {
                "id": 2,
                "isActive": 0,
                "userId": 16,
                "title": "Test Filter list #2",
                "type": "ipAdresses",
                "isInclude": "White",
                "count": 1,
                "createdAt": "2024-11-12",
                "updatedAt": "2024-11-12"
            }
        },
        {
            "isInclude": true,
            "filterList": {
                "id": 3,
                "isActive": 0,
                "userId": 16,
                "title": "Test Filter list #3",
                "type": "urls",
                "isInclude": "White",
                "count": 1,
                "createdAt": "2024-11-12",
                "updatedAt": "2024-11-12"
            }
        }
    ],
    "meta": {
        "pagination": {
            "total": 3,
            "count": 3,
            "per_page": 1000,
            "current_page": 1,
            "total_pages": 1,
            "links": []
        }
    }
}

8.2. Replace Filter Lists assigned to Campaign

A `POST` request with Campaign Id in url will replace Filter Lists assigned to Campaign

8.2.1. Request Body

Path Type Description Required

items.*.id

integer

Filter list id

+

8.2.2. HTTP Request

URL

POST api/campaigns/15/filterlists HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJuTGtjZUVBd3o4V1Y3QzlwIiwic3ViIjoiMTciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.np8HEE45_msKi1RPLHZDexWfiljdFOa3wta5eKslqas
DATA
{
    "items": [
        {
            "id": 4
        },
        {
            "id": 5
        }
    ]
}

8.2.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/campaigns/15/filterlists' -i -X POST \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJuTGtjZUVBd3o4V1Y3QzlwIiwic3ViIjoiMTciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.np8HEE45_msKi1RPLHZDexWfiljdFOa3wta5eKslqas' \
    -d '{
    "items": [
        {
            "id": 4
        },
        {
            "id": 5
        }
    ]
}'

8.2.4. Response Body

Path Type Description

message

string

Result message

8.2.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "message": "Replaced."
}

8.3. Append Filter Lists assigned to Campaign

A `PATCH` request with Campaign Id in url will append Filter Lists assigned to Campaign

8.3.1. Request Body

Path Type Description Required

items.*.id

integer

Filter list id

+

items.*.isInclude

boolean

Filter list type: include or exclude

+

8.3.2. HTTP Request

URL

PATCH api/campaigns/16/filterlists HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiIwZWMySGtmRGxzSFM0TG0zIiwic3ViIjoiMTgiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.zLm_z4cO8gwvMBpyWo5AY_UG4yWv7KKtPh3pyBdO9nk
DATA
{
    "items": [
        {
            "id": 7,
            "isInclude": true
        }
    ]
}

8.3.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/campaigns/16/filterlists' -i -X PATCH \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiIwZWMySGtmRGxzSFM0TG0zIiwic3ViIjoiMTgiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.zLm_z4cO8gwvMBpyWo5AY_UG4yWv7KKtPh3pyBdO9nk' \
    -d '{
    "items": [
        {
            "id": 7,
            "isInclude": true
        }
    ]
}'

8.3.4. Response Body

Path Type Description

message

string

Result message

8.3.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "message": "Appended."
}

8.4. Remove Filter Lists assigned to Campaign

A `DELETE` request with Campaign Id in url will remove Filter Lists assigned to Campaign

8.4.1. Request Body

Path Type Description Required

ids

array

List id to remove

+

8.4.2. HTTP Request

URL

DELETE api/campaigns/17/filterlists HTTP/1.1

HEADER
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJvdFdyaVhGRFpXSHRBWUEzIiwic3ViIjoiMTkiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.SDpf2aRR8YySUQyY7Uo4feYGSb9TVnUfNjAQ-fal84o
Content-type: application/x-www-form-urlencoded
DATA
{
    "ids": [
        9
    ]
}

8.4.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/campaigns/17/filterlists' -i -X DELETE \
            -H 'Accept: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJvdFdyaVhGRFpXSHRBWUEzIiwic3ViIjoiMTkiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.SDpf2aRR8YySUQyY7Uo4feYGSb9TVnUfNjAQ-fal84o' \
                -H 'Content-type: application/x-www-form-urlencoded' \
    -d '{
    "ids": [
        9
    ]
}'

8.4.4. Response Body

Path Type Description

message

string

Result message

8.4.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "message": "Deleted."
}

9. Optimization Rule

9.1. Rule

A `GET` request will return a optimization rules

9.1.1. HTTP Request

URL

GET api/optimization-rule HTTP/1.1

HEADER
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjEsImV4cCI6MTczMTQxNjEyMSwibmJmIjoxNzMxNDEyNTIxLCJqdGkiOiJNSTdDZVVic01NMmpEdXlBIiwic3ViIjoiNDEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.Xjz8IlnoMlssrS1iubqT9q5v9SXpP56Y8hMMDfipxiU
DATA
{}

9.1.2. Curl request

$ curl 'https://dsp-api.smartyads.com/api/optimization-rule' -i -X GET \
            -H 'Accept: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjEsImV4cCI6MTczMTQxNjEyMSwibmJmIjoxNzMxNDEyNTIxLCJqdGkiOiJNSTdDZVVic01NMmpEdXlBIiwic3ViIjoiNDEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.Xjz8IlnoMlssrS1iubqT9q5v9SXpP56Y8hMMDfipxiU' \
    -d '{}'

9.1.3. Response Body

Path Type Description

data.*.id

integer

Id

data.*.userId

integer

User Id

data.*.ownerCampaignId

integer

Campaign id where it was created rule

data.*.name

string

Name

data.*.timeRange

string

type: last_day,last_3_days,last_week,last_month

data.*.then

string

type: whitelist_source,blacklist_source

data.*.targetFilterListId

integer

Filter list id

data.*.conditions

Array

Conditions

data.*.createdAt

datetime

Date of creation

data.*.updatedAt

datetime

Date of last modification

meta.pagination.total

integer

Pagination: total items count

meta.pagination.count

integer

Pagination: page items count

meta.pagination.per_page

integer

Pagination: items per page

meta.pagination.current_page

integer

Pagination: current page number

meta.pagination.total_pages

integer

Pagination: total pages count

meta.pagination.links

array

Pagination: array links

9.1.4. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "data": [
        {
            "id": 4,
            "userId": 41,
            "ownerCampaignId": 0,
            "name": "TEST Rule#1",
            "timeRange": "last_week",
            "then": "whitelist_source",
            "targetFilterListId": 1,
            "conditions": [],
            "createdAt": "2024-11-12T11:55:21.000000Z",
            "updatedAt": "2024-11-12T11:55:21.000000Z"
        }
    ],
    "meta": {
        "pagination": {
            "total": 1,
            "count": 1,
            "per_page": 15,
            "current_page": 1,
            "total_pages": 1,
            "links": []
        }
    }
}

9.2. Get rule by ID

A `GET` request will return a optimization rule

9.2.1. HTTP Request

URL

GET api/optimization-rule/5 HTTP/1.1

HEADER
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjEsImV4cCI6MTczMTQxNjEyMSwibmJmIjoxNzMxNDEyNTIxLCJqdGkiOiJidkhOanpVR1hlWndydkpIIiwic3ViIjoiNDIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.Vns3T1pSVQV9AV56qn_YYGvk7dxmYrUWiAg5FoBeJPs
DATA
{}

9.2.2. Curl request

$ curl 'https://dsp-api.smartyads.com/api/optimization-rule/5' -i -X GET \
            -H 'Accept: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjEsImV4cCI6MTczMTQxNjEyMSwibmJmIjoxNzMxNDEyNTIxLCJqdGkiOiJidkhOanpVR1hlWndydkpIIiwic3ViIjoiNDIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.Vns3T1pSVQV9AV56qn_YYGvk7dxmYrUWiAg5FoBeJPs' \
    -d '{}'

9.2.3. Response Body

Path Type Description

data.id

integer

Id

data.userId

integer

User Id

data.ownerCampaignId

integer

Campaign id where it was created rule

data.name

string

Name

data.timeRange

string

type: last_day,last_3_days,last_week,last_month

data.then

string

type: whitelist_source,blacklist_source

data.targetFilterListId

integer

Filter list id

data.conditions

Array

Conditions

data.createdAt

datetime

Date of creation

data.updatedAt

datetime

Date of last modification

9.2.4. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "data": {
        "id": 5,
        "userId": 42,
        "ownerCampaignId": 0,
        "name": "TEST Rule#1",
        "timeRange": "last_week",
        "then": "whitelist_source",
        "targetFilterListId": 1,
        "conditions": [],
        "createdAt": "2024-11-12T11:55:21.000000Z",
        "updatedAt": "2024-11-12T11:55:21.000000Z"
    }
}

9.3. Create a rule

A `POST` request will return a optimization rule

9.3.1. Request Body

Path Type Description Required

name

string

Name

+

timeRange

string

type: (last_day,last_3_days,last_week,last_month)

+

then

string

type: (whitelist_source,blacklist_source)

+

targetFilterListId

integer

Filter list id

+

conditions.*.condition

string

Condition type: (when,and,or) first condition must be - when

+

conditions.*.action

string

Actions type: (ctr,clicks,winrate,impressions,dspSpend)

+

conditions.*.comparison

string

Comparison type: (>,<,=)

+

conditions.*.value

string

Value

+

9.3.2. HTTP Request

URL

POST api/optimization-rule HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjEsImV4cCI6MTczMTQxNjEyMSwibmJmIjoxNzMxNDEyNTIxLCJqdGkiOiJKSmEycU5ncGtydzRHWTNCIiwic3ViIjoiNDMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.sxeTFUN7-dlgTNNTr-g8tN02xZhZxO1-EtsnbC3moIc
DATA
{
    "name": "Test",
    "timeRange": "last_day",
    "then": "blacklist_source",
    "targetFilterListId": 17,
    "conditions": [
        {
            "condition": "when",
            "action": "dspPrice",
            "comparison": ">",
            "value": "0.5"
        }
    ]
}

9.3.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/optimization-rule' -i -X POST \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjEsImV4cCI6MTczMTQxNjEyMSwibmJmIjoxNzMxNDEyNTIxLCJqdGkiOiJKSmEycU5ncGtydzRHWTNCIiwic3ViIjoiNDMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.sxeTFUN7-dlgTNNTr-g8tN02xZhZxO1-EtsnbC3moIc' \
    -d '{
    "name": "Test",
    "timeRange": "last_day",
    "then": "blacklist_source",
    "targetFilterListId": 17,
    "conditions": [
        {
            "condition": "when",
            "action": "dspPrice",
            "comparison": ">",
            "value": "0.5"
        }
    ]
}'

9.3.4. Response Body

Path Type Description

data.id

integer

Id

data.userId

integer

User Id

data.ownerCampaignId

integer

Campaign id where it was created rule

data.name

string

Name

data.timeRange

string

type: (last_day,last_3_days,last_week,last_month)

data.then

string

type: (whitelist_source,blacklist_source)

data.targetFilterListId

integer

Filter list id

data.conditions

Array

Conditions

data.createdAt

datetime

Date of creation

data.updatedAt

datetime

Date of last modification

9.3.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "data": {
        "id": 6,
        "userId": 0,
        "ownerCampaignId": 0,
        "name": "Test",
        "timeRange": "last_day",
        "then": "blacklist_source",
        "targetFilterListId": 17,
        "conditions": [],
        "createdAt": "2024-11-12T11:55:21.000000Z",
        "updatedAt": "2024-11-12T11:55:21.000000Z"
    }
}

9.4. Rule update

A `PATCH` request will return a optimization rule

9.4.1. Request Body

Path Type Description Required

name

string

Name

+

timeRange

string

type: (last_day,last_3_days,last_week,last_month)

+

then

string

type: (whitelist_source,blacklist_source)

+

targetFilterListId

integer

Filter list id

+

conditions.*.condition

string

Condition type: (when,and,or) first condition must be - when

+

conditions.*.action

string

Actions type: (ctr,clicks,winrate,impressions,dspSpend)

+

conditions.*.comparison

string

Comparison type: (>,<,=)

+

conditions.*.value

string

Value

+

9.4.2. HTTP Request

URL

PUT api/optimization-rule/7 HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjEsImV4cCI6MTczMTQxNjEyMSwibmJmIjoxNzMxNDEyNTIxLCJqdGkiOiJiWkFxTUR5eGNrN0l0elZNIiwic3ViIjoiNDQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.0poSgYuhcgvatVnDJo7-6XSgWH8GIOy0GhMIjKvihM0
DATA
{
    "name": "Test#2",
    "timeRange": "last_week",
    "then": "whitelist_source",
    "targetFilterListId": 18,
    "conditions": [
        {
            "condition": "when",
            "action": "dspPrice",
            "comparison": "<",
            "value": "1"
        }
    ]
}

9.4.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/optimization-rule/7' -i -X PUT \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjEsImV4cCI6MTczMTQxNjEyMSwibmJmIjoxNzMxNDEyNTIxLCJqdGkiOiJiWkFxTUR5eGNrN0l0elZNIiwic3ViIjoiNDQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.0poSgYuhcgvatVnDJo7-6XSgWH8GIOy0GhMIjKvihM0' \
    -d '{
    "name": "Test#2",
    "timeRange": "last_week",
    "then": "whitelist_source",
    "targetFilterListId": 18,
    "conditions": [
        {
            "condition": "when",
            "action": "dspPrice",
            "comparison": "<",
            "value": "1"
        }
    ]
}'

9.4.4. Response Body

Path Type Description

data.id

integer

Id

data.userId

integer

User Id

data.ownerCampaignId

integer

Campaign id where it was created rule

data.name

string

Name

data.timeRange

string

type: (last_day,last_3_days,last_week,last_month)

data.then

string

type: (whitelist_source,blacklist_source)

data.targetFilterListId

integer

Filter list id

data.conditions

Array

Conditions

data.createdAt

datetime

Date of creation

data.updatedAt

datetime

Date of last modification

9.4.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "data": {
        "id": 7,
        "userId": 44,
        "ownerCampaignId": 0,
        "name": "Test#2",
        "timeRange": "last_week",
        "then": "whitelist_source",
        "targetFilterListId": 18,
        "conditions": [],
        "createdAt": "2024-11-12T11:55:21.000000Z",
        "updatedAt": "2024-11-12T11:55:21.000000Z"
    }
}

9.5. Remove Rule assigned to Campaign

A `DELETE` request will delete a Optimization rule relation

9.5.1. HTTP Request

URL

DELETE api/optimization-rule/8 HTTP/1.1

HEADER
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjEsImV4cCI6MTczMTQxNjEyMSwibmJmIjoxNzMxNDEyNTIxLCJqdGkiOiIxeTBvZUlITDUyQUFzUlQ3Iiwic3ViIjoiNDUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.e6Okp7q1ea_ugtWhDaye67NZnnEHiPntkv_VQR0S0dg
Content-type: application/x-www-form-urlencoded
DATA
{}

9.5.2. Curl request

$ curl 'https://dsp-api.smartyads.com/api/optimization-rule/8' -i -X DELETE \
            -H 'Accept: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MjEsImV4cCI6MTczMTQxNjEyMSwibmJmIjoxNzMxNDEyNTIxLCJqdGkiOiIxeTBvZUlITDUyQUFzUlQ3Iiwic3ViIjoiNDUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.e6Okp7q1ea_ugtWhDaye67NZnnEHiPntkv_VQR0S0dg' \
                -H 'Content-type: application/x-www-form-urlencoded' \
    -d '{}'

9.5.3. Response Body

Path Type Description

deleted

boolean

is deleted

9.5.4. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "deleted": true
}

10. Assign Optimization rules to Campaigns

10.1. Get Rule assigned to Campaign

A `GET` request will return a optimization rule relation

10.1.1. HTTP Request

URL

GET api/campaign/7/optimization-rule-relation HTTP/1.1

HEADER
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJuMEVHaUNSaGdMclYxY0hEIiwic3ViIjoiOSIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.ZagUc8j9rZZKgovEdBLL2FVVKsC_ivDXfn-YBpnZkqI
DATA
{}

10.1.2. Curl request

$ curl 'https://dsp-api.smartyads.com/api/campaign/7/optimization-rule-relation' -i -X GET \
            -H 'Accept: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJuMEVHaUNSaGdMclYxY0hEIiwic3ViIjoiOSIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.ZagUc8j9rZZKgovEdBLL2FVVKsC_ivDXfn-YBpnZkqI' \
    -d '{}'

10.1.3. Response Body

Path Type Description

data.id

integer

Id

data.userId

integer

User Id

data.ownerCampaignId

integer

Campaign id where it was created rule

data.name

string

Name

data.timeRange

string

last_day

last_3_days

last_week

last_month

data.then

string

whitelist_source

blacklist_source

data.targetFilterListId

integer

Filter list id

data.conditions.*.condition

string

Condition (when

and

or) first condition must be - when

data.conditions.*.action

string

Actions (ctr

clicks

winrate

impressions

dspSpend)

data.conditions.*.comparison

string

Comparison types (>

<

=)

data.conditions.*.value

string

Value

data.createdAt

datetime

Date of creation

data.updatedAt

datetime

Date of last modification

10.1.4. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "data": {
        "id": 1,
        "userId": 9,
        "ownerCampaignId": 7,
        "name": "TEST Rule#1",
        "timeRange": "last_week",
        "then": "whitelist_source",
        "targetFilterListId": 1,
        "conditions": [
            {
                "condition": "when",
                "action": "ctr",
                "comparison": ">",
                "value": 5000
            }
        ],
        "createdAt": "2024-11-12T11:55:18.000000Z",
        "updatedAt": "2024-11-12T11:55:18.000000Z"
    }
}

10.2. Replace Rule assigned to Campaign

A `POST` request will return a optimization rule relation

10.2.1. Request Body

Path Type Description Required

campaignId

integer

campaignId

+

ruleId

integer

ruleId

+

10.2.2. HTTP Request

URL

POST api/campaign/optimization-rule-relation HTTP/1.1

HEADER
Accept: application/json
Content-type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJ4SDVzaUk1UnNkMHhJZ3h3Iiwic3ViIjoiMTAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.QVZmW7CFwpgSG0I8QV9iH3onxQHd-wvRktiR49I9IZ8
DATA
{
    "campaignId": 8,
    "ruleId": 2
}

10.2.3. Curl request

$ curl 'https://dsp-api.smartyads.com/api/campaign/optimization-rule-relation' -i -X POST \
            -H 'Accept: application/json' \
                -H 'Content-type: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJ4SDVzaUk1UnNkMHhJZ3h3Iiwic3ViIjoiMTAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.QVZmW7CFwpgSG0I8QV9iH3onxQHd-wvRktiR49I9IZ8' \
    -d '{
    "campaignId": 8,
    "ruleId": 2
}'

10.2.4. Response Body

Path Type Description

campaignId

integer

campaignId

ruleId

integer

ruleId

10.2.5. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "campaignId": 0,
    "ruleId": 2
}

10.3. Remove Rule assigned to Campaign

A `DELETE` request will delete a Optimization rule relation

10.3.1. HTTP Request

URL

DELETE api/campaign/9/optimization-rule-relation HTTP/1.1

HEADER
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJFV1ZvQm5JMGhQMkwwODBZIiwic3ViIjoiMTEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.9hdWUscFx0jiKYX-RG7qf9Hot37G8qSYNjxPCPG_svM
Content-type: application/x-www-form-urlencoded
DATA
{}

10.3.2. Curl request

$ curl 'https://dsp-api.smartyads.com/api/campaign/9/optimization-rule-relation' -i -X DELETE \
            -H 'Accept: application/json' \
                -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MzE0MTI1MTgsImV4cCI6MTczMTQxNjExOCwibmJmIjoxNzMxNDEyNTE4LCJqdGkiOiJFV1ZvQm5JMGhQMkwwODBZIiwic3ViIjoiMTEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.9hdWUscFx0jiKYX-RG7qf9Hot37G8qSYNjxPCPG_svM' \
                -H 'Content-type: application/x-www-form-urlencoded' \
    -d '{}'

10.3.3. Response Body

Path Type Description

deleted

boolean

is deleted

10.3.4. HTTP Response

HTTP/1.0 200 OK
    Content-type: application/json
    Access-control-allow-origin: *
    X-ratelimit-limit: 500
    X-ratelimit-remaining: 499
{
    "deleted": true
}

Postman collection

Request validation list

Campaign.contentCategories
  • IAB1

  • IAB2

  • IAB3

  • IAB4

  • IAB5

  • IAB6

  • IAB7

  • IAB8

  • IAB9

  • IAB10

  • IAB11

  • IAB12

  • IAB13

  • IAB14

  • IAB15

  • IAB16

  • IAB17

  • IAB18

  • IAB19

  • IAB20

  • IAB21

  • IAB22

  • IAB23

    Campaign.connectionTypes
  • wifi

  • ethernet

  • cellular_all

  • cellular_all

  • cellular_3g

  • cellular_4g

Campaign.OS

  • 'Android',

  • 'Android 8.0',

  • 'Android 8.1',

  • 'Android 9.0',

  • 'Android 10.0',

  • 'Android 11.0',

  • 'Android 12.0',

  • 'Android 13.0',

  • 'Android 14.0',

  • 'iOS',

  • 'iOS 10.0',

  • 'iOS 10.1',

  • 'iOS 10.2',

  • 'iOS 10.3',

  • 'iOS 11.0',

  • 'iOS 11.1',

  • 'iOS 11.2',

  • 'iOS 11.3',

  • 'iOS 12.0',

  • 'iOS 12.1',

  • 'iOS 12.2',

  • 'iOS 12.3',

  • 'iOS 12.4',

  • 'iOS 13.1',

  • 'iOS 13.2',

  • 'iOS 13.3',

  • 'iOS 13.4',

  • 'iOS 13.5',

  • 'iOS 13.6',

  • 'iOS 14.0',

  • 'iOS 14.1',

  • 'iOS 14.2',

  • 'iOS 14.3',

  • 'iOS 14.4',

  • 'iOS 14.5',

  • 'iOS 14.6',

  • 'iOS 14.7',

  • 'iOS 14.8',

  • 'iOS 15.0',

  • 'iOS 15.1',

  • 'iOS 15.2',

  • 'iOS 15.3',

  • 'iOS 15.4',

  • 'iOS 15.5',

  • 'iOS 15.6',

  • 'iOS 15.7',

  • 'iOS 16.0',

  • 'iOS 16.1',

  • 'iOS 16.2',

  • 'iOS 16.3',

  • 'iOS 16.4',

  • 'Mac OS',

  • 'Mac OS 10.1',

  • 'Mac OS 10.2',

  • 'Mac OS 10.3',

  • 'Mac OS 10.4',

  • 'Mac OS 10.5',

  • 'Mac OS 10.6',

  • 'Mac OS 10.7',

  • 'Mac OS 10.8',

  • 'Mac OS 10.9',

  • 'Mac OS 10.10',

  • 'Mac OS 10.11',

  • 'Mac OS 10.12',

  • 'Mac OS 10.13',

  • 'Mac OS 10.14',

  • 'Mac OS 10.15',

  • 'Mac OS 11.0',

  • 'Mac OS 11.1',

  • 'Mac OS 11.2',

  • 'Mac OS 11.3',

  • 'Mac OS 11.4',

  • 'Mac OS 11.5',

  • 'Mac OS 11.6',

  • 'Mac OS 12.0',

  • 'Mac OS 12.1',

  • 'Mac OS 12.2',

  • 'Mac OS 12.3',

  • 'Mac OS 12.4',

  • 'Mac OS 12.5',

  • 'Mac OS 12.6',

  • 'Mac OS 13.0',

  • 'Mac OS 13.1',

  • 'Mac OS 13.2',

  • 'BlackBerry',

  • 'Linux',

  • 'Windows',

  • 'Windows 8.1',

  • 'Windows 10',

  • 'Windows 11',

  • 'Windows Mobile',

  • 'Symbian',

  • 'Symbian 9.1',

  • 'Symbian 9.2',

  • 'Symbian 9.3',

  • 'Symbian 9.4',

     Campaign.browser
    * 'Chrome',
    * 'Edge',
    * 'IE',
    * 'Safari',
    * 'Mozilla',
    * 'Opera',
    * 'UCBrowser',
    * 'Yandex',