1. Authorization
1.1. Login
This `POST` request will return result login and token
1.1.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMvYXBpL3VzZXJzL2xvZ2luIiwiaWF0IjoxNzM4ODM3NTQxLCJleHAiOjE3Mzg4NDExNDEsIm5iZiI6MTczODgzNzU0MSwianRpIjoiS1FHSlZvUDRlM0NjSHBzZiIsInN1YiI6IjciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.qB4khwuTNG6HWjT5HqdIiOVC-wr_uQVWV1TKi8CrUpc",
"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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDEsImV4cCI6MTczODg0MTE0MSwibmJmIjoxNzM4ODM3NTQxLCJqdGkiOiJreDQ2OVBLRnlOdnhNaHZ0Iiwic3ViIjoiOCIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.cmABrb0ENYqNspKistIGgxaC4BXJBs_qNnohV6Qe0p0
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDEsImV4cCI6MTczODg0MTE0MSwibmJmIjoxNzM4ODM3NTQxLCJqdGkiOiJreDQ2OVBLRnlOdnhNaHZ0Iiwic3ViIjoiOCIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.cmABrb0ENYqNspKistIGgxaC4BXJBs_qNnohV6Qe0p0' \
-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 |
|
from |
date |
Start date (yyyy-mm-dd) |
+ |
to |
date |
End date (yyyy-mm-dd) |
+ |
groupBy |
array |
Grouping fields: |
+ |
agregatedFields |
array |
Agregated fields: |
+ |
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDYsImV4cCI6MTczODg0MTE0NiwibmJmIjoxNzM4ODM3NTQ2LCJqdGkiOiJyMHJ5Y21rS0VnTHJ3SzRNIiwic3ViIjoiNTEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.X7FHMvDOt5wGK_r0niJX2Iohcu4xs_Xh6D-GNlS3Eyw
DATA
{ "timezone": "Etc\/GMT+10", "from": "2025-02-04", "to": "2025-02-06", "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDYsImV4cCI6MTczODg0MTE0NiwibmJmIjoxNzM4ODM3NTQ2LCJqdGkiOiJyMHJ5Y21rS0VnTHJ3SzRNIiwic3ViIjoiNTEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.X7FHMvDOt5wGK_r0niJX2Iohcu4xs_Xh6D-GNlS3Eyw' \
-d '{
"timezone": "Etc\/GMT+10",
"from": "2025-02-04",
"to": "2025-02-06",
"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": "2025-02-06",
"campaignId": 1,
"campaignId_dict": "Cumque et| id# 1",
"creativeId": 12,
"creativeId_dict": "Ducimus est| id# 12",
"bids": 259,
"wins": 137,
"impressions": 117,
"dspSpend": 0.16734,
"winrate": 52.8957528957529,
"ecpm": 1.4302564102564101,
"clicks": 28,
"conversions": 40,
"ctr": 23.931623931623932
},
{
"YMD": "2025-02-06",
"campaignId": 2,
"campaignId_dict": "Voluptatem eveniet| id# 2",
"creativeId": 11,
"creativeId_dict": "Quo officia| id# 11",
"bids": 740,
"wins": 227,
"impressions": 189,
"dspSpend": 0.33151,
"winrate": 30.675675675675677,
"ecpm": 1.7540211640211643,
"clicks": 2,
"conversions": 22,
"ctr": 1.0582010582010581
},
{
"YMD": "2025-02-06",
"campaignId": 2,
"campaignId_dict": "Est non| id# 2",
"creativeId": 12,
"creativeId_dict": "Ullam non| id# 12",
"bids": 822,
"wins": 440,
"impressions": 348,
"dspSpend": 0.30373,
"winrate": 53.5279805352798,
"ecpm": 0.8727873563218391,
"clicks": 22,
"conversions": 18,
"ctr": 6.32183908045977
},
{
"YMD": "2025-02-05",
"campaignId": 1,
"campaignId_dict": "Ut officiis| id# 1",
"creativeId": 11,
"creativeId_dict": "Ipsam ipsa| id# 11",
"bids": 206,
"wins": 129,
"impressions": 114,
"dspSpend": 0.47543,
"winrate": 62.62135922330097,
"ecpm": 4.170438596491228,
"clicks": 16,
"conversions": 13,
"ctr": 14.035087719298245
},
{
"YMD": "2025-02-06",
"campaignId": 1,
"campaignId_dict": "Distinctio reprehenderit| id# 1",
"creativeId": 11,
"creativeId_dict": "Est expedita| id# 11",
"bids": 701,
"wins": 414,
"impressions": 353,
"dspSpend": 0.3021,
"winrate": 59.05848787446505,
"ecpm": 0.8558073654390934,
"clicks": 24,
"conversions": 16,
"ctr": 6.798866855524079
},
{
"YMD": "2025-02-05",
"campaignId": 1,
"campaignId_dict": "Veritatis sed| id# 1",
"creativeId": 12,
"creativeId_dict": "Ab harum| id# 12",
"bids": 810,
"wins": 496,
"impressions": 358,
"dspSpend": 0.4405,
"winrate": 61.23456790123457,
"ecpm": 1.2304469273743017,
"clicks": 36,
"conversions": 19,
"ctr": 10.05586592178771
},
{
"YMD": "2025-02-05",
"campaignId": 2,
"campaignId_dict": "Quis quia| id# 2",
"creativeId": 11,
"creativeId_dict": "Fugiat aliquam| id# 11",
"bids": 509,
"wins": 171,
"impressions": 120,
"dspSpend": 0.369,
"winrate": 33.59528487229863,
"ecpm": 3.075,
"clicks": 47,
"conversions": 38,
"ctr": 39.166666666666664
},
{
"YMD": "2025-02-05",
"campaignId": 2,
"campaignId_dict": "Aperiam sunt| id# 2",
"creativeId": 12,
"creativeId_dict": "Eos ut| id# 12",
"bids": 455,
"wins": 186,
"impressions": 131,
"dspSpend": 0.26604,
"winrate": 40.879120879120876,
"ecpm": 2.0308396946564886,
"clicks": 20,
"conversions": 48,
"ctr": 15.267175572519085
},
{
"YMD": "2025-02-04",
"campaignId": 1,
"campaignId_dict": "Deserunt dignissimos| id# 1",
"creativeId": 11,
"creativeId_dict": "Sapiente iusto| id# 11",
"bids": 306,
"wins": 203,
"impressions": 149,
"dspSpend": 0.28413,
"winrate": 66.33986928104575,
"ecpm": 1.9069127516778523,
"clicks": 34,
"conversions": 42,
"ctr": 22.818791946308725
},
{
"YMD": "2025-02-04",
"campaignId": 1,
"campaignId_dict": "Laudantium dolores| id# 1",
"creativeId": 12,
"creativeId_dict": "Tenetur et| id# 12",
"bids": 460,
"wins": 179,
"impressions": 159,
"dspSpend": 0.152,
"winrate": 38.91304347826087,
"ecpm": 0.9559748427672956,
"clicks": 28,
"conversions": 30,
"ctr": 17.61006289308176
},
{
"YMD": "2025-02-04",
"campaignId": 2,
"campaignId_dict": "Praesentium et| id# 2",
"creativeId": 11,
"creativeId_dict": "Accusamus qui| id# 11",
"bids": 771,
"wins": 492,
"impressions": 435,
"dspSpend": 0.19566,
"winrate": 63.81322957198444,
"ecpm": 0.44979310344827583,
"clicks": 42,
"conversions": 40,
"ctr": 9.655172413793103
},
{
"YMD": "2025-02-04",
"campaignId": 2,
"campaignId_dict": "Aut sunt| id# 2",
"creativeId": 12,
"creativeId_dict": "Iusto quisquam| id# 12",
"bids": 443,
"wins": 167,
"impressions": 148,
"dspSpend": 0.20411,
"winrate": 37.69751693002257,
"ecpm": 1.3791216216216218,
"clicks": 39,
"conversions": 23,
"ctr": 26.35135135135135
}
],
"totals": {
"YMD": "",
"campaignId": 0,
"campaignId_dict": "",
"creativeId": 0,
"creativeId_dict": "",
"bids": 6482,
"wins": 3241,
"impressions": 2621,
"dspSpend": 3.49155,
"winrate": 50.10432409320352,
"ecpm": 1.675949986172964,
"clicks": 338,
"conversions": 349,
"ctr": 16.089225450884623
},
"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 |
|
from |
date |
Start date (yyyy-mm-dd) |
+ |
to |
date |
End date (yyyy-mm-dd) |
+ |
groupBy |
array |
Grouping fields: |
+ |
agregatedFields |
array |
Agregated fields: |
+ |
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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDYsImV4cCI6MTczODg0MTE0NiwibmJmIjoxNzM4ODM3NTQ2LCJqdGkiOiJGclZwRk9wY0x0RFU4bGdPIiwic3ViIjoiNTIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.4BrZJXFDcQwuyr69aPY1kJqWufVPudPJWHFSS9duJpY
DATA
{ "timezone": "UTC", "from": "2025-02-04", "to": "2025-02-06", "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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDYsImV4cCI6MTczODg0MTE0NiwibmJmIjoxNzM4ODM3NTQ2LCJqdGkiOiJGclZwRk9wY0x0RFU4bGdPIiwic3ViIjoiNTIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.4BrZJXFDcQwuyr69aPY1kJqWufVPudPJWHFSS9duJpY' \
-d '{
"timezone": "UTC",
"from": "2025-02-04",
"to": "2025-02-06",
"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": "2025-02-05",
"campaignId": 1,
"campaignId_dict": "In quibusdam| id# 1",
"creativeId": 10,
"creativeId_dict": "Velit aut| id# 10",
"bids": 617,
"wins": 287,
"impressions": 200,
"dspSpend": 0.29593,
"winrate": 46.51539708265802,
"ecpm": 1.4796500000000001,
"clicks": 49,
"conversions": 34,
"ctr": 24.5
},
{
"YMD": "2025-02-06",
"campaignId": 1,
"campaignId_dict": "Cumque et| id# 1",
"creativeId": 10,
"creativeId_dict": "Totam aut| id# 10",
"bids": 834,
"wins": 563,
"impressions": 459,
"dspSpend": 0.40045,
"winrate": 67.50599520383693,
"ecpm": 0.8724400871459694,
"clicks": 29,
"conversions": 12,
"ctr": 6.318082788671024
},
{
"YMD": "2025-02-04",
"campaignId": 1,
"campaignId_dict": "Possimus et| id# 1",
"creativeId": 10,
"creativeId_dict": "Architecto velit| id# 10",
"bids": 178,
"wins": 117,
"impressions": 82,
"dspSpend": 0.42285,
"winrate": 65.73033707865169,
"ecpm": 5.156707317073171,
"clicks": 45,
"conversions": 23,
"ctr": 54.8780487804878
}
],
"totals": {
"YMD": "",
"campaignId": 0,
"campaignId_dict": "",
"creativeId": 0,
"creativeId_dict": "",
"bids": 1629,
"wins": 967,
"impressions": 741,
"dspSpend": 1.11923,
"winrate": 59.917243121715536,
"ecpm": 2.502932468073047,
"clicks": 123,
"conversions": 69,
"ctr": 28.56537718971961
},
"pagination": {
"page": 1,
"per_page": 25,
"total": 3
}
}
3. Agency
3.1. Deposit to advert
A `POST` request
3.1.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
userId |
integer |
user id |
+ |
transactionAmount |
integer |
transaction amount |
+ |
3.1.2. HTTP Request
URL
POST api/deposit-agency-user HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDAsImV4cCI6MTczODg0MTE0MCwibmJmIjoxNzM4ODM3NTQwLCJqdGkiOiJsR3BPYnJ6RUdGdnl2RHhFIiwic3ViIjoiMSIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.w0PbTB0l7IB_dnA9mz3gsgf2FJIL9yC4xYBlijoQMyg
DATA
{ "userId": 2, "transactionAmount": 10 }
3.1.3. Curl request
$ curl 'https://dsp-api.smartyads.com/api/deposit-agency-user' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDAsImV4cCI6MTczODg0MTE0MCwibmJmIjoxNzM4ODM3NTQwLCJqdGkiOiJsR3BPYnJ6RUdGdnl2RHhFIiwic3ViIjoiMSIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.w0PbTB0l7IB_dnA9mz3gsgf2FJIL9yC4xYBlijoQMyg' \
-d '{
"userId": 2,
"transactionAmount": 10
}'
3.1.4. Response Body
Path | Type | Description |
---|---|---|
status |
string |
Result status |
balance |
float |
balance |
3.1.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"status": "success",
"balance": "30714.00000"
}
3.2. Withdraw to advert
A `POST` request
3.2.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
userId |
integer |
user id |
+ |
transactionAmount |
integer |
transaction amount |
+ |
3.2.2. HTTP Request
URL
POST api/withdraw-agency-user HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDEsImV4cCI6MTczODg0MTE0MSwibmJmIjoxNzM4ODM3NTQxLCJqdGkiOiJ5bGN0c2RPTnpJNUF0bGxPIiwic3ViIjoiMyIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.bNnWNl4j4Qqp2geXc2XqjaPNTPo__zQy0QWhHoJl9Yc
DATA
{ "userId": 4, "transactionAmount": 10 }
3.2.3. Curl request
$ curl 'https://dsp-api.smartyads.com/api/withdraw-agency-user' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDEsImV4cCI6MTczODg0MTE0MSwibmJmIjoxNzM4ODM3NTQxLCJqdGkiOiJ5bGN0c2RPTnpJNUF0bGxPIiwic3ViIjoiMyIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.bNnWNl4j4Qqp2geXc2XqjaPNTPo__zQy0QWhHoJl9Yc' \
-d '{
"userId": 4,
"transactionAmount": 10
}'
3.2.4. Response Body
Path | Type | Description |
---|---|---|
status |
string |
Result status |
balance |
float |
balance |
3.2.5. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"status": "success",
"balance": "83193.00000"
}
3.3. User list with campaigns
A `GET` request
3.3.1. HTTP Request
URL
GET api/get-agency-users-with-campaigns HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDEsImV4cCI6MTczODg0MTE0MSwibmJmIjoxNzM4ODM3NTQxLCJqdGkiOiJrVGlCTlE5VElNTkh6ZGNEIiwic3ViIjoiNSIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.LxC8ifDTee8-NY4UUF0GauoilgHr2Saptbz0EMunNz8
DATA
{ "where": "userId;5" }
3.3.2. Curl request
$ curl 'https://dsp-api.smartyads.com/api/get-agency-users-with-campaigns' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDEsImV4cCI6MTczODg0MTE0MSwibmJmIjoxNzM4ODM3NTQxLCJqdGkiOiJrVGlCTlE5VElNTkh6ZGNEIiwic3ViIjoiNSIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.LxC8ifDTee8-NY4UUF0GauoilgHr2Saptbz0EMunNz8' \
-d '{
"where": "userId;5"
}'
3.3.3. Response Body
Path | Type | Description |
---|---|---|
data.*.id |
integer |
user id |
data.*.firstName |
string |
First name |
data.*.lastName |
string |
Last name |
data.*.balance |
float |
balance |
data.*.bidResTotalCounter |
integer |
Bid total counter |
data.*.bidResDailyCounter |
integer |
Bid daily counter |
data.*.winsTotalCounter |
integer |
Wins total counter |
data.*.winsDailyCounter |
integer |
Wins daily counter |
data.*.impressionsTotalCounter |
integer |
Impressions total counter |
data.*.impressionsDailyCounter |
integer |
Impressions daily counter |
data.*.clicksTotalCounter |
integer |
Click total counter |
data.*.clicksDailyCounter |
integer |
Click daily counter |
data.*.spentDailyLimit |
integer |
Spent daily limit |
data.*.spentDailyCounter |
integer |
Spent daily counter |
data.*.spentTotalLimit |
integer |
Spent total limit |
data.*.spentTotalCounter |
integer |
Spent total counter |
data.*.impressionsDailyLimit |
integer |
impressions daily limit |
data.*.impressionsTotalLimit |
integer |
impressions total limit |
data..campaigns..id |
integer |
campaign id |
data..campaigns..userId |
integer |
user id |
data..campaigns..isActive |
boolean |
isActive |
data..campaigns..isRunning |
boolean |
Campaign running status |
data..campaigns..type |
string |
Campaign type: banner, native, video, audio |
data..campaigns..name |
string |
Campaign name |
data..campaigns..isRewarded |
integer |
Rewarded video (for video creatives) |
data..campaigns..isDesktopWeb |
boolean |
Traffic Type: Desktop Websites |
data..campaigns..isMobileApp |
boolean |
Traffic Type: Mobile Applications |
data..campaigns..isMobileWeb |
boolean |
Traffic Type: Mobile Websites |
data..campaigns..isSmartphone |
boolean |
Traffic Type: Smartphones |
data..campaigns..isTablet |
boolean |
Traffic Type: Tablets |
data..campaigns..isCTV |
boolean |
Traffic Type: CTV |
data..campaigns..isDOOH |
boolean |
Traffic Type: DOOH |
data..campaigns..aDomain |
integer |
Top level domain |
data..campaigns..dateStart |
date |
Date start |
data..campaigns..dateEnd |
date |
Date end |
data..campaigns..geoCountries |
array |
GEO Targeting: countries list |
data..campaigns..geoCountriesIsInclude |
boolean |
GEO Targeting: countries list type (true: whitelist, false: blacklist) |
data..campaigns..geoRegions |
array |
GEO Targeting: regions list |
data..campaigns..geoRegionsIsInclude |
boolean |
GEO Targeting: regions list type (true: whitelist, false: blacklist) |
data..campaigns..geoCities |
array |
GEO Targeting: cities list |
data..campaigns..geoCitiesIsInclude |
boolean |
GEO Targeting: cities list type (true: whitelist, false: blacklist) |
data..campaigns..contentCategories |
array |
Targeting: IAB Categories list |
data..campaigns..contentCategoriesIsInclude |
boolean |
Targeting: IAB Categories list type (true: whitelist, false: blacklist) |
data..campaigns..userAgeMin |
integer |
Targeting: Age range from |
data..campaigns..userAgeMax |
integer |
Targeting: Age range to |
data..campaigns..connectionTypes |
array |
Targeting: Connection types list |
data..campaigns..clickedInventoryCategories |
array |
Сlicked Inventory Categories |
data..campaigns..deviceCarrier |
array |
Targeting: List of network operators. |
data..campaigns..deviceCarrierIsInclude |
boolean |
Targeting: List of network operators type (true: whitelist, false: blacklist) |
data..campaigns..OS |
array |
Targeting: The operating system of user's device |
data..campaigns..OSIsInclude |
boolean |
Targeting: The operating system of user's device list type (true: whitelist, false: blacklist) |
data..campaigns..browser |
array |
Targeting: The user's browsers list |
data..campaigns..browserIsInclude |
boolean |
Targeting: The user's browsers list type (true: whitelist, false: blacklist) |
data..campaigns..deviceLanguage |
array |
Targeting: The languages of user's browser |
data..campaigns..deviceLanguageIsInclude |
boolean |
Targeting: The languages of user's browser list type (true: whitelist, false: blacklist) |
data..campaigns..spentDailyLimit |
integer |
Daily spent limit |
data..campaigns..spentTotalLimit |
integer |
Total spent limit |
data..campaigns..impressionsDailyLimit |
integer |
Daily impressions limit |
data..campaigns..impressionsTotalLimit |
integer |
Total impressions limit |
data..campaigns..clicksDailyLimit |
integer |
Daily clicks limit |
data..campaigns..clicksTotalLimit |
integer |
Total clicks limit |
data..campaigns..budgetUse |
integer |
Distribution: pacer, fast pacer - Evenly distribution fast - ASAP distribution |
data..campaigns..allSources |
boolean |
Inventory: Use all SSP endpoints |
data..campaigns..cpm |
float |
cpm |
data..campaigns..adaptiveCpm |
boolean |
adaptiveCpm |
data..campaigns..useCpm |
boolean |
use cpm |
data..campaigns..googleAnalyticsTrackingCode |
string |
Google Analytics tracking code - PUSH Campaigns |
data..campaigns..dynamicTargeting |
array |
SmartCPC: Dynamic targeting - only for CPC Pricing model |
data..campaigns..subscriptionAge |
array |
Subscription Age - only for CPC Pricing model |
data..campaigns..frequencyType |
string |
Frequency Type (user, ip).Required if frequency is on. |
data..campaigns..frequency |
boolean |
Frequency on/off. |
data..campaigns..frequencyCap |
integer |
Show ads no more than "Frequency Cap" times in "Frequency Period".Required if frequency is on. |
data..campaigns..frequencyPeriod |
integer |
Frequency Period (min-1,max-3). Required if frequency is on. |
data..campaigns..extendedStatus |
string |
Campaign extended status |
data..campaigns..createdAt |
datetime |
Date of creation |
data..campaigns..updatedAt |
datetime |
Date of last modification |
data..campaigns..deletedAt |
datetime |
Date of deletion |
data..campaigns..counters.spentDailyCounter |
integer |
Spent daily counter |
data..campaigns..counters.spentTotalCounter |
integer |
Spent total counter |
data..campaigns..counters.bidResTotalCounter |
integer |
Bid total counter |
data..campaigns..counters.bidResDailyCounter |
integer |
Bid daily counter |
data..campaigns..counters.conversionTotalCounter |
integer |
Conversion total counter |
data..campaigns..counters.conversionDailyCounter |
integer |
Conversion daily counter |
data..campaigns..counters.winsTotalCounter |
integer |
Wins total counter |
data..campaigns..counters.winsDailyCounter |
integer |
Wins daily counter |
data..campaigns..counters.clicksTotalCounter |
integer |
Click total counter |
data..campaigns..counters.clicksDailyCounter |
integer |
Click daily counter |
data..campaigns..counters.impressionsTotalCounter |
integer |
Impressions total counter |
data..campaigns..counters.impressionsDailyCounter |
integer |
Impressions daily counter |
data..campaigns..counters.winRate |
integer |
Winrate counter |
data..campaigns..pretarget |
int |
pretarget |
data..campaigns..pretargets |
array |
pretargets |
data..campaigns..audiences |
array |
audiences |
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 |
string |
Pagination: url links |
3.3.4. HTTP Response
HTTP/1.0 200 OK
Content-type: application/json
Access-control-allow-origin: *
{
"data": [
{
"id": 5,
"firstName": "Rogers",
"lastName": "Green",
"balance": null,
"bidResTotalCounter": null,
"bidResDailyCounter": null,
"winsTotalCounter": null,
"winsDailyCounter": null,
"impressionsTotalCounter": null,
"impressionsDailyCounter": null,
"clicksTotalCounter": null,
"clicksDailyCounter": null,
"spentDailyLimit": "819",
"spentDailyCounter": null,
"spentTotalLimit": "9405",
"spentTotalCounter": null,
"impressionsDailyLimit": "486035",
"impressionsTotalLimit": "800000",
"campaigns": [
{
"id": 1,
"userId": 5,
"isActive": true,
"isRunning": false,
"type": "audio",
"name": "Harum.",
"isRewarded": false,
"isDesktopWeb": false,
"isMobileApp": false,
"isMobileWeb": false,
"isSmartphone": false,
"isTablet": false,
"isCTV": false,
"isDOOH": false,
"aDomain": "bradtke.com",
"dateStart": "2023-04-10",
"dateEnd": "2025-11-17",
"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": 468,
"spentTotalLimit": 1450,
"impressionsDailyLimit": 278134,
"impressionsTotalLimit": 400000,
"clicksDailyLimit": 0,
"clicksTotalLimit": 0,
"budgetUse": "fast",
"allSources": true,
"cpm": 0,
"adaptiveCpm": false,
"useCpm": false,
"googleAnalyticsTrackingCode": null,
"dynamicTargeting": [],
"subscriptionAge": [],
"frequencyType": "user",
"frequency": 0,
"frequencyCap": 1,
"frequencyPeriod": 1,
"extendedStatus": "Low Balance",
"createdAt": "2025-02-06",
"updatedAt": "2025-02-06",
"deletedAt": null,
"counters": {
"spentDailyCounter": 0,
"spentTotalCounter": 0,
"bidResTotalCounter": 0,
"bidResDailyCounter": 0,
"conversionTotalCounter": 0,
"conversionDailyCounter": 0,
"winsTotalCounter": 0,
"winsDailyCounter": 0,
"clicksTotalCounter": null,
"clicksDailyCounter": null,
"impressionsTotalCounter": 0,
"impressionsDailyCounter": 0,
"winRate": 0
},
"pretarget": null,
"pretargets": [],
"audiences": []
},
{
"id": 2,
"userId": 5,
"isActive": false,
"isRunning": false,
"type": "banner",
"name": "Quo.",
"isRewarded": false,
"isDesktopWeb": true,
"isMobileApp": true,
"isMobileWeb": true,
"isSmartphone": false,
"isTablet": true,
"isCTV": true,
"isDOOH": true,
"aDomain": "howell.com",
"dateStart": "2024-03-05",
"dateEnd": "2025-07-17",
"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": 351,
"spentTotalLimit": 7955,
"impressionsDailyLimit": 207901,
"impressionsTotalLimit": 400000,
"clicksDailyLimit": 0,
"clicksTotalLimit": 0,
"budgetUse": "fast",
"allSources": true,
"cpm": 0,
"adaptiveCpm": false,
"useCpm": false,
"googleAnalyticsTrackingCode": null,
"dynamicTargeting": [],
"subscriptionAge": [],
"frequencyType": "user",
"frequency": 0,
"frequencyCap": 1,
"frequencyPeriod": 1,
"extendedStatus": "Campaign is not active",
"createdAt": "2025-02-06",
"updatedAt": "2025-02-06",
"deletedAt": null,
"counters": {
"spentDailyCounter": 0,
"spentTotalCounter": 0,
"bidResTotalCounter": 0,
"bidResDailyCounter": 0,
"conversionTotalCounter": 0,
"conversionDailyCounter": 0,
"winsTotalCounter": 0,
"winsDailyCounter": 0,
"clicksTotalCounter": null,
"clicksDailyCounter": null,
"impressionsTotalCounter": 0,
"impressionsDailyCounter": 0,
"winRate": 0
},
"pretarget": null,
"pretargets": [],
"audiences": []
}
]
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 15,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
4. Campaigns
4.1. Campaigns list
A `GET` request will return a list of an campaigns.
4.1.1. HTTP Request
URL
GET api/campaigns HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDEsImV4cCI6MTczODg0MTE0MSwibmJmIjoxNzM4ODM3NTQxLCJqdGkiOiIweThBWnZiZ2ZMblhNcGlvIiwic3ViIjoiOSIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.bWZyYMIrYpN8rTwi32lQ4hs93JcrpV9iSqQO8iKLLSc
DATA
{}
4.1.2. Curl request
$ curl 'https://dsp-api.smartyads.com/api/campaigns' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDEsImV4cCI6MTczODg0MTE0MSwibmJmIjoxNzM4ODM3NTQxLCJqdGkiOiIweThBWnZiZ2ZMblhNcGlvIiwic3ViIjoiOSIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.bWZyYMIrYpN8rTwi32lQ4hs93JcrpV9iSqQO8iKLLSc' \
-d '{}'
4.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 |
4.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": 3,
"userId": 9,
"isActive": false,
"isRunning": false,
"type": "native",
"name": "Illum.",
"isRewarded": false,
"isDesktopWeb": false,
"isMobileApp": true,
"isMobileWeb": false,
"isSmartphone": false,
"isTablet": true,
"isCTV": true,
"isDOOH": false,
"aDomain": "considine.com",
"dateStart": "2023-02-17",
"dateEnd": "2025-03-08",
"geoCountries": [],
"geoCountriesIsInclude": true,
"geoRegions": [],
"geoRegionsIsInclude": true,
"geoCities": [],
"geoCitiesIsInclude": true,
"contentCategories": [],
"contentCategoriesIsInclude": true,
"userAgeMin": 0,
"userAgeMax": 0,
"connectionTypes": [
"wifi"
],
"clickedInventoryCategories": [],
"deviceCarrier": [],
"deviceCarrierIsInclude": true,
"OS": [],
"OSIsInclude": true,
"browser": [],
"browserIsInclude": true,
"deviceLanguage": [],
"deviceLanguageIsInclude": true,
"spentDailyLimit": 324,
"spentTotalLimit": 1042,
"impressionsDailyLimit": 241063,
"impressionsTotalLimit": 400000,
"clicksDailyLimit": 0,
"clicksTotalLimit": 0,
"budgetUse": "fast",
"allSources": true,
"cpm": 0,
"adaptiveCpm": false,
"useCpm": false,
"extendedStatus": "Campaign is not active",
"createdAt": "2025-02-06",
"updatedAt": "2025-02-06",
"deletedAt": null
},
{
"id": 4,
"userId": 9,
"isActive": false,
"isRunning": false,
"type": "video",
"name": "Ullam.",
"isRewarded": false,
"isDesktopWeb": true,
"isMobileApp": false,
"isMobileWeb": false,
"isSmartphone": false,
"isTablet": false,
"isCTV": false,
"isDOOH": false,
"aDomain": "buckridge.net",
"dateStart": "2024-01-30",
"dateEnd": "2025-04-01",
"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": 371,
"spentTotalLimit": 4970,
"impressionsDailyLimit": 261816,
"impressionsTotalLimit": 400000,
"clicksDailyLimit": 0,
"clicksTotalLimit": 0,
"budgetUse": "fast",
"allSources": true,
"cpm": 0,
"adaptiveCpm": false,
"useCpm": false,
"extendedStatus": "Campaign is not active",
"createdAt": "2025-02-06",
"updatedAt": "2025-02-06",
"deletedAt": null
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 15,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
4.2. Get by ID
A `GET` request with a path parameter of the id will return the campaign with that id.
4.2.1. HTTP Request
URL
GET api/campaigns/5 HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDEsImV4cCI6MTczODg0MTE0MSwibmJmIjoxNzM4ODM3NTQxLCJqdGkiOiIxcEhvUHkwa0lZdlRnMmlHIiwic3ViIjoiMTAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.rw1m2sg773OgmXBSFFolTaKXnVwfRDOevgUOeF1ZFnY
DATA
{}
4.2.2. Curl request
$ curl 'https://dsp-api.smartyads.com/api/campaigns/5' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDEsImV4cCI6MTczODg0MTE0MSwibmJmIjoxNzM4ODM3NTQxLCJqdGkiOiIxcEhvUHkwa0lZdlRnMmlHIiwic3ViIjoiMTAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.rw1m2sg773OgmXBSFFolTaKXnVwfRDOevgUOeF1ZFnY' \
-d '{}'
4.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.cpm |
float |
cpm |
data.adaptiveCpm |
boolean |
adaptiveCpm |
data.useCpm |
boolean |
use cpm |
data.googleAnalyticsTrackingCode |
string |
Google Analytics tracking code - PUSH Campaigns |
data.dynamicTargeting |
array |
SmartCPC: Dynamic targeting - only for CPC Pricing model |
data.subscriptionAge |
array |
Subscription Age - only for CPC Pricing model |
data.frequencyType |
string |
Frequency Type (user, ip).Required if frequency is on. |
data.frequency |
boolean |
Frequency on/off. |
data.frequencyCap |
integer |
Show ads no more than "Frequency Cap" times in "Frequency Period".Required if frequency is on. |
data.frequencyPeriod |
integer |
Frequency Period (min-1,max-3). Required if frequency is on. |
data.extendedStatus |
string |
Campaign extended status |
data.createdAt |
datetime |
Date of creation |
data.updatedAt |
datetime |
Date of last modification |
data.deletedAt |
datetime |
Date of deletion |
data.pretarget |
int |
pretarget |
data.pretargets |
array |
pretargets |
data.audiences |
array |
audiences |
4.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": 10,
"isActive": false,
"isRunning": false,
"type": "banner",
"name": "Test Campaign #1",
"isRewarded": false,
"isDesktopWeb": false,
"isMobileApp": false,
"isMobileWeb": false,
"isSmartphone": false,
"isTablet": false,
"isCTV": false,
"isDOOH": false,
"aDomain": "johns.biz",
"dateStart": "2024-03-24",
"dateEnd": "2025-05-09",
"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": 267,
"spentTotalLimit": 8550,
"impressionsDailyLimit": 221264,
"impressionsTotalLimit": 400000,
"clicksDailyLimit": 0,
"clicksTotalLimit": 0,
"budgetUse": "fast",
"allSources": true,
"cpm": 0,
"adaptiveCpm": false,
"useCpm": false,
"googleAnalyticsTrackingCode": null,
"dynamicTargeting": [],
"subscriptionAge": [],
"frequencyType": "user",
"frequency": 0,
"frequencyCap": 1,
"frequencyPeriod": 1,
"extendedStatus": "Campaign is not active",
"createdAt": "2025-02-06",
"updatedAt": "2025-02-06",
"deletedAt": null,
"pretarget": null,
"pretargets": [],
"audiences": []
}
}
4.3. Create a Custom Banner/Native/Video/Audio Campaigns
A `POST` request will create new campaign.
4.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 |
4.3.2. HTTP Request
URL
POST api/campaigns HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDEsImV4cCI6MTczODg0MTE0MSwibmJmIjoxNzM4ODM3NTQxLCJqdGkiOiJ4bGNDZ1hNQk5mWEhBWG9kIiwic3ViIjoiMTEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.P8er__zKAo2fNg2YK67uFbc9IEZlGD3gYI1k7SVaUX8
DATA
{ "type": "banner", "name": "New Campaign #2", "aDomain": "predovic.com", "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-08-22", "dateEnd": "2025-06-05" }
4.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDEsImV4cCI6MTczODg0MTE0MSwibmJmIjoxNzM4ODM3NTQxLCJqdGkiOiJ4bGNDZ1hNQk5mWEhBWG9kIiwic3ViIjoiMTEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.P8er__zKAo2fNg2YK67uFbc9IEZlGD3gYI1k7SVaUX8' \
-d '{
"type": "banner",
"name": "New Campaign #2",
"aDomain": "predovic.com",
"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-08-22",
"dateEnd": "2025-06-05"
}'
4.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.cpm |
float |
cpm |
data.adaptiveCpm |
boolean |
adaptiveCpm |
data.useCpm |
boolean |
use cpm |
data.googleAnalyticsTrackingCode |
string |
Google Analytics tracking code - PUSH Campaigns |
data.dynamicTargeting |
array |
SmartCPC: Dynamic targeting - only for CPC Pricing model |
data.subscriptionAge |
array |
Subscription Age - only for CPC Pricing model |
data.frequencyType |
string |
Frequency Type (user, ip).Required if frequency is on. |
data.frequency |
boolean |
Frequency on/off. |
data.frequencyCap |
integer |
Show ads no more than "Frequency Cap" times in "Frequency Period".Required if frequency is on. |
data.frequencyPeriod |
integer |
Frequency Period (min-1,max-3). Required if frequency is on. |
data.extendedStatus |
string |
Campaign extended status |
data.createdAt |
datetime |
Date of creation |
data.updatedAt |
datetime |
Date of last modification |
data.deletedAt |
datetime |
Date of deletion |
data.pretarget |
int |
pretarget |
data.pretargets |
array |
pretargets |
data.audiences |
array |
audiences |
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
{
"data": {
"id": 6,
"userId": 11,
"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": "predovic.com",
"dateStart": "2023-08-22",
"dateEnd": "2025-06-05",
"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,
"cpm": null,
"adaptiveCpm": null,
"useCpm": null,
"googleAnalyticsTrackingCode": null,
"dynamicTargeting": [],
"subscriptionAge": [],
"frequencyType": null,
"frequency": null,
"frequencyCap": 0,
"frequencyPeriod": 0,
"extendedStatus": "Campaign is not active",
"createdAt": "2025-02-06",
"updatedAt": "2025-02-06",
"deletedAt": null,
"pretarget": null,
"pretargets": [],
"audiences": []
}
}
4.4. Update a Custom Campaign
A `PATCH` request will update campaign.
4.4.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
name |
string |
Campaign name |
4.4.2. HTTP Request
URL
PATCH api/campaigns/7 HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDEsImV4cCI6MTczODg0MTE0MSwibmJmIjoxNzM4ODM3NTQxLCJqdGkiOiJTWUtIWWlibEp6ZEw4aTBiIiwic3ViIjoiMTIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.XDCbfTe6hVvtSGPaxTwAjt3kYwC_mcEK8__rXiEt3TE
DATA
{ "name": "Updated Campaign #3" }
4.4.3. Curl request
$ curl 'https://dsp-api.smartyads.com/api/campaigns/7' -i -X PATCH \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDEsImV4cCI6MTczODg0MTE0MSwibmJmIjoxNzM4ODM3NTQxLCJqdGkiOiJTWUtIWWlibEp6ZEw4aTBiIiwic3ViIjoiMTIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.XDCbfTe6hVvtSGPaxTwAjt3kYwC_mcEK8__rXiEt3TE' \
-d '{
"name": "Updated Campaign #3"
}'
4.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.cpm |
float |
cpm |
data.adaptiveCpm |
boolean |
adaptiveCpm |
data.useCpm |
boolean |
use cpm |
data.googleAnalyticsTrackingCode |
string |
Google Analytics tracking code - PUSH Campaigns |
data.dynamicTargeting |
array |
SmartCPC: Dynamic targeting - only for CPC Pricing model |
data.subscriptionAge |
array |
Subscription Age - only for CPC Pricing model |
data.frequencyType |
string |
Frequency Type (user, ip).Required if frequency is on. |
data.frequency |
boolean |
Frequency on/off. |
data.frequencyCap |
integer |
Show ads no more than "Frequency Cap" times in "Frequency Period".Required if frequency is on. |
data.frequencyPeriod |
integer |
Frequency Period (min-1,max-3). Required if frequency is on. |
data.extendedStatus |
string |
Campaign extended status |
data.createdAt |
datetime |
Date of creation |
data.updatedAt |
datetime |
Date of last modification |
data.deletedAt |
datetime |
Date of deletion |
data.pretarget |
int |
pretarget |
data.pretargets |
array |
pretargets |
data.audiences |
array |
audiences |
4.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": 12,
"isActive": true,
"isRunning": false,
"type": "audio",
"name": "Updated Campaign #3",
"isRewarded": false,
"isDesktopWeb": false,
"isMobileApp": false,
"isMobileWeb": true,
"isSmartphone": true,
"isTablet": true,
"isCTV": false,
"isDOOH": true,
"aDomain": "powlowski.biz",
"dateStart": "2025-01-08",
"dateEnd": "2025-04-16",
"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": 189,
"spentTotalLimit": 5091,
"impressionsDailyLimit": 286167,
"impressionsTotalLimit": 400000,
"clicksDailyLimit": 0,
"clicksTotalLimit": 0,
"budgetUse": "fast",
"allSources": true,
"cpm": 0,
"adaptiveCpm": false,
"useCpm": false,
"googleAnalyticsTrackingCode": null,
"dynamicTargeting": [],
"subscriptionAge": [],
"frequencyType": "user",
"frequency": 0,
"frequencyCap": 1,
"frequencyPeriod": 1,
"extendedStatus": "Low Balance",
"createdAt": "2025-02-06",
"updatedAt": "2025-02-06",
"deletedAt": null,
"pretarget": null,
"pretargets": [],
"audiences": []
}
}
4.5. Delete a Custom Campaign
A `DELETE` request will delete campaign.
4.5.1. HTTP Request
URL
DELETE api/campaigns/8 HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDEsImV4cCI6MTczODg0MTE0MSwibmJmIjoxNzM4ODM3NTQxLCJqdGkiOiJNdU43V0FZQVBPQUt2Q2ZsIiwic3ViIjoiMTMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.kKkOPZiOLeXaw44Uf1RHyrxU0Kr8IEtNCCgZo50j2X0 Content-type: application/x-www-form-urlencoded
DATA
{}
4.5.2. Curl request
$ curl 'https://dsp-api.smartyads.com/api/campaigns/8' -i -X DELETE \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDEsImV4cCI6MTczODg0MTE0MSwibmJmIjoxNzM4ODM3NTQxLCJqdGkiOiJNdU43V0FZQVBPQUt2Q2ZsIiwic3ViIjoiMTMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.kKkOPZiOLeXaw44Uf1RHyrxU0Kr8IEtNCCgZo50j2X0' \
-H 'Content-type: application/x-www-form-urlencoded' \
-d '{}'
4.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
{}
5. Upload media
5.1. Store Image
A `POST` request will upload image
5.1.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
media_assets |
file |
Array of files to upload |
+ |
5.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDUsImV4cCI6MTczODg0MTE0NSwibmJmIjoxNzM4ODM3NTQ1LCJqdGkiOiJZbXp5MVJ4eEJ5RGZIWG04Iiwic3ViIjoiNDIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.hiqb6C_Tr6puF3is9RURLLq-JfpjMDUqxPD-_HWco_4
DATA
{ "media_assets": [ <Binary file> ] }
5.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDUsImV4cCI6MTczODg0MTE0NSwibmJmIjoxNzM4ODM3NTQ1LCJqdGkiOiJZbXp5MVJ4eEJ5RGZIWG04Iiwic3ViIjoiNDIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.hiqb6C_Tr6puF3is9RURLLq-JfpjMDUqxPD-_HWco_4' \
-d '{
"media_assets": [
<Binary file>
]
}'
5.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 |
5.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": 42,
"mediaType": "image",
"originName": "test-image.png",
"name": "test-image.png",
"extension": "png",
"url": "\/storage\/test-image.png",
"width": 10,
"height": 10,
"weight": 91,
"createdAt": "2025-02-06 10:25:45",
"updatedAt": "2025-02-06 10:25:45"
}
]
}
5.2. Store video
A `POST` request will upload video
5.2.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
media_assets |
file |
Array of files to upload |
+ |
5.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDUsImV4cCI6MTczODg0MTE0NSwibmJmIjoxNzM4ODM3NTQ1LCJqdGkiOiJsMWRuMUgyb3REWUhHRnRXIiwic3ViIjoiNDMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.GOdok4SfXx0rb25RaeCrZcIr4814i8E0aapzWkSNb6U
DATA
{ "media_assets": [ <Binary file> ] }
5.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDUsImV4cCI6MTczODg0MTE0NSwibmJmIjoxNzM4ODM3NTQ1LCJqdGkiOiJsMWRuMUgyb3REWUhHRnRXIiwic3ViIjoiNDMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.GOdok4SfXx0rb25RaeCrZcIr4814i8E0aapzWkSNb6U' \
-d '{
"media_assets": [
<Binary file>
]
}'
5.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 |
5.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": 43,
"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": "2025-02-06 10:25:45",
"updatedAt": "2025-02-06 10:25:45"
}
]
}
5.3. Store HTML
A `POST` request will upload HTML
5.3.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
media_assets |
file |
Array of files to upload |
+ |
5.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDUsImV4cCI6MTczODg0MTE0NSwibmJmIjoxNzM4ODM3NTQ1LCJqdGkiOiJ4SjYwSzcwUWFuUUhVc3VoIiwic3ViIjoiNDQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.g6t4gMIiYUo9FZbvrFUQbU-3ZaWMANwBJWHfY_D6Dms
DATA
{ "media_assets": [ <Binary file> ] }
5.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDUsImV4cCI6MTczODg0MTE0NSwibmJmIjoxNzM4ODM3NTQ1LCJqdGkiOiJ4SjYwSzcwUWFuUUhVc3VoIiwic3ViIjoiNDQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.g6t4gMIiYUo9FZbvrFUQbU-3ZaWMANwBJWHfY_D6Dms' \
-d '{
"media_assets": [
<Binary file>
]
}'
5.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 |
5.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": 44,
"mediaType": "html",
"originName": "test-html.zip",
"name": "TEST\/index.html",
"extension": "zip",
"url": "\/storage\/TEST\/index.html",
"width": 0,
"height": 0,
"weight": 0,
"createdAt": "2025-02-06 10:25:45",
"updatedAt": "2025-02-06 10:25:45"
}
]
}
5.4. Store filter list
A `POST` request will upload video
5.4.1. HTTP Request
URL
POST api/parsefile HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDUsImV4cCI6MTczODg0MTE0NSwibmJmIjoxNzM4ODM3NTQ1LCJqdGkiOiI5eDBqRnoxTmR0dVZha1pqIiwic3ViIjoiNDUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.b2KoK-6rf8aA-SIdVDSHppsq6cGH2n4kWDxk1CYiEHs
DATA
{ "file": <Binary file> }
5.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDUsImV4cCI6MTczODg0MTE0NSwibmJmIjoxNzM4ODM3NTQ1LCJqdGkiOiI5eDBqRnoxTmR0dVZha1pqIiwic3ViIjoiNDUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.b2KoK-6rf8aA-SIdVDSHppsq6cGH2n4kWDxk1CYiEHs' \
-d '{
"file": <Binary file>
}'
5.4.3. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
items |
array |
List array items |
fileName |
string |
File name |
countItems |
integer |
Count items |
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
{
"message": "success",
"items": [
"test.com"
],
"fileName": "1738837545_test-filter.csv",
"countItems": 0
}
6. Creatives
6.1. Creatives list
A `GET` request will return a list of an creatives.
6.1.1. HTTP Request
URL
GET api/creatives HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiJjbGhWNWZtYnZJYzFWUjZnIiwic3ViIjoiMjUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.Cx_QM7_LczIFZUbabNNonHntKB8Ddtb8SCPpH0dL15Y
DATA
{}
6.1.2. Curl request
$ curl 'https://dsp-api.smartyads.com/api/creatives' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiJjbGhWNWZtYnZJYzFWUjZnIiwic3ViIjoiMjUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.Cx_QM7_LczIFZUbabNNonHntKB8Ddtb8SCPpH0dL15Y' \
-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 |
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.*.status |
string |
Status |
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) |
data.*.relation.video.autoStoreEndCard |
boolean |
autoStoreEndCard |
data.*.relation.video.autoStoreEndCardOption |
string |
autoStoreEndCardOption |
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": 8,
"userId": 25,
"isActive": 0,
"approved": "pending",
"creativeType": "banner",
"name": "Banner creative #1",
"frequencyType": "user",
"frequency": 0,
"frequencyCap": 8,
"frequencyPeriod": 1,
"bidPrice": "12.63",
"autoresize": 0,
"adaptiveCpm": false,
"size": "465 x 402",
"weight": "0.19 MB",
"folderId": null,
"createdAt": "2025-02-06 00:00:00",
"updatedAt": "2025-02-06 10:25:42",
"pendingAt": null,
"deletedAt": null,
"media": {
"id": 8,
"userId": 25,
"mediaType": "image",
"originName": "image.jpg",
"name": "25_074ea9aa22e8091c0bacfc0bc13b6c42.jpg",
"extension": "jpg",
"url": "http:\/\/www.beatty.biz\/necessitatibus-aliquam-velit-nesciunt-rerum-sed-ipsa-omnis-eos.html25_074ea9aa22e8091c0bacfc0bc13b6c42.jpg",
"width": 133,
"height": 415,
"weight": 195153
},
"relation": {
"banner": {
"apiFramework": 0,
"admBody": "<a target=\"_blank\" href=\"http:\/\/www.runolfsson.net\/aut-dicta-sapiente-dolor.html\" ><img src=\"http:\/\/gusikowski.com\/quas-inventore-rem-reiciendis-voluptas-natus-ullam.html\/10.jpg\"\/><\/a>",
"bannerType": "banner",
"clickUrl": "http:\/\/littel.net\/reiciendis-et-ipsa-saepe-nihil-aliquid-laboriosam",
"width": 465,
"height": 402,
"childrenCreative": null,
"statusChildrenCreative": [],
"main": 1
}
},
"status": "pending"
},
{
"id": 9,
"userId": 25,
"isActive": 0,
"approved": "pending",
"creativeType": "native",
"name": "Native creative #1",
"frequencyType": "user",
"frequency": 0,
"frequencyCap": 4,
"frequencyPeriod": 1,
"bidPrice": "16.29",
"autoresize": 0,
"adaptiveCpm": false,
"size": "115 x 346",
"weight": "0.00 MB",
"folderId": null,
"createdAt": "2025-02-06 00:00:00",
"updatedAt": "2025-02-06 10:25:42",
"pendingAt": null,
"deletedAt": null,
"media": {
"id": 9,
"userId": 25,
"mediaType": "image",
"originName": "image.jpg",
"name": "25_074ea9aa22e8091c0bacfc0bc13b6c42.jpg",
"extension": "jpg",
"url": "http:\/\/www.lueilwitz.com\/et-vel-non-consequatur-sed-exercitationem25_074ea9aa22e8091c0bacfc0bc13b6c42.jpg",
"width": 495,
"height": 278,
"weight": 377200
},
"relation": {
"native": {
"smallImageId": 9,
"largeImageId": 10,
"smallImage": {
"id": 9,
"folderId": null,
"userId": 25,
"width": 495,
"height": 278,
"name": "25_074ea9aa22e8091c0bacfc0bc13b6c42.jpg",
"url": "http:\/\/www.lueilwitz.com\/et-vel-non-consequatur-sed-exercitationem25_074ea9aa22e8091c0bacfc0bc13b6c42.jpg",
"href": null,
"originName": "image.jpg",
"path": null,
"extension": "jpg",
"mediaType": "image",
"createdAt": "2025-02-06T10:25:42.000000Z",
"updatedAt": "2025-02-06T10:25:42.000000Z",
"deletedAt": null,
"weight": 377200
},
"largeImage": {
"id": 10,
"folderId": null,
"userId": 25,
"width": 115,
"height": 346,
"name": "25_074ea9aa22e8091c0bacfc0bc13b6c42.jpg",
"url": "http:\/\/mosciski.com\/quos-pariatur-cupiditate-nihil-necessitatibus25_074ea9aa22e8091c0bacfc0bc13b6c42.jpg",
"href": null,
"originName": "image.jpg",
"path": null,
"extension": "jpg",
"mediaType": "image",
"createdAt": "2025-02-06T10:25:42.000000Z",
"updatedAt": "2025-02-06T10:25:42.000000Z",
"deletedAt": null,
"weight": 247899
},
"assetDataDesc": "Ad eos saepe suscipit.",
"assetTitle": "Ut nam iusto quod rerum.",
"assetDataSponsored": "Omnis magnam non et dolore unde.",
"assetCtaText": "Culpa hic fugiat est.",
"clickUrl": "http:\/\/ratke.com\/praesentium-quidem-eius-qui-autem-non.html",
"displayUrl": "https:\/\/www.vonrueden.com\/iusto-in-dolore-sit",
"impTracker": null
}
},
"status": "pending"
},
{
"id": 10,
"userId": 25,
"isActive": 0,
"approved": "pending",
"creativeType": "video",
"name": "Video creative #1",
"frequencyType": "ip",
"frequency": 0,
"frequencyCap": 0,
"frequencyPeriod": 1,
"bidPrice": "9.57",
"autoresize": 0,
"adaptiveCpm": false,
"size": "551 x 321",
"weight": "0.21 MB",
"folderId": null,
"createdAt": "2025-02-06 00:00:00",
"updatedAt": "2025-02-06 10:25:42",
"pendingAt": null,
"deletedAt": null,
"media": {
"id": 11,
"userId": 25,
"mediaType": "video",
"originName": "video.mp4",
"name": "25_074ea9aa22e8091c0bacfc0bc13b6c42.mp4",
"extension": "mp4",
"url": "https:\/\/www.gibson.org\/autem-rerum-unde-iste-suscipit-ipsum-porro-et25_074ea9aa22e8091c0bacfc0bc13b6c42.mp4",
"width": 140,
"height": 270,
"weight": 218118
},
"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": [
"video\/x-ms-wmv"
],
"width": 551,
"height": 321,
"duration": 5,
"clickUrl": "http:\/\/glover.com\/",
"partyTagFormat": 0,
"autoStoreEndCard": 0,
"autoStoreEndCardOption": "appStore"
}
},
"status": "pending"
}
],
"meta": {
"pagination": {
"total": 3,
"count": 3,
"per_page": 15,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
6.2. Get by ID (Banner creative)
A `GET` request with a path parameter of the id will return the creative with that id.
6.2.1. HTTP Request
URL
GET api/creatives/11 HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiJXTnI4ZEdBUUF4cmpVdm1lIiwic3ViIjoiMjYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.YFaTELUCOwYEklXA5GUPmBa4xg0LesrYIcJ42HJSWyQ
DATA
{}
6.2.2. Curl request
$ curl 'https://dsp-api.smartyads.com/api/creatives/11' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiJXTnI4ZEdBUUF4cmpVdm1lIiwic3ViIjoiMjYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.YFaTELUCOwYEklXA5GUPmBa4xg0LesrYIcJ42HJSWyQ' \
-d '{}'
6.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 |
data.sizes |
string |
size |
6.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": 26,
"isActive": 1,
"approved": "pending",
"creativeType": "banner",
"name": "Banner creative #2",
"frequencyType": "ip",
"frequency": 0,
"frequencyCap": 3,
"frequencyPeriod": 1,
"bidPrice": "1.50",
"autoresize": 0,
"adaptiveCpm": false,
"size": "696 x 347",
"weight": "0.29 MB",
"folderId": null,
"createdAt": "2025-02-06 00:00:00",
"updatedAt": "2025-02-06 10:25:42",
"pendingAt": null,
"deletedAt": null,
"relation": {
"banner": {
"apiFramework": 0,
"admBody": "<a target=\"_blank\" href=\"http:\/\/www.stracke.info\/tenetur-et-nisi-consequatur.html\" ><img src=\"http:\/\/www.fadel.com\/\/10.jpg\"\/><\/a>",
"bannerType": "banner",
"clickUrl": "https:\/\/www.medhurst.org\/quam-consequatur-dicta-voluptas-voluptas",
"width": 696,
"height": 347
}
},
"sizes": []
}
}
6.3. Get by ID (Native creative)
A `GET` request with a path parameter of the id will return the creative with that id.
6.3.1. HTTP Request
URL
GET api/creatives/12 HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiJHY0FoWHpKRUtoMzY4cWpYIiwic3ViIjoiMjciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.1U6iJI8ShJ7bgNXf5wqdJyXl4GWgbU5resPB6Pq9PL4
DATA
{}
6.3.2. Curl request
$ curl 'https://dsp-api.smartyads.com/api/creatives/12' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiJHY0FoWHpKRUtoMzY4cWpYIiwic3ViIjoiMjciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.1U6iJI8ShJ7bgNXf5wqdJyXl4GWgbU5resPB6Pq9PL4' \
-d '{}'
6.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 |
data.sizes |
string |
size |
6.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": 27,
"isActive": 0,
"approved": "pending",
"creativeType": "native",
"name": "Native creative #2",
"frequencyType": "user",
"frequency": 0,
"frequencyCap": 6,
"frequencyPeriod": 1,
"bidPrice": "3.31",
"autoresize": 0,
"adaptiveCpm": false,
"size": "436 x 435",
"weight": "0.00 MB",
"folderId": null,
"createdAt": "2025-02-06 00:00:00",
"updatedAt": "2025-02-06 10:25:42",
"pendingAt": null,
"deletedAt": null,
"relation": {
"native": {
"smallImageId": 13,
"largeImageId": 14,
"smallImage": {
"id": 13,
"folderId": null,
"userId": 27,
"width": 348,
"height": 328,
"name": "27_074ea9aa22e8091c0bacfc0bc13b6c42.jpg",
"url": "https:\/\/sawayn.com\/qui-voluptatem-quia-consectetur-consequatur-fuga-quibusdam-explicabo-itaque.html27_074ea9aa22e8091c0bacfc0bc13b6c42.jpg",
"href": null,
"originName": "image.jpg",
"path": null,
"extension": "jpg",
"mediaType": "image",
"createdAt": "2025-02-06T10:25:42.000000Z",
"updatedAt": "2025-02-06T10:25:42.000000Z",
"deletedAt": null,
"weight": 338293
},
"largeImage": {
"id": 14,
"folderId": null,
"userId": 27,
"width": 436,
"height": 435,
"name": "27_074ea9aa22e8091c0bacfc0bc13b6c42.jpg",
"url": "http:\/\/www.abshire.com\/voluptatem-reiciendis-nostrum-quam-odio-officia-sunt-provident.html27_074ea9aa22e8091c0bacfc0bc13b6c42.jpg",
"href": null,
"originName": "image.jpg",
"path": null,
"extension": "jpg",
"mediaType": "image",
"createdAt": "2025-02-06T10:25:42.000000Z",
"updatedAt": "2025-02-06T10:25:42.000000Z",
"deletedAt": null,
"weight": 145367
},
"assetDataDesc": "Qui id ea amet cum cum.",
"assetTitle": "Quia magnam nisi autem.",
"assetDataSponsored": "Illo eum consectetur exercitationem cum.",
"assetCtaText": "Debitis aut iste sequi.",
"clickUrl": "http:\/\/www.kuphal.com\/commodi-pariatur-sapiente-ratione-voluptas-repudiandae-sit.html",
"displayUrl": "http:\/\/www.stoltenberg.com\/dolor-numquam-quaerat-enim-eos",
"impTracker": null
}
},
"sizes": []
}
}
6.4. Get by ID (Video creative)
A `GET` request with a path parameter of the id will return the creative with that id.
6.4.1. HTTP Request
URL
GET api/creatives/13 HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDMsImV4cCI6MTczODg0MTE0MywibmJmIjoxNzM4ODM3NTQzLCJqdGkiOiI5eGZkOU43cGc3VjFoVk5tIiwic3ViIjoiMjgiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.UD7KXguwvVzAcTQg_0ws77BcOcSijC5nPyjwShDevYI
DATA
{}
6.4.2. Curl request
$ curl 'https://dsp-api.smartyads.com/api/creatives/13' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDMsImV4cCI6MTczODg0MTE0MywibmJmIjoxNzM4ODM3NTQzLCJqdGkiOiI5eGZkOU43cGc3VjFoVk5tIiwic3ViIjoiMjgiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.UD7KXguwvVzAcTQg_0ws77BcOcSijC5nPyjwShDevYI' \
-d '{}'
6.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) |
data.relation.video.autoStoreEndCard |
boolean |
autoStoreEndCard |
data.relation.video.autoStoreEndCardOption |
string |
autoStoreEndCardOption |
data.sizes |
string |
size |
6.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": 28,
"isActive": 0,
"approved": "pending",
"creativeType": "video",
"name": "Video creative #2",
"frequencyType": "user",
"frequency": 0,
"frequencyCap": 6,
"frequencyPeriod": 1,
"bidPrice": "9.88",
"autoresize": 0,
"adaptiveCpm": false,
"size": "362 x 399",
"weight": "0.41 MB",
"folderId": null,
"createdAt": "2025-02-06 00:00:00",
"updatedAt": "2025-02-06 10:25:43",
"pendingAt": null,
"deletedAt": null,
"relation": {
"video": {
"sizes": "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\/x-flv"
],
"width": 362,
"height": 399,
"duration": 7,
"clickUrl": "http:\/\/www.leuschke.com\/facere-eos-est-alias-aperiam-et-eius-laudantium",
"partyTagFormat": 0,
"autoStoreEndCard": 0,
"autoStoreEndCardOption": "appStore"
}
},
"sizes": []
}
}
6.5. Create a Custom Banner Creative with Third-party tag
A `POST` request will create new creative.
6.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) |
+ |
6.5.2. HTTP Request
URL
POST api/creatives HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDMsImV4cCI6MTczODg0MTE0MywibmJmIjoxNzM4ODM3NTQzLCJqdGkiOiI2aExyVmUwbXhwbEhnQjRkIiwic3ViIjoiMjkiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.dCwSlHsfmpln-W1pmmoLR1SDDUG3CLjonYw8-O55E1U
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" ] } }
6.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDMsImV4cCI6MTczODg0MTE0MywibmJmIjoxNzM4ODM3NTQzLCJqdGkiOiI2aExyVmUwbXhwbEhnQjRkIiwic3ViIjoiMjkiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.dCwSlHsfmpln-W1pmmoLR1SDDUG3CLjonYw8-O55E1U' \
-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"
]
}
}'
6.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 |
data.sizes |
string |
size |
6.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": 29,
"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": "2025-02-06 00:00:00",
"updatedAt": "2025-02-06 10:25:43",
"pendingAt": null,
"deletedAt": null,
"relation": {
"banner": {
"apiFramework": 0,
"admBody": "<iframe src=\"url.to.script\"><\/iframe>",
"bannerType": null,
"clickUrl": null,
"width": 320,
"height": 200
}
},
"sizes": []
}
}
6.6. Create a Custom Banner Creative with Media image
A `POST` request will create new creative.
6.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) |
+ |
6.6.2. HTTP Request
URL
POST api/creatives HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDMsImV4cCI6MTczODg0MTE0MywibmJmIjoxNzM4ODM3NTQzLCJqdGkiOiJFWGl3SWhFY0h3dlV1cUhBIiwic3ViIjoiMzAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.J6jpgWzxuevF7AN9_wyhuaZwSjyIrbffbvaKXDa0pXY
DATA
{ "name": "Banner creative #4", "creativeType": "banner", "mediaId": 16, "frequency": 0, "bidPrice": 0.5, "banner": { "apiFramework": 0, "width": 320, "height": 200, "clickUrl": "http:\/\/gottlieb.org\/in-rerum-et-non-mollitia-et-debitis-nemo-amet" }, "subCategories": { "IAB1": [ "IAB1-1" ] }, "categories": { "IAB1": true } }
6.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDMsImV4cCI6MTczODg0MTE0MywibmJmIjoxNzM4ODM3NTQzLCJqdGkiOiJFWGl3SWhFY0h3dlV1cUhBIiwic3ViIjoiMzAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.J6jpgWzxuevF7AN9_wyhuaZwSjyIrbffbvaKXDa0pXY' \
-d '{
"name": "Banner creative #4",
"creativeType": "banner",
"mediaId": 16,
"frequency": 0,
"bidPrice": 0.5,
"banner": {
"apiFramework": 0,
"width": 320,
"height": 200,
"clickUrl": "http:\/\/gottlieb.org\/in-rerum-et-non-mollitia-et-debitis-nemo-amet"
},
"subCategories": {
"IAB1": [
"IAB1-1"
]
},
"categories": {
"IAB1": true
}
}'
6.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 |
data.sizes |
string |
size |
6.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": 30,
"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": "188 x 161",
"weight": "0.34 MB",
"folderId": null,
"createdAt": "2025-02-06 00:00:00",
"updatedAt": "2025-02-06 10:25:43",
"pendingAt": null,
"deletedAt": null,
"relation": {
"banner": {
"apiFramework": 0,
"admBody": "<a target=\"_blank\" href=\"http:\/\/gottlieb.org\/in-rerum-et-non-mollitia-et-debitis-nemo-amet\" ><img src=\"https:\/\/bergstrom.com\/rerum-natus-magni-ipsum-dolorem-consequatur-voluptas-magni-quas.html30_72e1be1368e60bbf57f8c4394a95ec91.jpg\"\/><\/a>",
"bannerType": null,
"clickUrl": "http:\/\/gottlieb.org\/in-rerum-et-non-mollitia-et-debitis-nemo-amet",
"width": 188,
"height": 161
}
},
"sizes": []
}
}
6.7. Create a Custom Banner Creative with Rich Media Html
A `POST` request will create new creative.
6.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) |
+ |
6.7.2. HTTP Request
URL
POST api/creatives HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDMsImV4cCI6MTczODg0MTE0MywibmJmIjoxNzM4ODM3NTQzLCJqdGkiOiJodWU1SWhnM2hNdTJVYk00Iiwic3ViIjoiMzEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.Z5B2KrayrWxIH84XRn8DLBgFtJsmW0Qty5Jh4yi0y-o
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 } }
6.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDMsImV4cCI6MTczODg0MTE0MywibmJmIjoxNzM4ODM3NTQzLCJqdGkiOiJodWU1SWhnM2hNdTJVYk00Iiwic3ViIjoiMzEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.Z5B2KrayrWxIH84XRn8DLBgFtJsmW0Qty5Jh4yi0y-o' \
-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
}
}'
6.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 |
data.sizes |
string |
size |
6.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": 31,
"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.37 MB",
"folderId": null,
"createdAt": "2025-02-06 00:00:00",
"updatedAt": "2025-02-06 10:25:43",
"pendingAt": null,
"deletedAt": null,
"relation": {
"banner": {
"apiFramework": 3,
"admBody": "<iframe src=\"http:\/\/marvin.info\/31_72e1be1368e60bbf57f8c4394a95ec91\/index.html\"><\/iframe>",
"bannerType": null,
"clickUrl": null,
"width": 320,
"height": 200
}
},
"sizes": []
}
}
6.8. Create a Custom Native Creative
A `POST` request will create new creative.
6.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) |
+ |
6.8.2. HTTP Request
URL
POST api/creatives HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDMsImV4cCI6MTczODg0MTE0MywibmJmIjoxNzM4ODM3NTQzLCJqdGkiOiJkVjVFZ25KNm5LUldqTUQ2Iiwic3ViIjoiMzIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.P0z1XGm5omAD_pyDwHRgtGhyd8MhEzXNPVEdbsQU1fw
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": "Ex sunt quia.", "assetTitle": "Repellat.", "assetDataSponsored": "Ipsum quo nobis nulla.", "assetCtaText": "Eos.", "clickUrl": "http:\/\/hansen.org\/recusandae-neque-qui-illum-rerum-quis-nostrum.html", "displayUrl": "http:\/\/dooley.net\/cupiditate-esse-voluptatem-id-voluptatem-vitae" }, "subCategories": { "IAB1": [ "IAB1-1" ] }, "categories": { "IAB1": true } }
6.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDMsImV4cCI6MTczODg0MTE0MywibmJmIjoxNzM4ODM3NTQzLCJqdGkiOiJkVjVFZ25KNm5LUldqTUQ2Iiwic3ViIjoiMzIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.P0z1XGm5omAD_pyDwHRgtGhyd8MhEzXNPVEdbsQU1fw' \
-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": "Ex sunt quia.",
"assetTitle": "Repellat.",
"assetDataSponsored": "Ipsum quo nobis nulla.",
"assetCtaText": "Eos.",
"clickUrl": "http:\/\/hansen.org\/recusandae-neque-qui-illum-rerum-quis-nostrum.html",
"displayUrl": "http:\/\/dooley.net\/cupiditate-esse-voluptatem-id-voluptatem-vitae"
},
"subCategories": {
"IAB1": [
"IAB1-1"
]
},
"categories": {
"IAB1": true
}
}'
6.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 |
data.sizes |
string |
size |
6.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": 32,
"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": "288 x 271",
"weight": "0.00 MB",
"folderId": null,
"createdAt": "2025-02-06 00:00:00",
"updatedAt": "2025-02-06 10:25:44",
"pendingAt": null,
"deletedAt": null,
"relation": {
"native": {
"smallImageId": 18,
"largeImageId": 18,
"smallImage": {
"id": 18,
"folderId": null,
"userId": 32,
"width": 288,
"height": 271,
"name": "32_72e1be1368e60bbf57f8c4394a95ec91.jpg",
"url": "https:\/\/www.bergstrom.com\/sunt-inventore-debitis-odio-accusamus-velit-facere-voluptatem32_72e1be1368e60bbf57f8c4394a95ec91.jpg",
"href": null,
"originName": "image.jpg",
"path": null,
"extension": "jpg",
"mediaType": "image",
"createdAt": "2025-02-06T10:25:43.000000Z",
"updatedAt": "2025-02-06T10:25:43.000000Z",
"deletedAt": null,
"weight": 455098
},
"largeImage": {
"id": 18,
"folderId": null,
"userId": 32,
"width": 288,
"height": 271,
"name": "32_72e1be1368e60bbf57f8c4394a95ec91.jpg",
"url": "https:\/\/www.bergstrom.com\/sunt-inventore-debitis-odio-accusamus-velit-facere-voluptatem32_72e1be1368e60bbf57f8c4394a95ec91.jpg",
"href": null,
"originName": "image.jpg",
"path": null,
"extension": "jpg",
"mediaType": "image",
"createdAt": "2025-02-06T10:25:43.000000Z",
"updatedAt": "2025-02-06T10:25:43.000000Z",
"deletedAt": null,
"weight": 455098
},
"assetDataDesc": "Ex sunt quia.",
"assetTitle": "Repellat.",
"assetDataSponsored": "Ipsum quo nobis nulla.",
"assetCtaText": "Eos.",
"clickUrl": "http:\/\/hansen.org\/recusandae-neque-qui-illum-rerum-quis-nostrum.html",
"displayUrl": "http:\/\/dooley.net\/cupiditate-esse-voluptatem-id-voluptatem-vitae",
"impTracker": null
}
},
"sizes": []
}
}
6.9. Create a Custom Video Creative with Third-party tag
A `POST` request will create new creative.
6.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) |
+ |
6.9.2. HTTP Request
URL
POST api/creatives HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDQsImV4cCI6MTczODg0MTE0NCwibmJmIjoxNzM4ODM3NTQ0LCJqdGkiOiIyZm9rY2l5WFU0M25VMTExIiwic3ViIjoiMzMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.zqoqzF5sj_GVopnCLHNp57_kZUPCGDbS-e5Cc_SFlgY
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 } }
6.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDQsImV4cCI6MTczODg0MTE0NCwibmJmIjoxNzM4ODM3NTQ0LCJqdGkiOiIyZm9rY2l5WFU0M25VMTExIiwic3ViIjoiMzMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.zqoqzF5sj_GVopnCLHNp57_kZUPCGDbS-e5Cc_SFlgY' \
-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
}
}'
6.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) |
data.relation.video.autoStoreEndCard |
boolean |
autoStoreEndCard |
data.relation.video.autoStoreEndCardOption |
string |
autoStoreEndCardOption |
data.sizes |
string |
size |
6.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": 33,
"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": "2025-02-06 00:00:00",
"updatedAt": "2025-02-06 10:25:44",
"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,
"autoStoreEndCard": null,
"autoStoreEndCardOption": null
}
},
"sizes": []
}
}
6.10. Create a Custom Video Creative with Media image
A `POST` request will create new creative.
6.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) |
+ |
6.10.2. HTTP Request
URL
POST api/creatives HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDQsImV4cCI6MTczODg0MTE0NCwibmJmIjoxNzM4ODM3NTQ0LCJqdGkiOiJtT0xocmdsMVp5ZURMbW50Iiwic3ViIjoiMzQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.LkPoItLoNrsKMAfjQpaRYyNvztJNEo8_Ft8G9lhGKBA
DATA
{ "name": "Video creative #4", "creativeType": "video", "frequencyType": "user", "frequencyCap": 1, "frequencyPeriod": 1, "frequency": 1, "mediaId": 19, "bidPrice": 100, "video": { "clickUrl": "http:\/\/www.hettinger.biz\/qui-tenetur-consequatur-qui" }, "subCategories": { "IAB1": [ "IAB1-1" ] }, "categories": { "IAB1": true } }
6.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDQsImV4cCI6MTczODg0MTE0NCwibmJmIjoxNzM4ODM3NTQ0LCJqdGkiOiJtT0xocmdsMVp5ZURMbW50Iiwic3ViIjoiMzQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.LkPoItLoNrsKMAfjQpaRYyNvztJNEo8_Ft8G9lhGKBA' \
-d '{
"name": "Video creative #4",
"creativeType": "video",
"frequencyType": "user",
"frequencyCap": 1,
"frequencyPeriod": 1,
"frequency": 1,
"mediaId": 19,
"bidPrice": 100,
"video": {
"clickUrl": "http:\/\/www.hettinger.biz\/qui-tenetur-consequatur-qui"
},
"subCategories": {
"IAB1": [
"IAB1-1"
]
},
"categories": {
"IAB1": true
}
}'
6.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) |
data.relation.video.autoStoreEndCard |
boolean |
autoStoreEndCard |
data.relation.video.autoStoreEndCardOption |
string |
autoStoreEndCardOption |
data.sizes |
string |
size |
6.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": 34,
"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": "251 x 459",
"weight": "0.42 MB",
"folderId": null,
"createdAt": "2025-02-06 00:00:00",
"updatedAt": "2025-02-06 10:25:44",
"pendingAt": null,
"deletedAt": null,
"relation": {
"video": {
"sizes": "small",
"admBody": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<VAST version=\"2.0\">\n<Ad id=\"[HASH]\">\n <InLine>\n <AdSystem>DSP<\/AdSystem>\n <AdTitle>Smartyads<\/AdTitle>\n <Description>RTB<\/Description>\n <Creatives>\n <Creative AdID=\"19\">\n <Linear>\n <Duration>00:00:09<\/Duration>\n <VideoClicks>\n <ClickThrough><![CDATA[http:\/\/www.hettinger.biz\/qui-tenetur-consequatur-qui]]><\/ClickThrough>\n <\/VideoClicks>\n <MediaFiles>\n <MediaFile delivery=\"\" type=\"video\/mp4\" width=\"251\" height=\"459\"><![CDATA[http:\/\/ledner.com\/tenetur-natus-voluptas-quibusdam-commodi-praesentium34_a2dccca29935de9961f25f44c06b0dd3.mp4]]><\/MediaFile>\n <\/MediaFiles>\n <\/Linear>\n <\/Creative>\n <\/Creatives>\n <\/InLine>\n<\/Ad>\n<\/VAST>",
"mimeType": [
"video\/mp4"
],
"width": 251,
"height": 459,
"duration": 9,
"clickUrl": "http:\/\/www.hettinger.biz\/qui-tenetur-consequatur-qui",
"partyTagFormat": null,
"autoStoreEndCard": null,
"autoStoreEndCardOption": null
}
},
"sizes": []
}
}
6.11. Update a Custom Creative
A `PATCH` request will update creative.
6.11.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
isActive |
boolean |
Creative status |
6.11.2. HTTP Request
URL
PUT api/creatives/20 HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDQsImV4cCI6MTczODg0MTE0NCwibmJmIjoxNzM4ODM3NTQ0LCJqdGkiOiJtRDZJb1JMaDRDMjFBU0phIiwic3ViIjoiMzUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.dhyIjlQuFJRVKnGgjZRP3ScVnmiMG1MmchCS61fFDRM
DATA
{ "isActive": true }
6.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDQsImV4cCI6MTczODg0MTE0NCwibmJmIjoxNzM4ODM3NTQ0LCJqdGkiOiJtRDZJb1JMaDRDMjFBU0phIiwic3ViIjoiMzUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.dhyIjlQuFJRVKnGgjZRP3ScVnmiMG1MmchCS61fFDRM' \
-d '{
"isActive": true
}'
6.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 |
data.sizes |
string |
size |
6.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": 35,
"isActive": true,
"approved": "pending",
"creativeType": "banner",
"name": "assumenda similique",
"frequencyType": "ip",
"frequency": 0,
"frequencyCap": 9,
"frequencyPeriod": 1,
"bidPrice": "9.73",
"autoresize": 0,
"adaptiveCpm": false,
"size": " x ",
"weight": "0.00 MB",
"folderId": null,
"createdAt": "2025-02-06 00:00:00",
"updatedAt": "2025-02-06 10:25:44",
"pendingAt": null,
"deletedAt": null,
"relation": {
"banner": {
"apiFramework": null,
"admBody": null,
"bannerType": null,
"clickUrl": null,
"width": null,
"height": null
}
},
"sizes": []
}
}
6.12. Delete a Custom Creative
A `DELETE` request will delete creative.
6.12.1. HTTP Request
URL
DELETE api/creatives/21 HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDQsImV4cCI6MTczODg0MTE0NCwibmJmIjoxNzM4ODM3NTQ0LCJqdGkiOiJsR09jUHdiY01kVVU0RE1vIiwic3ViIjoiMzYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.ebBOx1ZH-iZwxTcJMBd92jNHYloREEWxxKCkzXBXwik Content-type: application/x-www-form-urlencoded
DATA
{}
6.12.2. Curl request
$ curl 'https://dsp-api.smartyads.com/api/creatives/21' -i -X DELETE \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDQsImV4cCI6MTczODg0MTE0NCwibmJmIjoxNzM4ODM3NTQ0LCJqdGkiOiJsR09jUHdiY01kVVU0RE1vIiwic3ViIjoiMzYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.ebBOx1ZH-iZwxTcJMBd92jNHYloREEWxxKCkzXBXwik' \
-H 'Content-type: application/x-www-form-urlencoded' \
-d '{}'
6.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
{}
7. Assign Creatives to Campaigns
7.1. Get list of Creatives assigned to Campaign
A `GET` request with Campaign Id in url will get list of Creatives assigned to Campaign
7.1.1. HTTP Request
URL
GET api/campaigns/12/creatives HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiI0b21SRURFQWRGQkdJZ051Iiwic3ViIjoiMTciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.qimn7RqTpYg_mk_Yb7hniP1ssg2Y9fC3BQ9LjesJxIQ
DATA
{}
7.1.2. Curl request
$ curl 'https://dsp-api.smartyads.com/api/campaigns/12/creatives' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiI0b21SRURFQWRGQkdJZ051Iiwic3ViIjoiMTciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.qimn7RqTpYg_mk_Yb7hniP1ssg2Y9fC3BQ9LjesJxIQ' \
-d '{}'
7.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.*.status |
string |
Status |
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 |
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": 1,
"userId": 17,
"isActive": 1,
"approved": "pending",
"creativeType": "banner",
"name": "Test Creative #1",
"frequencyType": "user",
"frequency": 0,
"frequencyCap": 9,
"frequencyPeriod": 1,
"bidPrice": "18.98",
"autoresize": 0,
"adaptiveCpm": false,
"size": "689 x 168",
"weight": "0.22 MB",
"folderId": null,
"createdAt": "2025-02-06 00:00:00",
"updatedAt": "2025-02-06 10:25:42",
"pendingAt": null,
"deletedAt": null,
"media": {
"id": 1,
"userId": 17,
"mediaType": "image",
"originName": "image.jpg",
"name": "17_074ea9aa22e8091c0bacfc0bc13b6c42.jpg",
"extension": "jpg",
"url": "http:\/\/dach.net\/dolorum-harum-voluptates-neque-autem-libero-quo.html17_074ea9aa22e8091c0bacfc0bc13b6c42.jpg",
"width": 247,
"height": 368,
"weight": 229038
},
"relation": {
"banner": {
"apiFramework": 0,
"admBody": "<a target=\"_blank\" href=\"https:\/\/stamm.com\/et-provident-voluptas-porro-officia-commodi-officiis.html\" ><img src=\"http:\/\/macejkovic.com\/beatae-est-minus-quas-repellat\/10.jpg\"\/><\/a>",
"bannerType": "banner",
"clickUrl": "http:\/\/watsica.com\/voluptatem-consequatur-fuga-dignissimos-veniam-voluptates-sed-expedita",
"width": 689,
"height": 168,
"childrenCreative": null,
"statusChildrenCreative": [],
"main": 1
}
},
"status": ""
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 1000,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
7.2. Replace Creatives assigned to Campaign
A `POST` request with Campaign Id in url will replace Creatives assigned to Campaign
7.2.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
ids |
array |
array of Creative ids |
+ |
7.2.2. HTTP Request
URL
POST api/campaigns/13/creatives HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiJZbFh5TFhpcVB5ek1xaEVQIiwic3ViIjoiMTgiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.qsKBGvkQ0b1bgm8dctJWO3ufr_woQ_v5fzK55vgv4CE
DATA
{ "ids": [ 2, 3 ] }
7.2.3. Curl request
$ curl 'https://dsp-api.smartyads.com/api/campaigns/13/creatives' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiJZbFh5TFhpcVB5ek1xaEVQIiwic3ViIjoiMTgiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.qsKBGvkQ0b1bgm8dctJWO3ufr_woQ_v5fzK55vgv4CE' \
-d '{
"ids": [
2,
3
]
}'
7.2.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
7.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."
}
7.3. Append Creatives assigned to Campaign
A `PATCH` request with Campaign Id in url will append Creatives assigned to Campaign
7.3.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
ids |
array |
array of Creative ids |
+ |
7.3.2. HTTP Request
URL
PATCH api/campaigns/14/creatives HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiJCd3ZCNmxvTENub1diMXRYIiwic3ViIjoiMTkiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.R4tzRncwJ7WjMdYTEt87mRjhhMeIR48rYKW_OjOWqhA
DATA
{ "ids": [ 5 ] }
7.3.3. Curl request
$ curl 'https://dsp-api.smartyads.com/api/campaigns/14/creatives' -i -X PATCH \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiJCd3ZCNmxvTENub1diMXRYIiwic3ViIjoiMTkiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.R4tzRncwJ7WjMdYTEt87mRjhhMeIR48rYKW_OjOWqhA' \
-d '{
"ids": [
5
]
}'
7.3.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
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": "Appended."
}
7.4. Remove Creatives assigned to Campaign
A `DELETE` request with Campaign Id in url will remove Creatives assigned to Campaign
7.4.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
ids |
array |
array of Creative ids |
+ |
7.4.2. HTTP Request
URL
DELETE api/campaigns/15/creatives HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiJoazQ0R2d6QXBaRm5ncklMIiwic3ViIjoiMjAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.6vNuIlUbl0sI5k2fyROQMb5hMpGYx411TTPmCpb8jto Content-type: application/x-www-form-urlencoded
DATA
{ "ids": [ 7 ] }
7.4.3. Curl request
$ curl 'https://dsp-api.smartyads.com/api/campaigns/15/creatives' -i -X DELETE \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiJoazQ0R2d6QXBaRm5ncklMIiwic3ViIjoiMjAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.6vNuIlUbl0sI5k2fyROQMb5hMpGYx411TTPmCpb8jto' \
-H 'Content-type: application/x-www-form-urlencoded' \
-d '{
"ids": [
7
]
}'
7.4.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
deleted |
boolean |
Deleting result |
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": "Deleted.",
"deleted": true
}
8. Filterlists
8.1. Filter lists
A `GET` request will return a filter lists
8.1.1. HTTP Request
URL
GET api/filterlist HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDQsImV4cCI6MTczODg0MTE0NCwibmJmIjoxNzM4ODM3NTQ0LCJqdGkiOiJ5Z1h3ekZUYWo2N21RNHdIIiwic3ViIjoiMzciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.9voaN8z1LQREJyYfPWfvPxAxnlOlzYFKezV7yWbQZok
DATA
{}
8.1.2. Curl request
$ curl 'https://dsp-api.smartyads.com/api/filterlist' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDQsImV4cCI6MTczODg0MTE0NCwibmJmIjoxNzM4ODM3NTQ0LCJqdGkiOiJ5Z1h3ekZUYWo2N21RNHdIIiwic3ViIjoiMzciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.9voaN8z1LQREJyYfPWfvPxAxnlOlzYFKezV7yWbQZok' \
-d '{}'
8.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 |
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": [
{
"id": 10,
"isActive": 0,
"userId": 37,
"title": "Test Filter list #1",
"type": "domain",
"isInclude": "White",
"count": 1,
"createdAt": "2025-02-06",
"updatedAt": "2025-02-06"
},
{
"id": 11,
"isActive": 0,
"userId": 37,
"title": "Test Filter list #2",
"type": "ipAdresses",
"isInclude": "White",
"count": 2,
"createdAt": "2025-02-06",
"updatedAt": "2025-02-06"
},
{
"id": 12,
"isActive": 0,
"userId": 37,
"title": "Test Filter list #3",
"type": "urls",
"isInclude": "White",
"count": 3,
"createdAt": "2025-02-06",
"updatedAt": "2025-02-06"
}
],
"meta": {
"pagination": {
"total": 3,
"count": 3,
"per_page": 15,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
8.2. Get filter lists by ID
A `GET` request will return a filter list by ID
8.2.1. HTTP Request
URL
GET api/filterlist/13 HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDQsImV4cCI6MTczODg0MTE0NCwibmJmIjoxNzM4ODM3NTQ0LCJqdGkiOiJ3ZkpqcjVsMUxnaWJ4a0pOIiwic3ViIjoiMzgiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.bf1JiwbnAm5zklR3T2JAh2ZsTHGSyH0et0ocK2hD6yk
DATA
{}
8.2.2. Curl request
$ curl 'https://dsp-api.smartyads.com/api/filterlist/13' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDQsImV4cCI6MTczODg0MTE0NCwibmJmIjoxNzM4ODM3NTQ0LCJqdGkiOiJ3ZkpqcjVsMUxnaWJ4a0pOIiwic3ViIjoiMzgiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.bf1JiwbnAm5zklR3T2JAh2ZsTHGSyH0et0ocK2hD6yk' \
-d '{}'
8.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 |
8.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": 38,
"isActive": 0,
"title": "Test Filter list #4",
"type": "domain",
"isInclude": true,
"createdAt": "2025-02-06",
"updatedAt": "2025-02-06",
"items": [
"crona.net",
"gislason.com",
"prohaska.net",
"smith.org",
"spinka.com"
],
"listCount": 5
}
}
8.3. Create a filter lists
A `POST` request will set new filter list
8.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 |
8.3.2. HTTP Request
URL
POST api/filterlist HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDUsImV4cCI6MTczODg0MTE0NSwibmJmIjoxNzM4ODM3NTQ1LCJqdGkiOiI0bjBiZ3BtVVZlWkZyQ0NaIiwic3ViIjoiMzkiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.APx4mgezFcfGxlf3CyMHC3fpFRsSIYk2ufmBUKAa_4M
DATA
{ "title": "Test Filter list #5", "type": "ipAdresses", "isInclude": true, "items": [ "247.215.158.65", "163.147.241.175", "35.125.115.192", "144.173.104.175", "209.93.65.38" ], "fileName": null }
8.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDUsImV4cCI6MTczODg0MTE0NSwibmJmIjoxNzM4ODM3NTQ1LCJqdGkiOiI0bjBiZ3BtVVZlWkZyQ0NaIiwic3ViIjoiMzkiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.APx4mgezFcfGxlf3CyMHC3fpFRsSIYk2ufmBUKAa_4M' \
-d '{
"title": "Test Filter list #5",
"type": "ipAdresses",
"isInclude": true,
"items": [
"247.215.158.65",
"163.147.241.175",
"35.125.115.192",
"144.173.104.175",
"209.93.65.38"
],
"fileName": null
}'
8.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 |
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": "FilterList created.",
"data": {
"id": 14,
"userId": 39,
"isActive": null,
"title": "Test Filter list #5",
"type": "ipAdresses",
"isInclude": true,
"createdAt": "2025-02-06",
"updatedAt": "2025-02-06",
"items": [],
"listCount": 0
}
}
8.4. Filter lists update
A `PATCH` request will update filter lists
8.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 |
8.4.2. HTTP Request
URL
PUT api/filterlist/15 HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDUsImV4cCI6MTczODg0MTE0NSwibmJmIjoxNzM4ODM3NTQ1LCJqdGkiOiI1TUxzU2VnSzZWbEZTUTJaIiwic3ViIjoiNDAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.5JKX3-dT_lwhJL72Nds3upgJwGkwfv1haOkaT6FGiRM
DATA
{ "title": "Test FilterList #7", "isInclude": true, "items": [ "https:\/\/www.wisozk.info\/consequatur-et-inventore-inventore-velit-placeat", "http:\/\/www.keebler.org\/expedita-est-ipsam-fugiat-iure-voluptatem-officia-molestiae-enim", "https:\/\/kunde.com\/facilis-harum-consequatur-et-a-eligendi-quia.html" ], "fileName": null }
8.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDUsImV4cCI6MTczODg0MTE0NSwibmJmIjoxNzM4ODM3NTQ1LCJqdGkiOiI1TUxzU2VnSzZWbEZTUTJaIiwic3ViIjoiNDAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.5JKX3-dT_lwhJL72Nds3upgJwGkwfv1haOkaT6FGiRM' \
-d '{
"title": "Test FilterList #7",
"isInclude": true,
"items": [
"https:\/\/www.wisozk.info\/consequatur-et-inventore-inventore-velit-placeat",
"http:\/\/www.keebler.org\/expedita-est-ipsam-fugiat-iure-voluptatem-officia-molestiae-enim",
"https:\/\/kunde.com\/facilis-harum-consequatur-et-a-eligendi-quia.html"
],
"fileName": null
}'
8.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 |
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": "FilterList updated.",
"data": {
"id": 15,
"userId": 40,
"isActive": 0,
"title": "Test FilterList #7",
"type": "urls",
"isInclude": true,
"createdAt": "2025-02-06",
"updatedAt": "2025-02-06",
"items": [
"http:\/\/www.mante.biz\/voluptatem-corrupti-ducimus-sapiente-sed-adipisci",
"https:\/\/collins.com\/consequatur-qui-suscipit-impedit-est.html"
],
"listCount": 2
}
}
8.5. Filter lists delete
A `DELETE` request will delete a filter lists
8.5.1. HTTP Request
URL
DELETE api/filterlist/16 HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDUsImV4cCI6MTczODg0MTE0NSwibmJmIjoxNzM4ODM3NTQ1LCJqdGkiOiJ1amNRTkdaRnFGUHhaUHcyIiwic3ViIjoiNDEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.rq50Ab70txK74esta6Wuy3BLTV_HvnM5O1FS_1mCUco Content-type: application/x-www-form-urlencoded
DATA
{}
8.5.2. Curl request
$ curl 'https://dsp-api.smartyads.com/api/filterlist/16' -i -X DELETE \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDUsImV4cCI6MTczODg0MTE0NSwibmJmIjoxNzM4ODM3NTQ1LCJqdGkiOiJ1amNRTkdaRnFGUHhaUHcyIiwic3ViIjoiNDEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.rq50Ab70txK74esta6Wuy3BLTV_HvnM5O1FS_1mCUco' \
-H 'Content-type: application/x-www-form-urlencoded' \
-d '{}'
8.5.3. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
deleted |
boolean |
is deleted |
8.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
}
9. Assign Filterlists to Campaigns
9.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
9.1.1. HTTP Request
URL
GET api/campaigns/16/filterlists HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiJmRktTVUdNa0dsRnZxZld1Iiwic3ViIjoiMjEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.RUOiSulQvpp2A9DQIMEjNYPhhKZThUoaf-zf62jHHn4
DATA
{}
9.1.2. Curl request
$ curl 'https://dsp-api.smartyads.com/api/campaigns/16/filterlists' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiJmRktTVUdNa0dsRnZxZld1Iiwic3ViIjoiMjEiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.RUOiSulQvpp2A9DQIMEjNYPhhKZThUoaf-zf62jHHn4' \
-d '{}'
9.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 |
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": [
{
"isInclude": true,
"filterList": {
"id": 1,
"isActive": 0,
"userId": 21,
"title": "Test Filter list #1",
"type": "domain",
"isInclude": "White",
"count": 1,
"createdAt": "2025-02-06",
"updatedAt": "2025-02-06"
}
},
{
"isInclude": true,
"filterList": {
"id": 2,
"isActive": 0,
"userId": 21,
"title": "Test Filter list #2",
"type": "ipAdresses",
"isInclude": "White",
"count": 1,
"createdAt": "2025-02-06",
"updatedAt": "2025-02-06"
}
},
{
"isInclude": true,
"filterList": {
"id": 3,
"isActive": 0,
"userId": 21,
"title": "Test Filter list #3",
"type": "urls",
"isInclude": "White",
"count": 1,
"createdAt": "2025-02-06",
"updatedAt": "2025-02-06"
}
}
],
"meta": {
"pagination": {
"total": 3,
"count": 3,
"per_page": 1000,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
9.2. Replace Filter Lists assigned to Campaign
A `POST` request with Campaign Id in url will replace Filter Lists assigned to Campaign
9.2.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
items.*.id |
integer |
Filter list id |
+ |
9.2.2. HTTP Request
URL
POST api/campaigns/17/filterlists HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiJHTXpaOFlKd3JTa1lSVjh5Iiwic3ViIjoiMjIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.5JrDFgpRex0d_jnB656KPB8FeY7yUcOopqSUlupaUic
DATA
{ "items": [ { "id": 4 }, { "id": 5 } ] }
9.2.3. Curl request
$ curl 'https://dsp-api.smartyads.com/api/campaigns/17/filterlists' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiJHTXpaOFlKd3JTa1lSVjh5Iiwic3ViIjoiMjIiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.5JrDFgpRex0d_jnB656KPB8FeY7yUcOopqSUlupaUic' \
-d '{
"items": [
{
"id": 4
},
{
"id": 5
}
]
}'
9.2.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
9.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."
}
9.3. Append Filter Lists assigned to Campaign
A `PATCH` request with Campaign Id in url will append Filter Lists assigned to Campaign
9.3.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
items.*.id |
integer |
Filter list id |
+ |
items.*.isInclude |
boolean |
Filter list type: include or exclude |
+ |
9.3.2. HTTP Request
URL
PATCH api/campaigns/18/filterlists HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiI0SzdWak5nQlRRTW8zbVJyIiwic3ViIjoiMjMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.GByI6nlwTCD_05F12bzKc8sKro1OdZgZ5V3BNKNW9x4
DATA
{ "items": [ { "id": 7, "isInclude": true } ] }
9.3.3. Curl request
$ curl 'https://dsp-api.smartyads.com/api/campaigns/18/filterlists' -i -X PATCH \
-H 'Accept: application/json' \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiI0SzdWak5nQlRRTW8zbVJyIiwic3ViIjoiMjMiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.GByI6nlwTCD_05F12bzKc8sKro1OdZgZ5V3BNKNW9x4' \
-d '{
"items": [
{
"id": 7,
"isInclude": true
}
]
}'
9.3.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
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
{
"message": "Appended."
}
9.4. Remove Filter Lists assigned to Campaign
A `DELETE` request with Campaign Id in url will remove Filter Lists assigned to Campaign
9.4.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
ids |
array |
List id to remove |
+ |
9.4.2. HTTP Request
URL
DELETE api/campaigns/19/filterlists HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiJoY0NpR1RGd1ZMZzdDellTIiwic3ViIjoiMjQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.GBuJNcaROir33Q4I0FyUe_ZGl8QhYDeDJFvnXGm16_E Content-type: application/x-www-form-urlencoded
DATA
{ "ids": [ 9 ] }
9.4.3. Curl request
$ curl 'https://dsp-api.smartyads.com/api/campaigns/19/filterlists' -i -X DELETE \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiJoY0NpR1RGd1ZMZzdDellTIiwic3ViIjoiMjQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.GBuJNcaROir33Q4I0FyUe_ZGl8QhYDeDJFvnXGm16_E' \
-H 'Content-type: application/x-www-form-urlencoded' \
-d '{
"ids": [
9
]
}'
9.4.4. Response Body
Path | Type | Description |
---|---|---|
message |
string |
Result message |
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
{
"message": "Deleted."
}
10. Optimization Rule
10.1. Rule
A `GET` request will return a optimization rules
10.1.1. HTTP Request
URL
GET api/optimization-rule HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDUsImV4cCI6MTczODg0MTE0NSwibmJmIjoxNzM4ODM3NTQ1LCJqdGkiOiJOQXhpVE94SXFiMmZYSG9MIiwic3ViIjoiNDYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.0xxolz8Ju7ZG8VqP5j7JzFBoyydFNv-d_TcUzYoZ-VQ
DATA
{}
10.1.2. Curl request
$ curl 'https://dsp-api.smartyads.com/api/optimization-rule' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDUsImV4cCI6MTczODg0MTE0NSwibmJmIjoxNzM4ODM3NTQ1LCJqdGkiOiJOQXhpVE94SXFiMmZYSG9MIiwic3ViIjoiNDYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.0xxolz8Ju7ZG8VqP5j7JzFBoyydFNv-d_TcUzYoZ-VQ' \
-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 |
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 |
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": 4,
"userId": 46,
"ownerCampaignId": 0,
"name": "TEST Rule#1",
"timeRange": "last_month",
"then": "whitelist_source",
"targetFilterListId": 1,
"conditions": [],
"createdAt": "2025-02-06T10:25:45.000000Z",
"updatedAt": "2025-02-06T10:25:45.000000Z"
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 15,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
10.2. Get rule by ID
A `GET` request will return a optimization rule
10.2.1. HTTP Request
URL
GET api/optimization-rule/5 HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDUsImV4cCI6MTczODg0MTE0NSwibmJmIjoxNzM4ODM3NTQ1LCJqdGkiOiJoUEZDMDlJZzB4UVZ1ZnJ5Iiwic3ViIjoiNDciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.oqCYDBrers8HRvHkXYoppEKtEZq9CFV3Fx1If7Mg0lw
DATA
{}
10.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDUsImV4cCI6MTczODg0MTE0NSwibmJmIjoxNzM4ODM3NTQ1LCJqdGkiOiJoUEZDMDlJZzB4UVZ1ZnJ5Iiwic3ViIjoiNDciLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.oqCYDBrers8HRvHkXYoppEKtEZq9CFV3Fx1If7Mg0lw' \
-d '{}'
10.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 |
10.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": 47,
"ownerCampaignId": 0,
"name": "TEST Rule#1",
"timeRange": "last_day",
"then": "blacklist_source",
"targetFilterListId": 1,
"conditions": [],
"createdAt": "2025-02-06T10:25:45.000000Z",
"updatedAt": "2025-02-06T10:25:45.000000Z"
}
}
10.3. Create a rule
A `POST` request will return a optimization rule
10.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 |
+ |
10.3.2. HTTP Request
URL
POST api/optimization-rule HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDUsImV4cCI6MTczODg0MTE0NSwibmJmIjoxNzM4ODM3NTQ1LCJqdGkiOiJ1aU1yR0NQZFV2MHZ4UUNQIiwic3ViIjoiNDgiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.AgNHAM4QIsETegRXdQwOzz5IpOnfz2DS-kGRXaU8i7Q
DATA
{ "name": "Test", "timeRange": "last_day", "then": "blacklist_source", "targetFilterListId": 17, "conditions": [ { "condition": "when", "action": "dspPrice", "comparison": ">", "value": "0.5" } ] }
10.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDUsImV4cCI6MTczODg0MTE0NSwibmJmIjoxNzM4ODM3NTQ1LCJqdGkiOiJ1aU1yR0NQZFV2MHZ4UUNQIiwic3ViIjoiNDgiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.AgNHAM4QIsETegRXdQwOzz5IpOnfz2DS-kGRXaU8i7Q' \
-d '{
"name": "Test",
"timeRange": "last_day",
"then": "blacklist_source",
"targetFilterListId": 17,
"conditions": [
{
"condition": "when",
"action": "dspPrice",
"comparison": ">",
"value": "0.5"
}
]
}'
10.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 |
10.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": "2025-02-06T10:25:45.000000Z",
"updatedAt": "2025-02-06T10:25:45.000000Z"
}
}
10.4. Rule update
A `PATCH` request will return a optimization rule
10.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 |
+ |
10.4.2. HTTP Request
URL
PUT api/optimization-rule/7 HTTP/1.1
HEADER
Accept: application/json Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDYsImV4cCI6MTczODg0MTE0NiwibmJmIjoxNzM4ODM3NTQ2LCJqdGkiOiJlR283ck5GbFAwZjZOWkRlIiwic3ViIjoiNDkiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.aAh81rBm0kxeYz_OHz4EPzhpezniks5Ag3X_qVXqHQk
DATA
{ "name": "Test#2", "timeRange": "last_week", "then": "whitelist_source", "targetFilterListId": 18, "conditions": [ { "condition": "when", "action": "dspPrice", "comparison": "<", "value": "1" } ] }
10.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDYsImV4cCI6MTczODg0MTE0NiwibmJmIjoxNzM4ODM3NTQ2LCJqdGkiOiJlR283ck5GbFAwZjZOWkRlIiwic3ViIjoiNDkiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.aAh81rBm0kxeYz_OHz4EPzhpezniks5Ag3X_qVXqHQk' \
-d '{
"name": "Test#2",
"timeRange": "last_week",
"then": "whitelist_source",
"targetFilterListId": 18,
"conditions": [
{
"condition": "when",
"action": "dspPrice",
"comparison": "<",
"value": "1"
}
]
}'
10.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 |
10.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": 49,
"ownerCampaignId": 0,
"name": "Test#2",
"timeRange": "last_week",
"then": "whitelist_source",
"targetFilterListId": 18,
"conditions": [],
"createdAt": "2025-02-06T10:25:46.000000Z",
"updatedAt": "2025-02-06T10:25:46.000000Z"
}
}
10.5. Remove Rule assigned to Campaign
A `DELETE` request will delete a Optimization rule relation
10.5.1. HTTP Request
URL
DELETE api/optimization-rule/8 HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDYsImV4cCI6MTczODg0MTE0NiwibmJmIjoxNzM4ODM3NTQ2LCJqdGkiOiJuR3VHTmk4eTR6b296bm9EIiwic3ViIjoiNTAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.6iM52wONZRvO2NEsod2EhTSHPyckHi41jHWGGJz8reA Content-type: application/x-www-form-urlencoded
DATA
{}
10.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDYsImV4cCI6MTczODg0MTE0NiwibmJmIjoxNzM4ODM3NTQ2LCJqdGkiOiJuR3VHTmk4eTR6b296bm9EIiwic3ViIjoiNTAiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.6iM52wONZRvO2NEsod2EhTSHPyckHi41jHWGGJz8reA' \
-H 'Content-type: application/x-www-form-urlencoded' \
-d '{}'
10.5.3. Response Body
Path | Type | Description |
---|---|---|
deleted |
boolean |
is deleted |
10.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
}
11. Assign Optimization rules to Campaigns
11.1. Get Rule assigned to Campaign
A `GET` request will return a optimization rule relation
11.1.1. HTTP Request
URL
GET api/campaign/9/optimization-rule-relation HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDEsImV4cCI6MTczODg0MTE0MSwibmJmIjoxNzM4ODM3NTQxLCJqdGkiOiJRM1RoZ2FGUjI5TU1aN3NsIiwic3ViIjoiMTQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.8xUYHc_7E8ih0q7dgTPa5gnfTvECZaxsKoyapneIANw
DATA
{}
11.1.2. Curl request
$ curl 'https://dsp-api.smartyads.com/api/campaign/9/optimization-rule-relation' -i -X GET \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDEsImV4cCI6MTczODg0MTE0MSwibmJmIjoxNzM4ODM3NTQxLCJqdGkiOiJRM1RoZ2FGUjI5TU1aN3NsIiwic3ViIjoiMTQiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.8xUYHc_7E8ih0q7dgTPa5gnfTvECZaxsKoyapneIANw' \
-d '{}'
11.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 |
11.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": 14,
"ownerCampaignId": 9,
"name": "TEST Rule#1",
"timeRange": "last_3_days",
"then": "blacklist_source",
"targetFilterListId": 1,
"conditions": [
{
"condition": "or",
"action": "winrate",
"comparison": ">",
"value": 5000
}
],
"createdAt": "2025-02-06T10:25:41.000000Z",
"updatedAt": "2025-02-06T10:25:41.000000Z"
}
}
11.2. Replace Rule assigned to Campaign
A `POST` request will return a optimization rule relation
11.2.1. Request Body
Path | Type | Description | Required |
---|---|---|---|
campaignId |
integer |
campaignId |
+ |
ruleId |
integer |
ruleId |
+ |
11.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDEsImV4cCI6MTczODg0MTE0MSwibmJmIjoxNzM4ODM3NTQxLCJqdGkiOiI2dXhrb3YyVVZQY29heEQ0Iiwic3ViIjoiMTUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.YZB40F3Wa2wc5jun72N8-_dGQHbfuY-oZksg5QmTQY0
DATA
{ "campaignId": 10, "ruleId": 2 }
11.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.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDEsImV4cCI6MTczODg0MTE0MSwibmJmIjoxNzM4ODM3NTQxLCJqdGkiOiI2dXhrb3YyVVZQY29heEQ0Iiwic3ViIjoiMTUiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.YZB40F3Wa2wc5jun72N8-_dGQHbfuY-oZksg5QmTQY0' \
-d '{
"campaignId": 10,
"ruleId": 2
}'
11.2.4. Response Body
Path | Type | Description |
---|---|---|
campaignId |
integer |
campaignId |
ruleId |
integer |
ruleId |
11.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
}
11.3. Remove Rule assigned to Campaign
A `DELETE` request will delete a Optimization rule relation
11.3.1. HTTP Request
URL
DELETE api/campaign/11/optimization-rule-relation HTTP/1.1
HEADER
Accept: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiIyWnBpaUNEZXNxVlFoTG00Iiwic3ViIjoiMTYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.O0wpzbHe4pEL_iL6r_b0nFoNlyiolG1UNvQRRncoxSc Content-type: application/x-www-form-urlencoded
DATA
{}
11.3.2. Curl request
$ curl 'https://dsp-api.smartyads.com/api/campaign/11/optimization-rule-relation' -i -X DELETE \
-H 'Accept: application/json' \
-H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0Ojk5MjMiLCJpYXQiOjE3Mzg4Mzc1NDIsImV4cCI6MTczODg0MTE0MiwibmJmIjoxNzM4ODM3NTQyLCJqdGkiOiIyWnBpaUNEZXNxVlFoTG00Iiwic3ViIjoiMTYiLCJwcnYiOiIyM2JkNWM4OTQ5ZjYwMGFkYjM5ZTcwMWM0MDA4NzJkYjdhNTk3NmY3In0.O0wpzbHe4pEL_iL6r_b0nFoNlyiolG1UNvQRRncoxSc' \
-H 'Content-type: application/x-www-form-urlencoded' \
-d '{}'
11.3.3. Response Body
Path | Type | Description |
---|---|---|
deleted |
boolean |
is deleted |
11.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
}
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',