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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMvYXBpL3VzZXJzL2xvZ2luIiwiaWF0IjoxNzI2NTcyNDU2LCJleHAiOjE3MjY1NzYwNTYsIm5iZiI6MTcyNjU3MjQ1NiwianRpIjoiM2Vld243MDBMWWc0eXVWMCIsInN1YiI6IjIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.JC1OVlkdsxBVi9Xht8iC9BioTmgC_5WIYEHpzKKrCbY",
    "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTYsImV4cCI6MTcyNjU3NjA1NiwibmJmIjoxNzI2NTcyNDU2LCJqdGkiOiJBU2M5Wk0yclJIaU5SeGlJIiwic3ViIjoiMyIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.GiEPyyMnvdh4RCe7IYD_RslgQsPc2uvaLZJEGV5TzTQ
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTYsImV4cCI6MTcyNjU3NjA1NiwibmJmIjoxNzI2NTcyNDU2LCJqdGkiOiJBU2M5Wk0yclJIaU5SeGlJIiwic3ViIjoiMyIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.GiEPyyMnvdh4RCe7IYD_RslgQsPc2uvaLZJEGV5TzTQ' \
    -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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NjAsImV4cCI6MTcyNjU3NjA2MCwibmJmIjoxNzI2NTcyNDYwLCJqdGkiOiI2MGNjUXo1T0MxdERJdHZuIiwic3ViIjoiNDYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.hR_f5_yaB8Nv5tk5DSR0v1VzWY6hy0PJ0J4TTTZ-mT4
DATA
{
    "timezone": "Etc\/GMT+10",
    "from": "2024-09-15",
    "to": "2024-09-17",
    "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NjAsImV4cCI6MTcyNjU3NjA2MCwibmJmIjoxNzI2NTcyNDYwLCJqdGkiOiI2MGNjUXo1T0MxdERJdHZuIiwic3ViIjoiNDYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.hR_f5_yaB8Nv5tk5DSR0v1VzWY6hy0PJ0J4TTTZ-mT4' \
    -d '{
    "timezone": "Etc\/GMT+10",
    "from": "2024-09-15",
    "to": "2024-09-17",
    "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-09-17",
            "campaignId": 1,
            "campaignId_dict": "Sed et| id# 1",
            "creativeId": 12,
            "creativeId_dict": "Eos sunt| id# 12",
            "bids": 793,
            "wins": 416,
            "impressions": 326,
            "dspSpend": 0.30661,
            "winrate": 52.459016393442624,
            "ecpm": 0.9405214723926381,
            "clicks": 18,
            "conversions": 14,
            "ctr": 5.521472392638037
        },
        {
            "YMD": "2024-09-17",
            "campaignId": 2,
            "campaignId_dict": "Voluptate facilis| id# 2",
            "creativeId": 11,
            "creativeId_dict": "Dolore maiores| id# 11",
            "bids": 277,
            "wins": 123,
            "impressions": 97,
            "dspSpend": 0.35684,
            "winrate": 44.4043321299639,
            "ecpm": 3.678762886597938,
            "clicks": 24,
            "conversions": 50,
            "ctr": 24.742268041237114
        },
        {
            "YMD": "2024-09-17",
            "campaignId": 2,
            "campaignId_dict": "Modi vel| id# 2",
            "creativeId": 12,
            "creativeId_dict": "Non id| id# 12",
            "bids": 270,
            "wins": 181,
            "impressions": 152,
            "dspSpend": 0.21166,
            "winrate": 67.03703703703704,
            "ecpm": 1.3925,
            "clicks": 37,
            "conversions": 43,
            "ctr": 24.342105263157894
        },
        {
            "YMD": "2024-09-16",
            "campaignId": 1,
            "campaignId_dict": "Sit voluptatibus| id# 1",
            "creativeId": 11,
            "creativeId_dict": "Aut necessitatibus| id# 11",
            "bids": 683,
            "wins": 434,
            "impressions": 316,
            "dspSpend": 0.21879,
            "winrate": 63.543191800878475,
            "ecpm": 0.6923734177215191,
            "clicks": 12,
            "conversions": 23,
            "ctr": 3.7974683544303796
        },
        {
            "YMD": "2024-09-17",
            "campaignId": 1,
            "campaignId_dict": "A architecto| id# 1",
            "creativeId": 11,
            "creativeId_dict": "Quam est| id# 11",
            "bids": 766,
            "wins": 325,
            "impressions": 248,
            "dspSpend": 0.25031,
            "winrate": 42.42819843342036,
            "ecpm": 1.0093145161290322,
            "clicks": 49,
            "conversions": 46,
            "ctr": 19.758064516129032
        },
        {
            "YMD": "2024-09-16",
            "campaignId": 1,
            "campaignId_dict": "Harum dignissimos| id# 1",
            "creativeId": 12,
            "creativeId_dict": "Non ut| id# 12",
            "bids": 304,
            "wins": 169,
            "impressions": 148,
            "dspSpend": 0.18003,
            "winrate": 55.5921052631579,
            "ecpm": 1.216418918918919,
            "clicks": 46,
            "conversions": 4,
            "ctr": 31.08108108108108
        },
        {
            "YMD": "2024-09-16",
            "campaignId": 2,
            "campaignId_dict": "Quia ut| id# 2",
            "creativeId": 11,
            "creativeId_dict": "Similique esse| id# 11",
            "bids": 211,
            "wins": 63,
            "impressions": 48,
            "dspSpend": 0.25725,
            "winrate": 29.85781990521327,
            "ecpm": 5.359375,
            "clicks": 29,
            "conversions": 2,
            "ctr": 60.416666666666664
        },
        {
            "YMD": "2024-09-16",
            "campaignId": 2,
            "campaignId_dict": "Et autem| id# 2",
            "creativeId": 12,
            "creativeId_dict": "Delectus iusto| id# 12",
            "bids": 881,
            "wins": 546,
            "impressions": 450,
            "dspSpend": 0.16989,
            "winrate": 61.97502837684449,
            "ecpm": 0.3775333333333334,
            "clicks": 48,
            "conversions": 42,
            "ctr": 10.666666666666666
        },
        {
            "YMD": "2024-09-15",
            "campaignId": 1,
            "campaignId_dict": "Libero animi| id# 1",
            "creativeId": 11,
            "creativeId_dict": "Blanditiis magnam| id# 11",
            "bids": 628,
            "wins": 434,
            "impressions": 380,
            "dspSpend": 0.15371,
            "winrate": 69.10828025477707,
            "ecpm": 0.4045,
            "clicks": 31,
            "conversions": 21,
            "ctr": 8.157894736842104
        },
        {
            "YMD": "2024-09-15",
            "campaignId": 1,
            "campaignId_dict": "Dolorum autem| id# 1",
            "creativeId": 12,
            "creativeId_dict": "Repudiandae qui| id# 12",
            "bids": 454,
            "wins": 304,
            "impressions": 246,
            "dspSpend": 0.41677,
            "winrate": 66.96035242290749,
            "ecpm": 1.6941869918699186,
            "clicks": 14,
            "conversions": 26,
            "ctr": 5.691056910569106
        },
        {
            "YMD": "2024-09-15",
            "campaignId": 2,
            "campaignId_dict": "Deleniti autem| id# 2",
            "creativeId": 11,
            "creativeId_dict": "Mollitia tenetur| id# 11",
            "bids": 508,
            "wins": 205,
            "impressions": 144,
            "dspSpend": 0.43291,
            "winrate": 40.354330708661415,
            "ecpm": 3.0063194444444448,
            "clicks": 5,
            "conversions": 32,
            "ctr": 3.4722222222222223
        },
        {
            "YMD": "2024-09-15",
            "campaignId": 2,
            "campaignId_dict": "Recusandae nemo| id# 2",
            "creativeId": 12,
            "creativeId_dict": "Nulla similique| id# 12",
            "bids": 634,
            "wins": 431,
            "impressions": 377,
            "dspSpend": 0.43576,
            "winrate": 67.98107255520505,
            "ecpm": 1.1558620689655172,
            "clicks": 17,
            "conversions": 28,
            "ctr": 4.5092838196286475
        }
    ],
    "totals": {
        "YMD": "",
        "campaignId": 0,
        "campaignId_dict": "",
        "creativeId": 0,
        "creativeId_dict": "",
        "bids": 6409,
        "wins": 3631,
        "impressions": 2932,
        "dspSpend": 3.39053,
        "winrate": 55.14173044012576,
        "ecpm": 1.7439723375311054,
        "clicks": 330,
        "conversions": 331,
        "ctr": 16.846354222605747
    },
    "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NjAsImV4cCI6MTcyNjU3NjA2MCwibmJmIjoxNzI2NTcyNDYwLCJqdGkiOiJxV0FkbEJySmYzbFJuNFJnIiwic3ViIjoiNDciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.W7FcM_b6JTJqOdB6hopSPwV3g9DR4Bib-sOar3D8k9s
DATA
{
    "timezone": "UTC",
    "from": "2024-09-15",
    "to": "2024-09-17",
    "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NjAsImV4cCI6MTcyNjU3NjA2MCwibmJmIjoxNzI2NTcyNDYwLCJqdGkiOiJxV0FkbEJySmYzbFJuNFJnIiwic3ViIjoiNDciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.W7FcM_b6JTJqOdB6hopSPwV3g9DR4Bib-sOar3D8k9s' \
    -d '{
    "timezone": "UTC",
    "from": "2024-09-15",
    "to": "2024-09-17",
    "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-09-16",
            "campaignId": 1,
            "campaignId_dict": "Itaque quos| id# 1",
            "creativeId": 10,
            "creativeId_dict": "Enim quibusdam| id# 10",
            "bids": 488,
            "wins": 337,
            "impressions": 292,
            "dspSpend": 0.32184,
            "winrate": 69.05737704918033,
            "ecpm": 1.102191780821918,
            "clicks": 26,
            "conversions": 44,
            "ctr": 8.904109589041095
        },
        {
            "YMD": "2024-09-17",
            "campaignId": 1,
            "campaignId_dict": "Itaque ad| id# 1",
            "creativeId": 10,
            "creativeId_dict": "Eveniet laudantium| id# 10",
            "bids": 157,
            "wins": 78,
            "impressions": 70,
            "dspSpend": 0.40208,
            "winrate": 49.681528662420384,
            "ecpm": 5.744,
            "clicks": 46,
            "conversions": 6,
            "ctr": 65.71428571428571
        },
        {
            "YMD": "2024-09-15",
            "campaignId": 1,
            "campaignId_dict": "Ipsa esse| id# 1",
            "creativeId": 10,
            "creativeId_dict": "Tempora voluptatem| id# 10",
            "bids": 942,
            "wins": 349,
            "impressions": 282,
            "dspSpend": 0.13335,
            "winrate": 37.04883227176221,
            "ecpm": 0.4728723404255319,
            "clicks": 32,
            "conversions": 11,
            "ctr": 11.347517730496454
        }
    ],
    "totals": {
        "YMD": "",
        "campaignId": 0,
        "campaignId_dict": "",
        "creativeId": 0,
        "creativeId_dict": "",
        "bids": 1587,
        "wins": 764,
        "impressions": 644,
        "dspSpend": 0.85727,
        "winrate": 51.92924599445431,
        "ecpm": 2.4396880404158163,
        "clicks": 104,
        "conversions": 61,
        "ctr": 28.655304344607753
    },
    "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTYsImV4cCI6MTcyNjU3NjA1NiwibmJmIjoxNzI2NTcyNDU2LCJqdGkiOiJpbEhxSjh0anFTMDJVY0lRIiwic3ViIjoiNCIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.pgv3NjDTHYwp6QWFtKoYkNYxfm_Rrjp0rs4rHq2B3go
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTYsImV4cCI6MTcyNjU3NjA1NiwibmJmIjoxNzI2NTcyNDU2LCJqdGkiOiJpbEhxSjh0anFTMDJVY0lRIiwic3ViIjoiNCIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.pgv3NjDTHYwp6QWFtKoYkNYxfm_Rrjp0rs4rHq2B3go' \
    -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": true,
            "isRunning": false,
            "type": "audio",
            "name": "Sit.",
            "isRewarded": false,
            "isDesktopWeb": true,
            "isMobileApp": false,
            "isMobileWeb": true,
            "isSmartphone": true,
            "isTablet": false,
            "isCTV": false,
            "isDOOH": false,
            "aDomain": "corkery.com",
            "dateStart": "2023-05-22",
            "dateEnd": "2024-11-03",
            "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": 240,
            "spentTotalLimit": 4102,
            "impressionsDailyLimit": 218038,
            "impressionsTotalLimit": 400000,
            "clicksDailyLimit": 0,
            "clicksTotalLimit": 0,
            "budgetUse": "fast",
            "allSources": true,
            "cpm": 0,
            "adaptiveCpm": false,
            "useCpm": false,
            "extendedStatus": "Low Balance",
            "createdAt": "2024-09-17",
            "updatedAt": "2024-09-17",
            "deletedAt": null
        },
        {
            "id": 2,
            "userId": 4,
            "isActive": true,
            "isRunning": false,
            "type": "video",
            "name": "Laboriosam.",
            "isRewarded": false,
            "isDesktopWeb": false,
            "isMobileApp": true,
            "isMobileWeb": true,
            "isSmartphone": false,
            "isTablet": true,
            "isCTV": true,
            "isDOOH": true,
            "aDomain": "gleason.net",
            "dateStart": "2023-11-12",
            "dateEnd": "2025-04-14",
            "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": 441,
            "spentTotalLimit": 8995,
            "impressionsDailyLimit": 292910,
            "impressionsTotalLimit": 400000,
            "clicksDailyLimit": 0,
            "clicksTotalLimit": 0,
            "budgetUse": "fast",
            "allSources": true,
            "cpm": 0,
            "adaptiveCpm": false,
            "useCpm": false,
            "extendedStatus": "Low Balance",
            "createdAt": "2024-09-17",
            "updatedAt": "2024-09-17",
            "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTYsImV4cCI6MTcyNjU3NjA1NiwibmJmIjoxNzI2NTcyNDU2LCJqdGkiOiJwUHFaQ241YmZZbVhhTk9MIiwic3ViIjoiNSIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.O13eRHGoYX3neoLr1LnomBzdVlNeMbp0K7r_f8L7_fI
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTYsImV4cCI6MTcyNjU3NjA1NiwibmJmIjoxNzI2NTcyNDU2LCJqdGkiOiJwUHFaQ241YmZZbVhhTk9MIiwic3ViIjoiNSIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.O13eRHGoYX3neoLr1LnomBzdVlNeMbp0K7r_f8L7_fI' \
    -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

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": false,
        "isMobileApp": false,
        "isMobileWeb": true,
        "isSmartphone": false,
        "isTablet": true,
        "isCTV": false,
        "isDOOH": false,
        "aDomain": "zulauf.net",
        "dateStart": "2022-11-20",
        "dateEnd": "2024-09-26",
        "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": 383,
        "spentTotalLimit": 8687,
        "impressionsDailyLimit": 238046,
        "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-09-17",
        "updatedAt": "2024-09-17",
        "deletedAt": null,
        "pretarget": null
    }
}

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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTYsImV4cCI6MTcyNjU3NjA1NiwibmJmIjoxNzI2NTcyNDU2LCJqdGkiOiJCeWpWejB2aW00dTJCdXZmIiwic3ViIjoiNiIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.QH0ItIvN7FOuHif-aaeXbdDUzu4xtF-64Wf61FH0OkI
DATA
{
    "type": "banner",
    "name": "New Campaign #2",
    "aDomain": "witting.biz",
    "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": "2023-02-27",
    "dateEnd": "2025-07-27"
}

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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTYsImV4cCI6MTcyNjU3NjA1NiwibmJmIjoxNzI2NTcyNDU2LCJqdGkiOiJCeWpWejB2aW00dTJCdXZmIiwic3ViIjoiNiIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.QH0ItIvN7FOuHif-aaeXbdDUzu4xtF-64Wf61FH0OkI' \
    -d '{
    "type": "banner",
    "name": "New Campaign #2",
    "aDomain": "witting.biz",
    "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": "2023-02-27",
    "dateEnd": "2025-07-27"
}'

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

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": "witting.biz",
        "dateStart": "2023-02-27",
        "dateEnd": "2025-07-27",
        "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-09-17",
        "updatedAt": "2024-09-17",
        "deletedAt": null,
        "pretarget": null
    }
}

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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTYsImV4cCI6MTcyNjU3NjA1NiwibmJmIjoxNzI2NTcyNDU2LCJqdGkiOiJONWQxbXh5dE5VcklSSUZQIiwic3ViIjoiNyIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.2Pfp5fO56h-rRMim0OqU5a8sdLxkxG8FaGjjYl2bNfQ
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTYsImV4cCI6MTcyNjU3NjA1NiwibmJmIjoxNzI2NTcyNDU2LCJqdGkiOiJONWQxbXh5dE5VcklSSUZQIiwic3ViIjoiNyIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.2Pfp5fO56h-rRMim0OqU5a8sdLxkxG8FaGjjYl2bNfQ' \
    -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

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": false,
        "isRunning": false,
        "type": "native",
        "name": "Updated Campaign #3",
        "isRewarded": false,
        "isDesktopWeb": true,
        "isMobileApp": false,
        "isMobileWeb": false,
        "isSmartphone": false,
        "isTablet": false,
        "isCTV": false,
        "isDOOH": false,
        "aDomain": "huels.com",
        "dateStart": "2022-11-20",
        "dateEnd": "2024-10-07",
        "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": 308,
        "spentTotalLimit": 4697,
        "impressionsDailyLimit": 296964,
        "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-09-17",
        "updatedAt": "2024-09-17",
        "deletedAt": null,
        "pretarget": null
    }
}

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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTYsImV4cCI6MTcyNjU3NjA1NiwibmJmIjoxNzI2NTcyNDU2LCJqdGkiOiJlM1VydGVWdTFCbHA1NXBJIiwic3ViIjoiOCIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.ESItDm98PgfiLV71rFHX34ND1ijgiCn3bSMtz4S6CNI
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTYsImV4cCI6MTcyNjU3NjA1NiwibmJmIjoxNzI2NTcyNDU2LCJqdGkiOiJlM1VydGVWdTFCbHA1NXBJIiwic3ViIjoiOCIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.ESItDm98PgfiLV71rFHX34ND1ijgiCn3bSMtz4S6CNI' \
                -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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTksImV4cCI6MTcyNjU3NjA1OSwibmJmIjoxNzI2NTcyNDU5LCJqdGkiOiJRMXN1V1Z2Y2dzQVZibU1nIiwic3ViIjoiMzciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.NEtXJRjLQ9N1kzc-YHguo6bdrjgoiMh3n7fqWrV6gxw
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTksImV4cCI6MTcyNjU3NjA1OSwibmJmIjoxNzI2NTcyNDU5LCJqdGkiOiJRMXN1V1Z2Y2dzQVZibU1nIiwic3ViIjoiMzciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.NEtXJRjLQ9N1kzc-YHguo6bdrjgoiMh3n7fqWrV6gxw' \
    -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-09-17 11:27:39",
            "updatedAt": "2024-09-17 11:27:39"
        }
    ]
}

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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTksImV4cCI6MTcyNjU3NjA1OSwibmJmIjoxNzI2NTcyNDU5LCJqdGkiOiJmTUZwSkJYVDJnb3ZNd2hZIiwic3ViIjoiMzgiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.rgGuqKO_mMouf684m-QRaM25isqqN3LbhAOQPEN-Dfg
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTksImV4cCI6MTcyNjU3NjA1OSwibmJmIjoxNzI2NTcyNDU5LCJqdGkiOiJmTUZwSkJYVDJnb3ZNd2hZIiwic3ViIjoiMzgiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.rgGuqKO_mMouf684m-QRaM25isqqN3LbhAOQPEN-Dfg' \
    -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-09-17 11:27:39",
            "updatedAt": "2024-09-17 11:27:39"
        }
    ]
}

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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTksImV4cCI6MTcyNjU3NjA1OSwibmJmIjoxNzI2NTcyNDU5LCJqdGkiOiJIdmFIUjk1MkE3b2trMWIyIiwic3ViIjoiMzkiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.tscuLkgPzghC7Q6_PH9iZA1lKgPPiU1XTN2cqpKTOVU
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTksImV4cCI6MTcyNjU3NjA1OSwibmJmIjoxNzI2NTcyNDU5LCJqdGkiOiJIdmFIUjk1MkE3b2trMWIyIiwic3ViIjoiMzkiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.tscuLkgPzghC7Q6_PH9iZA1lKgPPiU1XTN2cqpKTOVU' \
    -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-09-17 11:27:39",
            "updatedAt": "2024-09-17 11:27:39"
        }
    ]
}

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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTksImV4cCI6MTcyNjU3NjA1OSwibmJmIjoxNzI2NTcyNDU5LCJqdGkiOiJyejNDUkRGWFRzMUNhazd6Iiwic3ViIjoiNDAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.G2lX2DpzjFpLb4oHnLR5ezRfGskniHvbzytxh0byTgY
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTksImV4cCI6MTcyNjU3NjA1OSwibmJmIjoxNzI2NTcyNDU5LCJqdGkiOiJyejNDUkRGWFRzMUNhazd6Iiwic3ViIjoiNDAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.G2lX2DpzjFpLb4oHnLR5ezRfGskniHvbzytxh0byTgY' \
    -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": "1726572459_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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJyc2EybElEZGdZVUdvTUMzIiwic3ViIjoiMjAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.3Uxka3CC45Ueqq2k1HpaoHUFTX4kX4Kkr1NGuNi7r-0
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJyc2EybElEZGdZVUdvTUMzIiwic3ViIjoiMjAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.3Uxka3CC45Ueqq2k1HpaoHUFTX4kX4Kkr1NGuNi7r-0' \
    -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": 3,
            "frequencyPeriod": 1,
            "bidPrice": "20.00",
            "autoresize": 0,
            "adaptiveCpm": false,
            "size": "462 x 201",
            "weight": "0.20 MB",
            "folderId": null,
            "createdAt": "2024-09-17 00:00:00",
            "updatedAt": "2024-09-17 11:27:37",
            "pendingAt": null,
            "deletedAt": null,
            "media": {
                "id": 8,
                "userId": 20,
                "mediaType": "image",
                "originName": "image.jpg",
                "name": "20_a9e5850eaeb99772c4f7e708510bb83d.jpg",
                "extension": "jpg",
                "url": "http:\/\/www.oconnell.com\/laboriosam-mollitia-voluptas-aut-tempora-explicabo-minima-non.html20_a9e5850eaeb99772c4f7e708510bb83d.jpg",
                "width": 171,
                "height": 365,
                "weight": 210863
            },
            "relation": {
                "banner": {
                    "apiFramework": 0,
                    "admBody": "<a target=\"_blank\" href=\"http:\/\/www.jaskolski.com\/minima-ipsam-iste-minima-vel\" ><img src=\"https:\/\/www.gerlach.com\/qui-natus-est-aut\/10.jpg\"\/><\/a>",
                    "bannerType": "banner",
                    "clickUrl": "http:\/\/kozey.net\/excepturi-tempore-enim-praesentium-sapiente-dolorem-voluptate-consequatur-nesciunt",
                    "width": 462,
                    "height": 201,
                    "childrenCreative": null,
                    "statusChildrenCreative": [],
                    "main": 1
                }
            }
        },
        {
            "id": 9,
            "userId": 20,
            "isActive": 1,
            "approved": "pending",
            "creativeType": "native",
            "name": "Native creative #1",
            "frequencyType": "user",
            "frequency": 0,
            "frequencyCap": 6,
            "frequencyPeriod": 1,
            "bidPrice": "3.08",
            "autoresize": 0,
            "adaptiveCpm": false,
            "size": "495 x 253",
            "weight": "0.00 MB",
            "folderId": null,
            "createdAt": "2024-09-17 00:00:00",
            "updatedAt": "2024-09-17 11:27:37",
            "pendingAt": null,
            "deletedAt": null,
            "media": {
                "id": 9,
                "userId": 20,
                "mediaType": "image",
                "originName": "image.jpg",
                "name": "20_a9e5850eaeb99772c4f7e708510bb83d.jpg",
                "extension": "jpg",
                "url": "http:\/\/rau.com\/voluptatem-aliquam-eos-aut20_a9e5850eaeb99772c4f7e708510bb83d.jpg",
                "width": 364,
                "height": 193,
                "weight": 480000
            },
            "relation": {
                "native": {
                    "smallImageId": 9,
                    "largeImageId": 10,
                    "smallImage": {
                        "id": 9,
                        "folderId": null,
                        "userId": 20,
                        "width": 364,
                        "height": 193,
                        "name": "20_a9e5850eaeb99772c4f7e708510bb83d.jpg",
                        "url": "http:\/\/rau.com\/voluptatem-aliquam-eos-aut20_a9e5850eaeb99772c4f7e708510bb83d.jpg",
                        "href": null,
                        "originName": "image.jpg",
                        "path": null,
                        "extension": "jpg",
                        "mediaType": "image",
                        "createdAt": "2024-09-17T11:27:37.000000Z",
                        "updatedAt": "2024-09-17T11:27:37.000000Z",
                        "deletedAt": null,
                        "weight": 480000
                    },
                    "largeImage": {
                        "id": 10,
                        "folderId": null,
                        "userId": 20,
                        "width": 495,
                        "height": 253,
                        "name": "20_a9e5850eaeb99772c4f7e708510bb83d.jpg",
                        "url": "https:\/\/www.prosacco.biz\/accusamus-consequuntur-velit-tenetur-voluptates-qui20_a9e5850eaeb99772c4f7e708510bb83d.jpg",
                        "href": null,
                        "originName": "image.jpg",
                        "path": null,
                        "extension": "jpg",
                        "mediaType": "image",
                        "createdAt": "2024-09-17T11:27:37.000000Z",
                        "updatedAt": "2024-09-17T11:27:37.000000Z",
                        "deletedAt": null,
                        "weight": 402865
                    },
                    "assetDataDesc": "Et neque minus est quod.",
                    "assetTitle": "Qui fugiat non mollitia.",
                    "assetDataSponsored": "Est dolore consequatur ducimus nobis.",
                    "assetCtaText": "Quo quo impedit aut.",
                    "clickUrl": "http:\/\/okuneva.com\/ratione-adipisci-assumenda-nihil-quia-inventore-explicabo",
                    "displayUrl": "https:\/\/www.smith.com\/aut-nisi-itaque-et",
                    "impTracker": null
                }
            }
        },
        {
            "id": 10,
            "userId": 20,
            "isActive": 1,
            "approved": "pending",
            "creativeType": "video",
            "name": "Video creative #1",
            "frequencyType": "ip",
            "frequency": 0,
            "frequencyCap": 2,
            "frequencyPeriod": 1,
            "bidPrice": "13.92",
            "autoresize": 0,
            "adaptiveCpm": false,
            "size": "511 x 376",
            "weight": "0.24 MB",
            "folderId": null,
            "createdAt": "2024-09-17 00:00:00",
            "updatedAt": "2024-09-17 11:27:37",
            "pendingAt": null,
            "deletedAt": null,
            "media": {
                "id": 11,
                "userId": 20,
                "mediaType": "video",
                "originName": "video.mp4",
                "name": "20_a9e5850eaeb99772c4f7e708510bb83d.mp4",
                "extension": "mp4",
                "url": "http:\/\/hilpert.info\/doloribus-in-in-aut-non-nisi20_a9e5850eaeb99772c4f7e708510bb83d.mp4",
                "width": 196,
                "height": 293,
                "weight": 250705
            },
            "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=\"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": [
                        "application\/javascript"
                    ],
                    "width": 511,
                    "height": 376,
                    "duration": 8,
                    "clickUrl": "http:\/\/friesen.biz\/voluptas-ut-et-quaerat-veritatis-et-eveniet-et",
                    "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJlN3lrdmxWbWN6YTVha0dEIiwic3ViIjoiMjEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.SC5MsUTY0FVeJR9psLGawKKlLpD8V1w5_7F53yoviJw
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJlN3lrdmxWbWN6YTVha0dEIiwic3ViIjoiMjEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.SC5MsUTY0FVeJR9psLGawKKlLpD8V1w5_7F53yoviJw' \
    -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": "ip",
        "frequency": 0,
        "frequencyCap": 7,
        "frequencyPeriod": 1,
        "bidPrice": "13.08",
        "autoresize": 0,
        "adaptiveCpm": false,
        "size": "537 x 401",
        "weight": "0.10 MB",
        "folderId": null,
        "createdAt": "2024-09-17 00:00:00",
        "updatedAt": "2024-09-17 11:27:37",
        "pendingAt": null,
        "deletedAt": null,
        "relation": {
            "banner": {
                "apiFramework": 0,
                "admBody": "<a target=\"_blank\" href=\"https:\/\/www.gibson.com\/consectetur-porro-omnis-deserunt-aut-unde-quo-in\" ><img src=\"http:\/\/von.com\/\/10.jpg\"\/><\/a>",
                "bannerType": "banner",
                "clickUrl": "http:\/\/rowe.org\/quibusdam-aperiam-eum-eum-odit",
                "width": 537,
                "height": 401
            }
        }
    }
}

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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJ0QWk5aGwwWnlQV25ySzFRIiwic3ViIjoiMjIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.jjuoxo7H4Ntk3PNz9glxddRFEm873ayEOekFNv6AILs
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJ0QWk5aGwwWnlQV25ySzFRIiwic3ViIjoiMjIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.jjuoxo7H4Ntk3PNz9glxddRFEm873ayEOekFNv6AILs' \
    -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": 1,
        "approved": "pending",
        "creativeType": "native",
        "name": "Native creative #2",
        "frequencyType": "ip",
        "frequency": 0,
        "frequencyCap": 5,
        "frequencyPeriod": 1,
        "bidPrice": "1.68",
        "autoresize": 0,
        "adaptiveCpm": false,
        "size": "113 x 265",
        "weight": "0.00 MB",
        "folderId": null,
        "createdAt": "2024-09-17 00:00:00",
        "updatedAt": "2024-09-17 11:27:37",
        "pendingAt": null,
        "deletedAt": null,
        "relation": {
            "native": {
                "smallImageId": 13,
                "largeImageId": 14,
                "smallImage": {
                    "id": 13,
                    "folderId": null,
                    "userId": 22,
                    "width": 479,
                    "height": 257,
                    "name": "22_a9e5850eaeb99772c4f7e708510bb83d.jpg",
                    "url": "http:\/\/mosciski.biz\/22_a9e5850eaeb99772c4f7e708510bb83d.jpg",
                    "href": null,
                    "originName": "image.jpg",
                    "path": null,
                    "extension": "jpg",
                    "mediaType": "image",
                    "createdAt": "2024-09-17T11:27:37.000000Z",
                    "updatedAt": "2024-09-17T11:27:37.000000Z",
                    "deletedAt": null,
                    "weight": 311761
                },
                "largeImage": {
                    "id": 14,
                    "folderId": null,
                    "userId": 22,
                    "width": 113,
                    "height": 265,
                    "name": "22_a9e5850eaeb99772c4f7e708510bb83d.jpg",
                    "url": "http:\/\/www.strosin.com\/22_a9e5850eaeb99772c4f7e708510bb83d.jpg",
                    "href": null,
                    "originName": "image.jpg",
                    "path": null,
                    "extension": "jpg",
                    "mediaType": "image",
                    "createdAt": "2024-09-17T11:27:37.000000Z",
                    "updatedAt": "2024-09-17T11:27:37.000000Z",
                    "deletedAt": null,
                    "weight": 173875
                },
                "assetDataDesc": "Et illo ut deserunt.",
                "assetTitle": "Qui ut adipisci et.",
                "assetDataSponsored": "Commodi dolores ut architecto vitae sit.",
                "assetCtaText": "Dolorem quis animi est.",
                "clickUrl": "http:\/\/mitchell.com\/in-est-maxime-quae-corrupti-ducimus.html",
                "displayUrl": "http:\/\/kling.biz\/",
                "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJSSUFWa2JpdmNlYjFUSWtWIiwic3ViIjoiMjMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.vbYboIE6ahjR961QmMzc4b8AeUeoLr5UTZUYlCRHCXw
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJSSUFWa2JpdmNlYjFUSWtWIiwic3ViIjoiMjMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.vbYboIE6ahjR961QmMzc4b8AeUeoLr5UTZUYlCRHCXw' \
    -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": "user",
        "frequency": 0,
        "frequencyCap": 5,
        "frequencyPeriod": 1,
        "bidPrice": "9.73",
        "autoresize": 0,
        "adaptiveCpm": false,
        "size": "284 x 373",
        "weight": "0.27 MB",
        "folderId": null,
        "createdAt": "2024-09-17 00:00:00",
        "updatedAt": "2024-09-17 11:27:37",
        "pendingAt": null,
        "deletedAt": null,
        "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\/mpeg"
                ],
                "width": 284,
                "height": 373,
                "duration": 8,
                "clickUrl": "https:\/\/toy.net\/cupiditate-est-fugit-necessitatibus.html",
                "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTgsImV4cCI6MTcyNjU3NjA1OCwibmJmIjoxNzI2NTcyNDU4LCJqdGkiOiI4Vk10MjMxaDdYbXNLbVRBIiwic3ViIjoiMjQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.U_IDyAvsjvSZj_sSjDFZkwzrQqQYS4GYKx6vDg-Cspg
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTgsImV4cCI6MTcyNjU3NjA1OCwibmJmIjoxNzI2NTcyNDU4LCJqdGkiOiI4Vk10MjMxaDdYbXNLbVRBIiwic3ViIjoiMjQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.U_IDyAvsjvSZj_sSjDFZkwzrQqQYS4GYKx6vDg-Cspg' \
    -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-09-17 00:00:00",
        "updatedAt": "2024-09-17 11:27:38",
        "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTgsImV4cCI6MTcyNjU3NjA1OCwibmJmIjoxNzI2NTcyNDU4LCJqdGkiOiJhWHhDTnlLQkdWajZTTDNzIiwic3ViIjoiMjUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.prDNLTigB8BVByXVrYbwysJq98vA7OutntS1TVZMIgc
DATA
{
    "name": "Banner creative #4",
    "creativeType": "banner",
    "mediaId": 16,
    "frequency": 0,
    "bidPrice": 0.5,
    "banner": {
        "apiFramework": 0,
        "width": 320,
        "height": 200,
        "clickUrl": "http:\/\/jacobson.com\/"
    },
    "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTgsImV4cCI6MTcyNjU3NjA1OCwibmJmIjoxNzI2NTcyNDU4LCJqdGkiOiJhWHhDTnlLQkdWajZTTDNzIiwic3ViIjoiMjUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.prDNLTigB8BVByXVrYbwysJq98vA7OutntS1TVZMIgc' \
    -d '{
    "name": "Banner creative #4",
    "creativeType": "banner",
    "mediaId": 16,
    "frequency": 0,
    "bidPrice": 0.5,
    "banner": {
        "apiFramework": 0,
        "width": 320,
        "height": 200,
        "clickUrl": "http:\/\/jacobson.com\/"
    },
    "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": "332 x 446",
        "weight": "0.40 MB",
        "folderId": null,
        "createdAt": "2024-09-17 00:00:00",
        "updatedAt": "2024-09-17 11:27:38",
        "pendingAt": null,
        "deletedAt": null,
        "relation": {
            "banner": {
                "apiFramework": 0,
                "admBody": "<a target=\"_blank\" href=\"https:\/\/jacobson.com\/\" ><img src=\"https:\/\/www.dickens.com\/minus-explicabo-tempora-fugit-voluptatem-quasi25_8f54a168e84e2a1f75c9b668a0c367bd.jpg\"\/><\/a>",
                "bannerType": null,
                "clickUrl": "https:\/\/jacobson.com\/",
                "width": 332,
                "height": 446
            }
        }
    }
}

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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTgsImV4cCI6MTcyNjU3NjA1OCwibmJmIjoxNzI2NTcyNDU4LCJqdGkiOiJTTDJwOUtKNzNNUnA0V0NQIiwic3ViIjoiMjYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.w1SOqjV6TbdGlzCS8TD7-ERBfozEhf7WV7OMU5Vme2A
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTgsImV4cCI6MTcyNjU3NjA1OCwibmJmIjoxNzI2NTcyNDU4LCJqdGkiOiJTTDJwOUtKNzNNUnA0V0NQIiwic3ViIjoiMjYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.w1SOqjV6TbdGlzCS8TD7-ERBfozEhf7WV7OMU5Vme2A' \
    -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.12 MB",
        "folderId": null,
        "createdAt": "2024-09-17 00:00:00",
        "updatedAt": "2024-09-17 11:27:38",
        "pendingAt": null,
        "deletedAt": null,
        "relation": {
            "banner": {
                "apiFramework": 3,
                "admBody": "<iframe src=\"https:\/\/larkin.biz\/ad-voluptas-amet-eius.html26_8f54a168e84e2a1f75c9b668a0c367bd\/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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTgsImV4cCI6MTcyNjU3NjA1OCwibmJmIjoxNzI2NTcyNDU4LCJqdGkiOiJCOUVwNU1qWHQzelhTR3FNIiwic3ViIjoiMjciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.v2ozObQWe_Exe0fKTChlirIrz7CTA8Nv_6t_nwsndhk
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": "Ut rerum possimus.",
        "assetTitle": "Deserunt.",
        "assetDataSponsored": "Enim facere qui itaque.",
        "assetCtaText": "Odio odio illo.",
        "clickUrl": "http:\/\/www.towne.com\/",
        "displayUrl": "https:\/\/www.murazik.net\/necessitatibus-voluptate-excepturi-vero-quibusdam-perspiciatis-eos-earum"
    },
    "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTgsImV4cCI6MTcyNjU3NjA1OCwibmJmIjoxNzI2NTcyNDU4LCJqdGkiOiJCOUVwNU1qWHQzelhTR3FNIiwic3ViIjoiMjciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.v2ozObQWe_Exe0fKTChlirIrz7CTA8Nv_6t_nwsndhk' \
    -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": "Ut rerum possimus.",
        "assetTitle": "Deserunt.",
        "assetDataSponsored": "Enim facere qui itaque.",
        "assetCtaText": "Odio odio illo.",
        "clickUrl": "http:\/\/www.towne.com\/",
        "displayUrl": "https:\/\/www.murazik.net\/necessitatibus-voluptate-excepturi-vero-quibusdam-perspiciatis-eos-earum"
    },
    "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": "283 x 148",
        "weight": "0.00 MB",
        "folderId": null,
        "createdAt": "2024-09-17 00:00:00",
        "updatedAt": "2024-09-17 11:27:38",
        "pendingAt": null,
        "deletedAt": null,
        "relation": {
            "native": {
                "smallImageId": 18,
                "largeImageId": 18,
                "smallImage": {
                    "id": 18,
                    "folderId": null,
                    "userId": 27,
                    "width": 283,
                    "height": 148,
                    "name": "27_8f54a168e84e2a1f75c9b668a0c367bd.jpg",
                    "url": "https:\/\/www.ferry.com\/maxime-quis-labore-cum27_8f54a168e84e2a1f75c9b668a0c367bd.jpg",
                    "href": null,
                    "originName": "image.jpg",
                    "path": null,
                    "extension": "jpg",
                    "mediaType": "image",
                    "createdAt": "2024-09-17T11:27:38.000000Z",
                    "updatedAt": "2024-09-17T11:27:38.000000Z",
                    "deletedAt": null,
                    "weight": 351194
                },
                "largeImage": {
                    "id": 18,
                    "folderId": null,
                    "userId": 27,
                    "width": 283,
                    "height": 148,
                    "name": "27_8f54a168e84e2a1f75c9b668a0c367bd.jpg",
                    "url": "https:\/\/www.ferry.com\/maxime-quis-labore-cum27_8f54a168e84e2a1f75c9b668a0c367bd.jpg",
                    "href": null,
                    "originName": "image.jpg",
                    "path": null,
                    "extension": "jpg",
                    "mediaType": "image",
                    "createdAt": "2024-09-17T11:27:38.000000Z",
                    "updatedAt": "2024-09-17T11:27:38.000000Z",
                    "deletedAt": null,
                    "weight": 351194
                },
                "assetDataDesc": "Ut rerum possimus.",
                "assetTitle": "Deserunt.",
                "assetDataSponsored": "Enim facere qui itaque.",
                "assetCtaText": "Odio odio illo.",
                "clickUrl": "http:\/\/www.towne.com\/",
                "displayUrl": "https:\/\/www.murazik.net\/necessitatibus-voluptate-excepturi-vero-quibusdam-perspiciatis-eos-earum",
                "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTgsImV4cCI6MTcyNjU3NjA1OCwibmJmIjoxNzI2NTcyNDU4LCJqdGkiOiJjUDdOU0plYkRKM3prSWxiIiwic3ViIjoiMjgiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.MoCa_N5o_NsrO8P8hcl34QhOpP807cChcUgBXHC0J5Y
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTgsImV4cCI6MTcyNjU3NjA1OCwibmJmIjoxNzI2NTcyNDU4LCJqdGkiOiJjUDdOU0plYkRKM3prSWxiIiwic3ViIjoiMjgiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.MoCa_N5o_NsrO8P8hcl34QhOpP807cChcUgBXHC0J5Y' \
    -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-09-17 00:00:00",
        "updatedAt": "2024-09-17 11:27:38",
        "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTgsImV4cCI6MTcyNjU3NjA1OCwibmJmIjoxNzI2NTcyNDU4LCJqdGkiOiJSTENxT2NJenNjcWhiZVh1Iiwic3ViIjoiMjkiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.cyDGrVYcWiHyhQWMDUwFBYfG3MVhKd7A3nQLULR1naU
DATA
{
    "name": "Video creative #4",
    "creativeType": "video",
    "frequencyType": "user",
    "frequencyCap": 1,
    "frequencyPeriod": 1,
    "frequency": 1,
    "mediaId": 19,
    "bidPrice": 100,
    "video": {
        "clickUrl": "https:\/\/bins.biz\/aut-dignissimos-distinctio-quibusdam-voluptatem-velit-cumque.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTgsImV4cCI6MTcyNjU3NjA1OCwibmJmIjoxNzI2NTcyNDU4LCJqdGkiOiJSTENxT2NJenNjcWhiZVh1Iiwic3ViIjoiMjkiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.cyDGrVYcWiHyhQWMDUwFBYfG3MVhKd7A3nQLULR1naU' \
    -d '{
    "name": "Video creative #4",
    "creativeType": "video",
    "frequencyType": "user",
    "frequencyCap": 1,
    "frequencyPeriod": 1,
    "frequency": 1,
    "mediaId": 19,
    "bidPrice": 100,
    "video": {
        "clickUrl": "https:\/\/bins.biz\/aut-dignissimos-distinctio-quibusdam-voluptatem-velit-cumque.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": "401 x 234",
        "weight": "0.38 MB",
        "folderId": null,
        "createdAt": "2024-09-17 00:00:00",
        "updatedAt": "2024-09-17 11:27:38",
        "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=\"19\">\n                <Linear>\n                    <Duration>00:00:09<\/Duration>\n                    <VideoClicks>\n                        <ClickThrough><![CDATA[https:\/\/bins.biz\/aut-dignissimos-distinctio-quibusdam-voluptatem-velit-cumque.html]]><\/ClickThrough>\n                    <\/VideoClicks>\n                    <MediaFiles>\n                        <MediaFile delivery=\"\" type=\"video\/mp4\" width=\"401\" height=\"234\"><![CDATA[https:\/\/hermann.com\/quia-est-quos-hic-necessitatibus-totam-consequatur-optio.html29_8f54a168e84e2a1f75c9b668a0c367bd.mp4]]><\/MediaFile>\n                    <\/MediaFiles>\n                <\/Linear>\n            <\/Creative>\n        <\/Creatives>\n    <\/InLine>\n<\/Ad>\n<\/VAST>",
                "mimeType": [
                    "video\/mp4"
                ],
                "width": 401,
                "height": 234,
                "duration": 9,
                "clickUrl": "https:\/\/bins.biz\/aut-dignissimos-distinctio-quibusdam-voluptatem-velit-cumque.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTgsImV4cCI6MTcyNjU3NjA1OCwibmJmIjoxNzI2NTcyNDU4LCJqdGkiOiJ1OU1WQ2VwTHIxbk9PWWczIiwic3ViIjoiMzAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.1yeKLXSxsYcKaQjhDDs47b3ZsSxByiaWYK0ZonQlmvU
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTgsImV4cCI6MTcyNjU3NjA1OCwibmJmIjoxNzI2NTcyNDU4LCJqdGkiOiJ1OU1WQ2VwTHIxbk9PWWczIiwic3ViIjoiMzAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.1yeKLXSxsYcKaQjhDDs47b3ZsSxByiaWYK0ZonQlmvU' \
    -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": "placeat quisquam",
        "frequencyType": "user",
        "frequency": 0,
        "frequencyCap": 3,
        "frequencyPeriod": 1,
        "bidPrice": "5.85",
        "autoresize": 0,
        "adaptiveCpm": false,
        "size": " x ",
        "weight": "0.00 MB",
        "folderId": null,
        "createdAt": "2024-09-17 00:00:00",
        "updatedAt": "2024-09-17 11:27:38",
        "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTgsImV4cCI6MTcyNjU3NjA1OCwibmJmIjoxNzI2NTcyNDU4LCJqdGkiOiJyU3pmWUFQdldlMDNPWHN1Iiwic3ViIjoiMzEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.fl_MZ5hlE2GAdTs6XfjYfVRZJm7rPHJAqLkhrjiDRRI
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTgsImV4cCI6MTcyNjU3NjA1OCwibmJmIjoxNzI2NTcyNDU4LCJqdGkiOiJyU3pmWUFQdldlMDNPWHN1Iiwic3ViIjoiMzEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.fl_MZ5hlE2GAdTs6XfjYfVRZJm7rPHJAqLkhrjiDRRI' \
                -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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJkWGVSWE4wRGgzQ0JTd2g2Iiwic3ViIjoiMTIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0._68FlfQEK5u7oVZTarWRSMEgN5WL8VGeAg4MynJCaxU
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJkWGVSWE4wRGgzQ0JTd2g2Iiwic3ViIjoiMTIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0._68FlfQEK5u7oVZTarWRSMEgN5WL8VGeAg4MynJCaxU' \
    -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": "user",
            "frequency": 0,
            "frequencyCap": 5,
            "frequencyPeriod": 1,
            "bidPrice": "11.69",
            "autoresize": 0,
            "adaptiveCpm": false,
            "size": "541 x 350",
            "weight": "0.22 MB",
            "folderId": null,
            "createdAt": "2024-09-17 00:00:00",
            "updatedAt": "2024-09-17 11:27:37",
            "pendingAt": null,
            "deletedAt": null,
            "media": {
                "id": 1,
                "userId": 12,
                "mediaType": "image",
                "originName": "image.jpg",
                "name": "12_a9e5850eaeb99772c4f7e708510bb83d.jpg",
                "extension": "jpg",
                "url": "http:\/\/www.wisozk.com\/impedit-voluptatem-veniam-ut-enim-et.html12_a9e5850eaeb99772c4f7e708510bb83d.jpg",
                "width": 344,
                "height": 258,
                "weight": 229170
            },
            "relation": {
                "banner": {
                    "apiFramework": 0,
                    "admBody": "<a target=\"_blank\" href=\"http:\/\/www.huels.com\/et-beatae-voluptatem-est-voluptas-dignissimos\" ><img src=\"https:\/\/www.nicolas.com\/quia-nam-autem-non-quia-dicta\/10.jpg\"\/><\/a>",
                    "bannerType": "banner",
                    "clickUrl": "http:\/\/www.gibson.com\/consequatur-recusandae-repellat-voluptatibus-laborum-cum",
                    "width": 541,
                    "height": 350,
                    "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJFZXhIRjM4aXd4QTRyeEJiIiwic3ViIjoiMTMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.PSN-RISA2FcrXrP1xr9LWsheK5NZFzj3pwrT5KmC-4A
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJFZXhIRjM4aXd4QTRyeEJiIiwic3ViIjoiMTMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.PSN-RISA2FcrXrP1xr9LWsheK5NZFzj3pwrT5KmC-4A' \
    -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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiI5TzRaTHBac2FZUXJFQVdsIiwic3ViIjoiMTQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.v0bsdBIc5S5FCPH0wuK8WHbJTlPbuYDFg2vDi4sJ3I0
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiI5TzRaTHBac2FZUXJFQVdsIiwic3ViIjoiMTQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.v0bsdBIc5S5FCPH0wuK8WHbJTlPbuYDFg2vDi4sJ3I0' \
    -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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiI0MFpPV1oyOWNETUk2eVdEIiwic3ViIjoiMTUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.OaslE6wbA18PPaA2v6rl0bkFFcB6TEeYd9EJZC3RaZc
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiI0MFpPV1oyOWNETUk2eVdEIiwic3ViIjoiMTUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.OaslE6wbA18PPaA2v6rl0bkFFcB6TEeYd9EJZC3RaZc' \
                -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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTksImV4cCI6MTcyNjU3NjA1OSwibmJmIjoxNzI2NTcyNDU5LCJqdGkiOiJOMTRYYVlNd0FRNVJxQmZvIiwic3ViIjoiMzIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.E0d9Dun4wQ8zUX3smZrBpgahsTj5eb6dJX-pI7M5PEM
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTksImV4cCI6MTcyNjU3NjA1OSwibmJmIjoxNzI2NTcyNDU5LCJqdGkiOiJOMTRYYVlNd0FRNVJxQmZvIiwic3ViIjoiMzIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.E0d9Dun4wQ8zUX3smZrBpgahsTj5eb6dJX-pI7M5PEM' \
    -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-09-17",
            "updatedAt": "2024-09-17"
        },
        {
            "id": 11,
            "isActive": 0,
            "userId": 32,
            "title": "Test Filter list #2",
            "type": "ipAdresses",
            "isInclude": "White",
            "count": 2,
            "createdAt": "2024-09-17",
            "updatedAt": "2024-09-17"
        },
        {
            "id": 12,
            "isActive": 0,
            "userId": 32,
            "title": "Test Filter list #3",
            "type": "urls",
            "isInclude": "White",
            "count": 3,
            "createdAt": "2024-09-17",
            "updatedAt": "2024-09-17"
        }
    ],
    "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTksImV4cCI6MTcyNjU3NjA1OSwibmJmIjoxNzI2NTcyNDU5LCJqdGkiOiJDbVZ2ZTFmSXNpV0RRRDF5Iiwic3ViIjoiMzMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.sv0uXzD2fuRXzVGDymj1w9-d9b1sQLml1ZNunhclU5c
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTksImV4cCI6MTcyNjU3NjA1OSwibmJmIjoxNzI2NTcyNDU5LCJqdGkiOiJDbVZ2ZTFmSXNpV0RRRDF5Iiwic3ViIjoiMzMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.sv0uXzD2fuRXzVGDymj1w9-d9b1sQLml1ZNunhclU5c' \
    -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-09-17",
        "updatedAt": "2024-09-17",
        "items": [
            "brekke.org",
            "dubuque.biz",
            "marks.com",
            "moore.com",
            "schulist.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTksImV4cCI6MTcyNjU3NjA1OSwibmJmIjoxNzI2NTcyNDU5LCJqdGkiOiI0WFp1d3lsYUdxTG53SEhyIiwic3ViIjoiMzQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.kGlsfNpeDL7EyzovYexankDIMXOqJiX6KR0N_7IluS0
DATA
{
    "title": "Test Filter list #5",
    "type": "ipAdresses",
    "isInclude": true,
    "items": [
        "130.223.138.196",
        "54.22.241.9",
        "56.177.145.86",
        "244.65.216.237",
        "200.21.27.225"
    ],
    "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTksImV4cCI6MTcyNjU3NjA1OSwibmJmIjoxNzI2NTcyNDU5LCJqdGkiOiI0WFp1d3lsYUdxTG53SEhyIiwic3ViIjoiMzQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.kGlsfNpeDL7EyzovYexankDIMXOqJiX6KR0N_7IluS0' \
    -d '{
    "title": "Test Filter list #5",
    "type": "ipAdresses",
    "isInclude": true,
    "items": [
        "130.223.138.196",
        "54.22.241.9",
        "56.177.145.86",
        "244.65.216.237",
        "200.21.27.225"
    ],
    "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-09-17",
        "updatedAt": "2024-09-17",
        "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTksImV4cCI6MTcyNjU3NjA1OSwibmJmIjoxNzI2NTcyNDU5LCJqdGkiOiJDZWhZeWVBYUR0Qmo1RVJoIiwic3ViIjoiMzUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.5Yc_5lXATNhkRED6kOj5Asw80fEn0dER-_BhINElFo0
DATA
{
    "title": "Test FilterList #7",
    "isInclude": true,
    "items": [
        "https:\/\/kohler.com\/illo-nisi-vero-doloremque.html",
        "http:\/\/dickinson.info\/eos-nulla-voluptas-corporis",
        "http:\/\/www.johnson.info\/reiciendis-explicabo-iusto-recusandae-libero-exercitationem-consectetur"
    ],
    "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTksImV4cCI6MTcyNjU3NjA1OSwibmJmIjoxNzI2NTcyNDU5LCJqdGkiOiJDZWhZeWVBYUR0Qmo1RVJoIiwic3ViIjoiMzUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.5Yc_5lXATNhkRED6kOj5Asw80fEn0dER-_BhINElFo0' \
    -d '{
    "title": "Test FilterList #7",
    "isInclude": true,
    "items": [
        "https:\/\/kohler.com\/illo-nisi-vero-doloremque.html",
        "http:\/\/dickinson.info\/eos-nulla-voluptas-corporis",
        "http:\/\/www.johnson.info\/reiciendis-explicabo-iusto-recusandae-libero-exercitationem-consectetur"
    ],
    "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-09-17",
        "updatedAt": "2024-09-17",
        "items": [
            "http:\/\/hoppe.com\/non-ab-omnis-tempore-amet-eum-dolorem-aliquid",
            "http:\/\/www.walter.org\/velit-provident-voluptates-rerum-ut"
        ],
        "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTksImV4cCI6MTcyNjU3NjA1OSwibmJmIjoxNzI2NTcyNDU5LCJqdGkiOiI5em94YXFGT3ZvQ2QzcHZrIiwic3ViIjoiMzYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.jw1FhYothrZmnPk_niA9f8pjWUnTFj7IHTFLDH6inGA
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTksImV4cCI6MTcyNjU3NjA1OSwibmJmIjoxNzI2NTcyNDU5LCJqdGkiOiI5em94YXFGT3ZvQ2QzcHZrIiwic3ViIjoiMzYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.jw1FhYothrZmnPk_niA9f8pjWUnTFj7IHTFLDH6inGA' \
                -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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJTa1dmZjVzZVhOVXUyam4wIiwic3ViIjoiMTYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.umjXODu_N0fd-GBElVsR_ck7S53-pDb7itRSZbOYgVA
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJTa1dmZjVzZVhOVXUyam4wIiwic3ViIjoiMTYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.umjXODu_N0fd-GBElVsR_ck7S53-pDb7itRSZbOYgVA' \
    -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-09-17",
                "updatedAt": "2024-09-17"
            }
        },
        {
            "isInclude": true,
            "filterList": {
                "id": 2,
                "isActive": 0,
                "userId": 16,
                "title": "Test Filter list #2",
                "type": "ipAdresses",
                "isInclude": "White",
                "count": 1,
                "createdAt": "2024-09-17",
                "updatedAt": "2024-09-17"
            }
        },
        {
            "isInclude": true,
            "filterList": {
                "id": 3,
                "isActive": 0,
                "userId": 16,
                "title": "Test Filter list #3",
                "type": "urls",
                "isInclude": "White",
                "count": 1,
                "createdAt": "2024-09-17",
                "updatedAt": "2024-09-17"
            }
        }
    ],
    "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJnbEI5c2RmSDI2a1FKa3FEIiwic3ViIjoiMTciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.znlkcviGt1Nb7WqxSIeZkau1w0l6btYsMywikmv-GXg
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJnbEI5c2RmSDI2a1FKa3FEIiwic3ViIjoiMTciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.znlkcviGt1Nb7WqxSIeZkau1w0l6btYsMywikmv-GXg' \
    -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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJIUjhsMkNVMFBnbTMwU1F1Iiwic3ViIjoiMTgiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.4QY4E6xw7KESjGVclw_ckXEt1LLImzucpTc6dOzefP0
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJIUjhsMkNVMFBnbTMwU1F1Iiwic3ViIjoiMTgiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.4QY4E6xw7KESjGVclw_ckXEt1LLImzucpTc6dOzefP0' \
    -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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJucFdBVHhDYXJLQUlLVUtXIiwic3ViIjoiMTkiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.HyYf2oINtQAbCCcHgiKYq6LA6NIQDhPn2cJTrrhuG94
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJucFdBVHhDYXJLQUlLVUtXIiwic3ViIjoiMTkiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.HyYf2oINtQAbCCcHgiKYq6LA6NIQDhPn2cJTrrhuG94' \
                -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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTksImV4cCI6MTcyNjU3NjA1OSwibmJmIjoxNzI2NTcyNDU5LCJqdGkiOiIwOWo3RTh5d3FIZkxsSkRzIiwic3ViIjoiNDEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.wXsHcXNwzV6mo7pXLIJwp-DePocOD6-VQi_FwKLbISk
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTksImV4cCI6MTcyNjU3NjA1OSwibmJmIjoxNzI2NTcyNDU5LCJqdGkiOiIwOWo3RTh5d3FIZkxsSkRzIiwic3ViIjoiNDEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.wXsHcXNwzV6mo7pXLIJwp-DePocOD6-VQi_FwKLbISk' \
    -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_3_days",
            "then": "blacklist_source",
            "targetFilterListId": 1,
            "conditions": [],
            "createdAt": "2024-09-17T11:27:39.000000Z",
            "updatedAt": "2024-09-17T11:27:39.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NjAsImV4cCI6MTcyNjU3NjA2MCwibmJmIjoxNzI2NTcyNDYwLCJqdGkiOiJIYTBud3JiVzAzUWpqMlYyIiwic3ViIjoiNDIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.xlnqJWmhB98cp3DPwfH5iuyYp_j2sC7loSIKUzxPsUc
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NjAsImV4cCI6MTcyNjU3NjA2MCwibmJmIjoxNzI2NTcyNDYwLCJqdGkiOiJIYTBud3JiVzAzUWpqMlYyIiwic3ViIjoiNDIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.xlnqJWmhB98cp3DPwfH5iuyYp_j2sC7loSIKUzxPsUc' \
    -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-09-17T11:27:40.000000Z",
        "updatedAt": "2024-09-17T11:27:40.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NjAsImV4cCI6MTcyNjU3NjA2MCwibmJmIjoxNzI2NTcyNDYwLCJqdGkiOiJrYW1oRjYyUnlVNHpCR096Iiwic3ViIjoiNDMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.5ePJYv8NXzTFtEGq5vmOU6ziroxgCvObB_9hq3z_4-A
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NjAsImV4cCI6MTcyNjU3NjA2MCwibmJmIjoxNzI2NTcyNDYwLCJqdGkiOiJrYW1oRjYyUnlVNHpCR096Iiwic3ViIjoiNDMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.5ePJYv8NXzTFtEGq5vmOU6ziroxgCvObB_9hq3z_4-A' \
    -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-09-17T11:27:40.000000Z",
        "updatedAt": "2024-09-17T11:27:40.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NjAsImV4cCI6MTcyNjU3NjA2MCwibmJmIjoxNzI2NTcyNDYwLCJqdGkiOiJMRVNGOW1ZUFJrM1VlWVp3Iiwic3ViIjoiNDQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.6WPVO9Xe0pVrDKp-laysvIqGZWOuW21XOyh4e2OOVoI
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NjAsImV4cCI6MTcyNjU3NjA2MCwibmJmIjoxNzI2NTcyNDYwLCJqdGkiOiJMRVNGOW1ZUFJrM1VlWVp3Iiwic3ViIjoiNDQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.6WPVO9Xe0pVrDKp-laysvIqGZWOuW21XOyh4e2OOVoI' \
    -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-09-17T11:27:40.000000Z",
        "updatedAt": "2024-09-17T11:27:40.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NjAsImV4cCI6MTcyNjU3NjA2MCwibmJmIjoxNzI2NTcyNDYwLCJqdGkiOiJiQVVEU2VLQTNaOTJlWTB6Iiwic3ViIjoiNDUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.ed8HdgdlJAmUH_drfYUN2JPjKjMFa2900aYlnDbgFMw
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NjAsImV4cCI6MTcyNjU3NjA2MCwibmJmIjoxNzI2NTcyNDYwLCJqdGkiOiJiQVVEU2VLQTNaOTJlWTB6Iiwic3ViIjoiNDUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.ed8HdgdlJAmUH_drfYUN2JPjKjMFa2900aYlnDbgFMw' \
                -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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJGd0RrR0p1MXpxTVR3N2psIiwic3ViIjoiOSIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.uzITQ7yG0RBzoMqChFFzDTRvOO3x9N7H0jHyEuEveiA
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJGd0RrR0p1MXpxTVR3N2psIiwic3ViIjoiOSIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.uzITQ7yG0RBzoMqChFFzDTRvOO3x9N7H0jHyEuEveiA' \
    -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_3_days",
        "then": "whitelist_source",
        "targetFilterListId": 1,
        "conditions": [
            {
                "condition": "or",
                "action": "impressions",
                "comparison": "<",
                "value": 1
            }
        ],
        "createdAt": "2024-09-17T11:27:37.000000Z",
        "updatedAt": "2024-09-17T11:27:37.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJXYldLa0tVY2w2d1BLUHgyIiwic3ViIjoiMTAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.ieALWBvkHfZqeiKvYmtHa_sPk213hdMSbtd-Paw35q8
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJXYldLa0tVY2w2d1BLUHgyIiwic3ViIjoiMTAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.ieALWBvkHfZqeiKvYmtHa_sPk213hdMSbtd-Paw35q8' \
    -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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJxRU9hcW9JckNmY1l4WEdzIiwic3ViIjoiMTEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.riXqwoFiPDlChoWaPYWf6LuXCWqRGotqySawIVhX09g
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3MjY1NzI0NTcsImV4cCI6MTcyNjU3NjA1NywibmJmIjoxNzI2NTcyNDU3LCJqdGkiOiJxRU9hcW9JckNmY1l4WEdzIiwic3ViIjoiMTEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.riXqwoFiPDlChoWaPYWf6LuXCWqRGotqySawIVhX09g' \
                -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',