Advertiser's API Reference

Rate Limiting

 

We use rate limiting to protect our server from too many requests within a given time frame that could put our databases at risk.

We currently allow 120 API requests per minute for one advertiser account.

We therefore measure the amount of requests sent to the API in order to throttle these when they surpass the amount allowed. In this case we will respond with the following error response:

HTTP Status Code message Description
429 Too Many Requests Too Many Requests You have exceeded the allowed number of requests per minute.

Example Error Response

{
  "message": "Too Many Requests"
}

Generate an Access Token

 

Generates a new access token and returns it.

Current token if it exists will be revoked immediately.

URL

https://api.monetizer.co/data/network.php

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action generateAccessToken Yes

Specifies the action to perform.

Example Request

curl --request POST \
  --url https://api.monetizer.co/data/network.php \
  --header 'accept: application/json' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --data action=generateAccessToken

Response

Returns object with value of new access token.

Attribute Type Description
token String

New access token value.

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The value of the action parameter is missing

400 Bad Request Unsupported action

action parameter is invalid

400 Bad Request Generation of API access token is not allowed.

Generation of new API access token is forbidden by the administrator for your account.

500 Internal Server Error Internal Server Error

An unexpected error has occurred

Example Response

{
  "token": "ItZJZCQ2WoULVt9uWOTu2i4QES36hPqsq7u9Bpr0HWOKOj74Lp6ilZNqcaFr"
}

Example Error Response

{
    "message": "Missing \"action\" parameter"
}

Get The List Of Contacts

 

Gets list of advertiser’s additional contacts if any.

URL

https://api.monetizer.co/data/network.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
action advertiserContacts Yes

Specifies the action to perform.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/data/network.php?action=advertiserContacts' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns list of contact objects

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The value of the action parameter is missing

400 Bad Request Unsupported action

action parameter is invalid

Example Response

[
  {
    "id": 621,
    "advertiser_id": 12542,
    "name": "Test",
    "email": "test1@test.test",
    "skype": "test1_skype",
    "note": "",
    "phone": "123-34-567",
    "fax": "",
    "status": 1
  }
]

Example Error Response

    {
      "message":"Unsupported action"
    }

Get Totals

 

Returns the total number of created campaigns (including push campaigns), and the total amount of money spent.

URL

https://api.monetizer.co/v3/advertiserAccountTotals.php

Requires Auth

Yes

Example Request

curl --request GET \
  --url https://api.monetizer.co/v3/advertiserAccountTotals.php \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns object with the following attributes:

Attribute Type Description
campaigns Integer

The total number of created campaigns (including push campaigns).

spend Float

The total amount of money spent in USD.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

An unexpected error has occurred.

Example Response

{
  "campaigns": 3,
  "spend": 0
}

Example Error Response

{
  "message": "Server error. Error ID: 79e5f6ba"
}

Get a CPA Score

 

Returns a CPA score for your account.

The CPA score is your performance score which includes paused, deleted and active CPA campaigns. Your CPA score will update every couple of hours if you have active CPA campaigns running.

Performance is measured by account wide eCPM compared to other Advertizers on the platform. Please try and keep your performance as high as possible to avoid having CPA disabled on your account.

Read “CPA Score Explained” to learn more about CPA score.

URL

https://api.monetizer.co/data/advertiser-qs.php

Requires Auth

Yes

Example Request

curl --request GET \
  --url https://api.monetizer.co/data/advertiser-qs.php \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns object with the following attributes:

Attribute Type Description
success Boolean

A boolean value indicating whether the request was successful or not.

result Number | 'N/A'

The value of your CPA score as a percentage. If you don’t have cpa campaigns or there are not enough data to compute the score, then string value N/A is returned.

Example Response

{
  "success": true,
  "result": 93
}
 

Get an Account Data

 

Returns the advertiser’s account data (your account data).

URL

https://api.monetizer.co/data/network.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
action advertiser Yes

Specifies the action to perform.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/data/network.php?action=advertiser' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns account object with the following attributes:

Attribute Type Description
id Integer

The ID of your account.

network String

The unique username of the account.

added String

The account creation time. (New York time zone)

name String

Your name.

status Integer

The status of the account. Should be equal to 1 (approved).

website String

Your website url.

tel String

Your telephone number.

fax String

Your fax number.

billing_contact_id Integer

The ID of additional billing contact record.

billing_type Integer

The billing type. Supported values: 1 - invoice, 2 - self billed.

billing_frequency Integer

The billing frequency code. This attribute is deprecated. Now for all advertizer.com accounts this attribute is equal to 22, that means pre-pay.

vat_registered Integer

The value that determines whether VAT registered or not.

Possible values: 0 - not determined, 1 - VAT registered, 2 - VAT not registered.

vat_number String

Your VAT number.

billing_name String

Your billing name.

billing_address_1 String

Your main billing address.

billing_address_2 String

Your additional billing address.

billing_city String

Your billing city.

billing_postcode String

Your billing postcode.

billing_province String

Your billing province.

billing_country String

The ISO 3166 alpha-2 country code in upper case of your billing country.

billing_instructions String

The billing instructions. This attribute is deprecated.

billing_currency String

The billing currency. Currently only the value equal to USD is supported.

account_email String

You email address.

company_name String | null

Your company name. It is used in the insertion order.

weekly_offer_limit Integer

The maximum number of CPA campaigns (offers) you can create per week. This attribute is deprecated, see weekly_offer_limits instead.

weekly_offer_limits Array

The array that contains the maximum number of CPA campaigns (offers) you can create per week in each geo (country) group.

E.g., the value [10, 12] means that you may create 10 CPA campaigns in Geo Group 1 and 12 CPA campaigns in Geo Group 2 every week.

Note: You may get the list of countries in each geo group using Get Geo Groups action response.

outstanding_balance Numeric String

Your outstanding balance in USD.

allow_cpa Integer

The number 1 or 0 that indicates whether creation of CPA campaigns is allowed or not.

cc_limit Numeric String

Credit card monthly limit in USD. This attribute is deprecated.

allow_direct_offers Integer

Determines whether the creation of private offers is allowed (1) or not (0).

allow_cpa_whitelist Integer

Determines whether the CPA whitelist is allowed (1) or not (0).

Note: Currently CPA whitelist is not allowed for all accounts.

max_cpc_bid Numeric String

The maximum value of CPC bid.

cpa_trial Integer

Determines whether the creation of CPA trial campaigns is allowed (1) or not (0).

allow_cpc Integer

Determines whether the creation of CPC campaigns is allowed (1) or not (0).

Note: The CPC campaigns are no longer supported. So this attribute is deprecated.

allow_push Integer

Determines whether the creation of push campaigns is allowed (1) or not (0).

allow_pops_rtb Integer

Determines whether the creation of Popups RTB campaigns is allowed (1) or not (0).

Note: The Popups RTB campaigns are no longer supported. So this attribute is deprecated.

allow_in_app Integer

Determines whether the creation of InApp campaigns is allowed (1) or not (0).

notification_messages Integer

Determines whether to send you an email alert about new message from publisher (1) or not (0).

hide_ui_message Integer

This attribute makes sense only for Advertiser UI. It determines whether to hide UI message or not.

auto_approve_offers Integer

Determines whether auto approval of new campaigns is allowed (1) or each your campaign have to be approved manually by admin (0).

notification_segments Integer

Determines whether to send you a regular email highlighting the top segments (1) or not (0).

allow_mainstream Integer

Determines whether to allow creation of campaigns in mainstream category (1) or not (0).

allow_auto_topup Integer

Determines whether automatic funds top up is allowed (1) or not (0).

Note: Automatic top-up allows funds to be automatically added to your account when your account balance is low. This feature is in beta phase.

auto_topup_enabled Integer

Determines whether automatic funds top up is enabled by you for your account.

Note: Automatic top-up allows funds to be automatically added to your account when your account balance is low. This feature is in beta phase.

allow_access_token Integer

Determines whether the access to API via access token is allowed (1) or not (0).

geo_blacklist Array

The array of blacklisted ISO 3166 country codes (alpha 2) in mainstream vertical. You will not be allowed to create mainstream campaigns targetting these countries.

geo_blacklist_dates Object

The object with keys that equal to blacklisted ISO 3166 country codes (alpha 2) in mainstream vertical and values equal to dates when the country was blocked (blacklisted).

sms_tel String | null

The mobile telephone number that you want to use for SMS alerts.

sms_low_balance Integer

The value 1 or 0 that determines whether SMS alert about low balance will be sent via SMS or not.

allow_messages Integer

The value 1 or 0 that determines whether you allowed to send or obtain messages or not.

io_required Integer

Determines whether you have to sign insertion order to be able to deposit funds (1) or not (0).

docusign_io_id String | null

GUID of the signed insertion order.

profile_locked Integer

Determines whether contact and billing details are locked for editing (1) or not (0).

Note: You may ask admin to unlock your profile for editing.

geo_blacklist_adult Array

The array of blacklisted ISO 3166 country codes (alpha 2) in adult vertical. You will not be allowed to create adult campaigns targetting these countries.

geo_blacklist_adult_dates Object

The object with keys that equal to blacklisted ISO 3166 country codes (alpha 2) in adult vertical and values equal to dates when the country was blocked (blacklisted).

allow_traffic_requests Integer

The value 1 or 0 that determines whether you allowed to create/update traffic requests for Offer Market or not.

advertizer_postback String

Your postback URL. Ensure that you make a request to this postback URL when you have successfully received a conversion on your offer. If not setup properly, your campaign will stop receiving traffic.

Please make sure to replace the [[subid]] token holder with the click id we are sending to your offer, and replace [[amount]] token holder with amount in USD and with (.) as a separator and no comma.

intercom_user_hash String

The hash of your Intercom user record. (Deprecated)

walkytalky_user_hash String

The hash of your WalkyTalky user record.

global_blacklist Array

The array of blacklisted publisher IDs. This publishers will be blacklisted for all your campaigns.

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The value of the action parameter is missing

400 Bad Request Unsupported action

action parameter is invalid

500 Internal Server Error Internal Server Error

An unexpected error has occurred

Example Response

{
  "id": 12542,
  "network": "TestNetwork",
  "added": "2020-01-02 16:44:27",
  "name": "Test",
  "status": 1,
  "website": "http:\/\/test.test",
  "tel": "12345789",
  "fax": "",
  "billing_contact_id": 0,
  "billing_type": 2,
  "billing_frequency": 22,
  "vat_registered": 0,
  "vat_number": "us4512142",
  "billing_name": "Private name",
  "billing_address_1": "Billing Address 1",
  "billing_address_2": "",
  "billing_city": "New York",
  "billing_postcode": "1234567",
  "billing_province": "Billing province",
  "billing_country": "US",
  "billing_instructions": "",
  "billing_currency": "USD",
  "company_name": "Test company name",
  "account_email": "testnetwork@email.com",
  "weekly_offer_limit": 8,
  "weekly_offer_limits": [
    10,
    12
  ],
  "outstanding_balance": "1000.0000",
  "allow_cpa": 1,
  "cc_limit": "5000.00",
  "allow_direct_offers": 1,
  "allow_cpa_whitelist": 0,
  "max_cpc_bid": "0.1000",
  "cpa_trial": 1,
  "allow_cpc": 1,
  "allow_push": 1,
  "allow_pops_rtb": 1,
  "allow_in_app": 1,
  "notification_messages": 1,
  "hide_ui_message": 0,
  "auto_approve_offers": 1,
  "notification_segments": 1,
  "allow_mainstream": 1,
  "allow_auto_topup": 0,
  "auto_topup_enabled": 0,
  "allow_access_token": 1,
  "geo_blacklist": [
    "AE",
    "EG",
    "SA"
  ],
  "geo_blacklist_dates": {
    "AE": "2023-06-07",
    "EG": "2023-07-01",
    "SA": "2023-07-07"
  },
  "sms_tel": null,
  "sms_low_balance": 0,
  "allow_messages": 1,
  "docusign_io_id": "74ac300a-de98-4a15-a028-513142562a29",
  "io_required": 1,
  "profile_locked": 1,
  "geo_blacklist_adult": [
    "AE",
    "EG",
    "SA"
  ],
  "geo_blacklist_adult_dates": {
    "AE": "2023-06-07",
    "EG": "2023-07-01",
    "SA": "2023-07-07"
  },
  "allow_traffic_requests": 1,
  "advertizer_postback": "http:\/\/postback.advertizer.com\/pb.php?clickid=[[subid]]&amount=[[amount]]&advertiser_id=TestNetwork&key=a4b2e1a3d526babd82172f326424cca9",
  "intercom_user_hash": "<intercom user hash value>",
  "walkytalky_user_hash": "<walkytalky user hash value>",
  "global_blacklist": [
    "1",
    "2",
    "3",
    "4"
  ]
}

Example Error Response

{
  "message":"Unsupported action"
}

Update an Account Details

 

Updates the advertiser’s account details.

URL

https://api.monetizer.co/data/network.php

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action updateAll Yes

Specifies the action to perform.

website String No

Your website url.

tel String Yes

Your telephone number.

fax String No

Your fax number.

billing_name String Yes

Your billing name.

billing_address_1 String Yes

Your main billing address.

billing_address_2 String No

Your additional billing address.

billing_city String Yes

Your billing city.

billing_province String No

Your billing province.

billing_postcode String Yes

Your billing postcode.

billing_country String Yes

Your billing country.

vat_number String No

Your VAT number.

company_name String No

The name of your company if any. It will be used in the IO (insertion order).

global_blacklist Array | '' No

The list of publisher ids that you want to add to your global blacklist. You can blacklist no more than 5 publishers by id, and 50 sub publishers. Provide empty string value to clear the list.

notification_messages Integer No

Accepted values 0 and 1. Choose 1 if you want to receive an email alert when a message is sent from a publisher.

notification_segments Integer No

Accepted values 0 and 1. Choose 1 if you want to receive a regular email highlighting the top segments for you to take advantage of.

sms_tel String No

The mobile telephone number that you want to use for SMS alerts.

sms_low_balance Integer No

Set this parameter to 1 if you want to obtain SMS notifications about low balance to the telephone number specified by sms_tel parameter. The value 0 - disables sms notifications of low balance events.

pass String No

Your current Advertizer.com account password. You have to provide this param only when new_pass is provided.

new_pass String No

New password value. Provide it only if you want to change your current password.

new_pass_confirm String No

New password confirmation. It should be equal to new_pass value.

Example Request

curl --request POST \
  --url https://api.monetizer.co/data/network.php \
  --header 'accept: application/json' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --data action=updateAll \
  --data website=https://test1.test \
  --data tel=12345789 \
  --data 'billing_name=Private name 1' \
  --data 'billing_address_1=Billing Address 1' \
  --data 'billing_address_2=Billing Address 2' \
  --data 'billing_city=New York' \
  --data billing_postcode=1234567 \
  --data 'billing_province=Billing province' \
  --data billing_country=US \
  --data vat_number=352522811 \
  --data 'company_name=Test company name' \
  --data 'global_blacklist[]=1' \
  --data 'global_blacklist[]=2' \
  --data 'global_blacklist[]=3' \
  --data 'global_blacklist[]=4' \
  --data notification_messages=1 \
  --data notification_segments=1

Response

Returns object with status attribute that indicates the status of operation.

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The value of the action parameter is missing

400 Bad Request Unsupported action

action parameter is invalid

400 Bad Request Please enter a valid website url.

website parameter is invalid

400 Bad Request Please enter a valid telephone number.

tel parameter is invalid

400 Bad Request Please enter a valid billing name.

billing_name parameter is invalid

400 Bad Request Please enter a valid billing address.

billing_address_1 parameter is invalid

400 Bad Request Please enter a valid billing city.

billing_city parameter is required

400 Bad Request Please enter a valid billing postcode.

billing_postcode parameter is invalid

400 Bad Request Please select a billing country.

billing_country parameter is not provided

400 Bad Request publisher blacklist contains invalid item

global_blacklist parameter can contain only scalar items that is correct publisher id or sub publisher id.

400 Bad Request You have not entered your new password in the same twice.

new_pass parameter is provided and not equal to new_pass_confirm parameter

400 Bad Request Please enter a valid SMS Telephone Number.

sms_tel parameter is not valid telephone number

400 Bad Request Your contact and billing details are now locked. Contact support if you need to make a change.

Some of the contact and billing details was restricted for modification by advertiser. Only admin can update them.

500 Internal Server Error Internal Server Error

An unexpected error has occurred

Example Response

{
  "status": "success"
}

Example Error Response

{
    "message": "Please enter a valid website url."
}

Get The List of Apps

 

Returns the list of 1000 most popular apps.

URL

https://api.monetizer.co/data/partner-ls-app.php

Requires Auth

Yes

Example Request

curl --request GET \
  --url https://api.monetizer.co/data/partner-ls-app.php \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
app String

The name of the app.

Errors

HTTP Status Code Message Description
500 Internal Server Error No DB

No Database Connection.

Example Response

[
  {
    "app":"Chrome browser"
  },
  {
    "app":"Stock Browser"
  },
  {
    "app":"com.myfitnesspal.android"
  },
  ...
]  

Example Error Response

{
  "message": "No DB"
}     

Access Token Authentication

 

To access the Advertizer’s API, you’ll need an access token. You can get the access token in your Advertizer’s account. (But only for advertiser’s accounts with permission to use access token).

How to use the token

Once you have a token, simply provide it as an X_AFFLOW_ADVERTISER_ACCESS_TOKEN header in your requests, as shown in the example.

Generate a new token

You may generate a new token and simultaneously revoke the old one. Learn more.

Example Request

    curl --request GET \
      --url 'https://api.monetizer.co/data/network.php?action=balance&id=12542' \
      --header 'accept: application/json' \
      --header 'x_afflow_advertiser_access_token: <Your access token>'

Error Response

If you don’t provide an access token or provide invalid token you obtain the following response:

HTTP Status Code message
403 Forbidden Forbidden

Example Error Response

{
  "message": "Forbidden"
}

Get Balance Reports

 

Returns balance reports for specified time range. There are several types of reports available that depend on value of grouped parameter.

See also Get Transactions Report

URL

https://api.monetizer.co/v2/AdvertiserTransaction.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
from Integer Yes

Unix timestamp of start of time range.

to Integer Yes

Unix timestamp of end of time range.

limit Integer Yes

Maximum number of records to receive.

page Integer No

Page number (first page is equal to 1 and this is default value)

paymentType Integer No

Specifies type of the transactions (payments) that should be accounted in the report. Default value is equal to -1. Accepted values: -1 - all, -2 - only top ups, 0 - payment for lead, 1 - wire payment, 2 - payment by credit card, 3 - PayPal payment, 4 - payment for CPC, 5 - push refund, 6 - payment for push, 7 - CPA trial charge, 8 - CPA (trial) refund, 9 - funds transfer.

grouped String Yes

Specifies the type of report: month - monthly report (data is grouped by month), date - daily report (data is grouped by date). If this parameter is omitted then instead of balance reports the transactions report is returned Learn more

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v2/AdvertiserTransaction.php?from=1596153600&to=1596844801&limit=50&page=1&paymentType=-1&grouped=date' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
total Integer

The number of transactions for day (month) represented by this record.

credit Numeric String

The credit value in USD.

debit Numeric String

The debit value in USD.

ts String

Timestamp of the first transaction in group (day/month). (New York time zone).

Errors

HTTP Status Code Message Description
406 Not Acceptable Not Acceptable

Required parameter is missing

500 Internal Server Error Server error. Error ID: ...

Unexpected error occurred during handling of request.

Example Response

[
  {
    "total": 1,
    "credit": "400.0000",
    "debit": "0.0000",
    "ts": "2020-08-05 17:00:07"
  }
]

Example Error Response

{
  "message": "Not Acceptable"
}

Get Transactions Report

 

Returns transactions report (transactions history) for specified time range.

See also Get Balance Reports

URL

https://api.monetizer.co/v2/AdvertiserTransaction.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
from Integer Yes

Unix timestamp of start of time range.

to Integer Yes

Unix timestamp of end of time range.

limit Integer Yes

Maximum number of records to receive.

page Integer No

Page number (first page is equal to 1 and this is default value)

paymentType Integer No

Specifies type of the transactions (payments) to get. Default value is equal to -1. Accepted values: -1 - all, -2 - only top ups, 0 - payment for lead, 1 - wire payment, 2 - payment by credit card, 3 - PayPal payment, 4 - payment for CPC, 5 - push refund, 6 - payment for push, 7 - CPA trial charge, 8 - CPA (trial) refund, 9 - funds transfer.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v2/AdvertiserTransaction.php?from=1596153600&to=1596844800&limit=50&page=1&paymentType=-1' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
transactionId Integer

The unique transaction identifier.

networkId Integer

The unique network (advertiser account) identifier.

amount Numeric String

The transaction amount in USD.

time Integer

The unix timestamp of the transaction.

paymentType Integer

The type of the transaction. Supported values: 0 - payment for lead, 1 - wire payment, 2 - payment by credit card, 3 - PayPal payment, 4 - payment for CPC, 5 - push refund, 6 - payment for push, 7 - CPA trial charge, 8 - CPA (trial) refund, 9 - funds transfer

leadId Integer or null

The unique identifier of the lead (only for lead payment).

comment String or null

Transaction comment (available not for all transaction types).

stripeChargeId String or null

Stripe charge identifier (only for payment by credit card).

paypalPaymentId String or null

PayPal payment identifier (only for PayPal payments).

amountGross Numeric String or null

The gross amount of the transaction in USD.

click_id String

The click identifier related to the lead (only for lead payment).

offer_id String

The campaign (offer) identifier related to the lead (only for lead payment).

Errors

HTTP Status Code Message Description
406 Not Acceptable Not Acceptable

Required parameter is missing

500 Internal Server Error Server error. Error ID: ...

Unexpected error occurred during handling of request.

Example Response

[
  {
    "transactionId": 96029960,
    "networkId": 12541,
    "amount": "400.0000",
    "time": 1596646807,
    "paymentType": 2,
    "leadId": null,
    "comment": "Credit Card Charge",
    "stripeChargeId": "ch_1CfxwkxlsaRQw",
    "paypalPaymentId": null,
    "amountGross": null,
    "click_id": "",
    "offer_id": ""
  }
]

Example Error Response

{
  "message": "Not Acceptable"
}

Get a Total Balance

 

Gets a total balance for advertiser account.

URL

https://api.monetizer.co/data/network.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
action 'balance' Yes

Specifies the action to perform.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/data/network.php?action=balance' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns object with following attributes:

Attribute Type Description
outstanding_balance Numeric String

The balance amount in US dollars

low_balance Integer

Possible values: 0 (balance is not low) or 1 (balance is low).

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The value of the action parameter is missing

400 Bad Request Unsupported action

action parameter is invalid

500 Internal Server Error Internal Server Error

An unexpected error has occurred

Example Response

{
  "outstanding_balance":"400.00",
  "low_balance":0
}

Example Error Response

{
  "message":"Unsupported action"
}

Get The List of Browsers

 

Returns the list of web browsers.

URL

https://api.monetizer.co/data/partner-ls-browser.php

Requires Auth

Yes

Example Request

curl --request GET \
  --url https://api.monetizer.co/data/partner-ls-browser.php \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
browser_name String

The name of the web browser.

Errors

HTTP Status Code Message Description
500 Internal Server Error Internal Server Error

An unexpected error has occurred

Example Response

[
  {
    "browser_name": "Chrome Mobile"
  },
  {
    "browser_name": "Android Webkit"
  },
  ...
]

Example Error Response

{
  "message": "Internal Server Error"
}    

Create a Campaign

 

Creates a new campaign (offer).

The created campaign will be live (running) only after it will be approved by the admin.

You may create a new campaign only if you have completed your account details.
See how to get an account details and update account details.
Additionally you have to complete conversion test before you will be able to create CPA campaigns or private campaigns.
See how to create conversion test here and how to check conversion test completion here.
For every created CPA trial campaign we charge a fee to ensure we only receive the best/highest performing offers from our advertisers. The amount of the fee depends on the geo and equal to the value of `cpa_trial` attribute of the List All Minimum Bids response. See also CPA Trial Fees Explained

URL

https://api.monetizer.co/data/advertiser-offers.php

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action newOffer Yes

Specifies the action to perform.

conversion_flow String Yes

Specifies the conversion flow of campaign and/or type of the campaign.

To create CPA (pay for conversion) campaign use one of the following values:

  • carrierbilling - 1 or 2 click flow / Pinsubmit;
  • leadgen - Lead generation (CPL campaigns with SOI or DOI);
  • sweepstakes - Sweepstakes offers such as Win an iPhone, Giftcards, etc;
  • cpi - App install campaigns;
  • dating - Adult dating offers;
  • cashondelivery - Campaigns with cash upon delivery conversion flow;
  • ecommerce - Ecommerce campaigns (offers);
  • apk - .apk file downloads or .exe automatically starting downloads;
  • revshare - Incoming amount prioritized via postback and not CPA Bid (payout).;

Note: You can create a CPA campaign only if the value of allow_cpa attribute from “Get an Account Data” response is equal to 1, otherwise if cpa_trial is equal to 1, then a CPA trial campaign will be created.

To create In-App (Pay per impression, WebView traffic) campaign use in_app value.

To create Private CPA campaign or so called “Direct offer” that targets a single publisher use direct_offers value and aditionally specify tag and aff_campaign_partners_wl_data attributes.

tag String No

This parameter is required for Private CPA campaign and should not be provided for other types of campaigns.

Supported values: Adult, APK, Cash On Delivery, Crypto, CPI, Click2Call, Casino, Credit Card Submit, CPL, Dating, E-Commerce, Mobile Content, Nutra, Push CPS, Other.

tags Array No

The array of tags of the campaign. Max number of allowed tags is equal to 3. This parameter is supported only for CPA campaigns with conversion_flow that is equal to any of the following: carrierbilling, leadgen, sweepstakes or cpi.

Supported values depends on specified converstion flow:

  • carrierbilling: 1 click, 2 clicks, Click2SMS, Pin Flow, MO Flow, IVR/Click to call
  • leadgen or sweepstakes: Amazon, Iphone, Samsung, Ikea, Supermarkets
  • cpi: Gaming, Utility (Antivirus,Cleaner), VPN, Video, Dating, Travel, Finance
aff_campaign_name String Yes

The name of the campaign.

aff_campaign_url String Yes

The URL of the campaign (offer). This URL should include https:// and the following Monetizer placeholders:

  • [[subid]] is used for our unique clickid per visitor (posted back to us in case of a conversion ) (mandatory);
  • [[partner_id]] is the publisher id in our system (mandatory);
  • [[pid]] is the placement id in our system, allowing you to block on a placement level rather than a publisher level (optional);
  • [[campaign_id]] is the public hash ID or your campaign;
preview File Yes

The preview image of your landing page or offer page (in case there is no landing page used). Only png and jpeg formats are supported. The file size of the image should be lesser than 2.5MB.

aff_campaign_payout Float Yes

The payout (bid) of the campaign in US dollars.

It should be greater than minumum allowed bid for targeted country. See how to obtain minumum bid value here.

For In-App campaigns the payout also have to be lesser than value of max_cpc_bid attribute from “Get an Account Data” response. The default value of max_cpc_bid is $0.01.

aff_campaign_cap Integer No

The number of leads per day that campaign accepts. Minimum cap for In-App campaigns is 1000.

aff_campaign_hour_data String No

The campaign’s day parting. This parameter specifies hours when campaign should run. For example the value: 10-18,20 means that campaign is running from 10:00 to 18:59 and from 20:00 to 20:59.

category String Yes

The category of the campaign (offer). Allowed values: mainstream, adult.

traffic_source String No

The traffic source type for CPA offer. If category parameter is equal to mainstream then you may use value: mainstream or adult. If category parameter is equal to adult or conversion_flow parameter is equal to dating then only value adult is allowed.

Important: This parameter is required for CPA offers. For private or In App offers you may skip it or use value any.

in_app String Yes

Specifies what to do with WebView traffic. Allowed values are allow, deny, only.

device String Yes

The device that the campaign is targeting. Allowed values are mobile, desktop, all.

Warning: Selecting value all will result in multiple campaigns being created (one for each device and connection type) - multiple CPA trial fee charges.

wifi String Yes

Specifies the type of connection that the campaign is targeting. Allowed values are only - only wifi, deny - not wifi (cellular), allow - all types.

Warning: Selecting value allow will result in multiple campaigns being created (one for each device and connection type) - multiple CPA trial fee charges.

country String Yes

The ISO 3166 alpha-2 country code in upper case that campaign is targeting. Your account may be restricted from creating campaigns targetting some countries. Please see geo_blacklist in “Get an Account Data”.

aff_campaign_carrier_data Array No

The carriers (connection providers) that the campaign is targeting. See how to obtain list of supported carriers here.

aff_campaign_os_data Array No

The list of operating systems that the campaign is targeting. See how to obtain list of supported operating systems here.

aff_campaign_browser_data Array No

The list of browsers that the campaign is targeting. See how to obtain list of supported browsers here.

aff_campaign_language_data Array No

The list of ISO 639-1 language codes in lower case that the campaign is targeting.

aff_campaign_partners_bl_data Array No

The publisher blacklist represented as an array of publisher IDs. You should not specify this parameter when you create a private campaign (direct offer).

aff_campaign_partners_wl_data Array No

The publisher whitelist represented as an array of publisher IDs. Note: this parameter is required to create a private campaign (direct offer). If you want to create private campaign (direct offer) then you have to set this parameter to the array that contains the ID of the publisher that should be targeted by the campaign.

promotional_comment String No

State restrictions to publishers for promoting this campaign. You should specify this parameter only for private campaigns (direct offers).

lander_required Integer No

The number 0 or 1 that indicates whether the lander is required for campaign or not. You should specify this parameter only for private campaigns (direct offers).

lander_included Integer Yes

The number 0 or 1 that indicates whether you using a landing page for this campaign or not

settings Array No

The campaign settings. Please select everything that applies to your landing page. I.e. if your offer is an antivirus offer which has a fake warning style landingpage and an exit pop, you’d need to set aggressiveantivirus and exitpop. Accepted values:

  • javascriptentry - A message that is triggered via Javascript and pulls the window automatically to the front;
  • exitpop - Exit javascript message before the window is being closed (known as exit blockers);
  • aggressiveantivirus - For landing and offer pages with aggressive fake alerts, i.e. ‘Your phone is infected’ or aggressive style marketing in general;
  • copyrightmaterial - Check if your landing page uses copyright material (imitating big brands on the landing page);
  • malwareflag - your tracking link or offer link is flagged on some virus checkers;
  • collectspush - your landing page attempts to collect push subscriptions;
app_blacklist_data Array No

The app blacklist. It should only be specified for In-App Campaigns. See here how to obtain the supported list of apps.

app_whitelist_data Array No

The app whitelist. It should only be specified for In-App Campaigns. See here how to obtain the supported list of apps.

payout_increase_data String No

The array of payout increase objects encoded as JSON string. This parameter may be specified only for CPA campaigns.

Every payout increase object should have partner_id attribute set to publisher ID and amount attribute set to value that specify the payout increase.

For example, to increase payout for publisher with ID = 12 by 20% you should provide: [{"partner_id":12,"amount":1.2}]

Please note that objects with invalid partner_id parameter or with amount parameter lesser than 1 or lesser than current publisher’s payout increase will be ignored.

Use “Validate a Publisher ID” action to check if some partner_id value is valid. Also see “Update Payout Increases”.

Example Request

curl --request POST \
  --url https://api.monetizer.co/data/advertiser-offers.php \
  --header 'accept: application/json' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --form action=newOffer \
  --form conversion_flow=sweepstakes \
  --form 'aff_campaign_name=Test CPA Campaign 8' \
  --form 'aff_campaign_url=https://testdomain.com/test1112?sid=[[subid]]&pubid=[[partner_id]]' \
  --form preview= \
  --form aff_campaign_payout=0.2 \
  --form aff_campaign_cap=250 \
  --form aff_campaign_hour_data=8-18 \
  --form category=mainstream \
  --form traffic_source=mainstream \
  --form in_app=allow \
  --form device=mobile \
  --form wifi=deny \
  --form country=GR \
  --form 'aff_campaign_carrier_data[]="GR VODAFONE"' \
  --form 'aff_campaign_carrier_data[]="GR WIND"' \
  --form 'aff_campaign_os_data[]=iOS' \
  --form 'aff_campaign_os_data[]=Android' \
  --form 'aff_campaign_browser_data[]=Chrome Mobile' \
  --form 'aff_campaign_browser_data[]=Chrome Mobile on iOS' \
  --form 'aff_campaign_language_data[]=en' \
  --form 'aff_campaign_language_data[]=el' \
  --form 'aff_campaign_partners_bl_data[]=1255' \
  --form promotional_comment= \
  --form lander_required=0 \
  --form lander_included=0 \
  --form 'settings[]=javascriptentry'

Response

Returns object with following attributes:

Attribute Type Description
status String

The status of the operation.

success - means that the campaign has been created successfully and pending approval.

error - means that some posted data was invalid. In that case the error attribute contains error messages.

error Array

This attribute is set only when status attribute is equal to error. It contains the array of error messages.

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The value of the action parameter is missing

400 Bad Request Unsupported action

The value of the action parameter is invalid.

Example Response

{
  "status": "success"
}

Example Error Response

{
  "message": "Unsupported action"
}

Delete a Campaign

 

Deletes a single campaign.

URL

https://api.monetizer.co/v2/AdvertiserArchiveOffer

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
id Integer Yes

The unique identifier of the campaign that is equal to the value of aff_campaign_id attribute of the Campaign Object.

Example Request

curl --request POST \
  --url https://api.monetizer.co/v2/AdvertiserArchiveOffer \
  --header 'accept: application/json' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --data id=476627

Response

Returns object with following attributes:

Attribute Type Description
status String

The status of the performed action.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

Unexpected error occurred during handling of request.

406 Not Acceptable No id parameter

The id parameter is not set.

304 Not Modified Some message that describes an error or empty string

Some database error occurred during handling of request or the campaign has been already deleted.

Example Response

{
  "status": "success"
}

Example Error Response

{
  "message": "No id parameter"
}

Get CPA Campaigns Limit

 

Returns the total number of CPA offers that advertiser can create this week.

URL

https://api.monetizer.co/data/advertiser-offers.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
action offerLimit Yes

Specifies the action to perform.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/data/advertiser-offers.php?action=offerLimit' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns object with following attributes:

Attribute Type Description
total Integer

The total number of CPA campaigns (offers) that advertiser can create this week.

increase_limit_request Integer

The number 0 or 1 that indicates whether the request for increasing weekly limit of new CPA campaigns (offers) is made.

weekly_limits Array

The array that contains the maximum numbers of CPA campaigns (offers) that you allowed to create in each geo group per week.

E.g. the value [10, 25] means that you allowed create 10 CPA campaigns in geo group 1 and 25 CPA campaigns in geo group 2 every week.

Note: You may get the list of countries in each geo group using Get Geo Groups action response.

limits Array

The array that contains the number of CPA campaigns (offers) that you can create in each geo group this week.

E.g. the value [9, 10] means that you may create 9 CPA campaigns in geo group 1 and 10 CPA campaigns in geo group 2 this week.

Note: You may get the list of countries in each geo group using Get Geo Groups action response.

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The value of the action parameter is missing

400 Bad Request Unsupported action

The value of the action parameter is invalid.

500 Internal Server Error Internal Server Error

An unexpected error has occurred

Example Response

{
  "total": 16,
  "weekly_limits": [
    10,
    25 
  ],
  "increase_limit_request": 0,
  "limits": [
    8,
    8
  ]
}

Example Error Response

{
  "message": "Unsupported action"
}

Get Campaigns

 

Returns the list of all campaigns (offers) for the calling advertiser.

URL

https://api.monetizer.co/data/advertiser-offers.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
action results Yes

Specifies the action to perform.

limit Integer No

Specifies the number of results to return per page. Default value is 100. If you want to obtain list of all your campaigns pass all value instead of number

page Integer No

Specifies the page number (0 based). Default value: 0.

order_field String No

Specifies the field that is used for sorting results. Allowed values: aff_campaign_id, created, offer_id (public hashed id), aff_campaign_name, geo, live_assignment_count, aff_campaign_payout (bid), cap, today_spend, today_leads, qs (quality score), rank, connection (connection type), vertical. Default value: aff_campaign_id in descending order.

order_direction Integer No

The number that specifies direction order. The value -1 means ascending order and 1 - descending order.

filter Object No

The object that specifies filter conditions. Only campaigns that match specified conditions are returned. See below for available attributes.

filter.id Integer No

Specifies id of campaign to return. Allows to obtain only specified campaign.

filter.search_term String No

If set to string that doesn’t begin with # then only campaigns with name that contain specified search term are returned, if set to string that begins with # then specifies the public hash id of campaign to return. For example: #a3c723.

filter.conversion_flow String No

Allows you to filter campaigns by conversion flow. Allowed values: cpa, direct_offers, in_app, pops_rtb, cpc.

filter.status String No

Allows you to filter campaigns by status. Allowed values: live, pending, rejected. If this filter is not set then campaigns with all statuses are returned.

spendTimeFrame Object No

Specifies time frame that is used to calculate spend and leads values in response. By default the timeframe is current date.

spendTimeFrame.from_ts Integer Yes

The Unix timestamp that specifies the start of the time frame. Default value is equal to the beginning of the current day.

spendTimeFrame.to_ts Integer No

The Unix timestamp that specifies the end of the time frame. Default value is equal to current timestamp.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/data/advertiser-offers.php?action=results&limit=20&page=0&order_field=aff_campaign_id&order_direction=-1&filter%5Bstatus%5D=live&filter%5Bconversion_flow%5D=cpa&spendTimeFrame%5Bfrom_ts%5D=1594481636' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of campaign objects with following attributes:

Attribute Type Description
aff_campaign_id Integer

The unique identifier of the campaign.

aff_campaign_id_public Integer

Public unique identifier of the campaign.

aff_campaign_payout Numeric String

The campaign’s payout (Bid).

aff_network_id Integer

You may ignore this value. (deprecated)

aff_campaign_name String

The name of the campaign.

network String

The unique name of the advertiser (aka network) who owns this campaign.

aff_campaign_partners_wl_data Array

The list (array) of whitelisted partners (publishers) ids

format_created String

The date when campaign was created, formatted as ‘%b %D, %Y’.

wifi String

Indicates the type of connection that the campaign is targeting. Possible values are only - only wifi, deny - not wifi (cellular), allow - all types.

assignment_count Numeric String

The number of assignments that is created for this campaign. A typical campaign only has 1 assignment.

live_assignment_count Numeric String

The number of active (not paused) assignments.

paused_assignment_count Numeric String

The number of paused assignments.

offer_id String

The public campaign’s (offer’s) hash id.

cap Numeric String

The cap of the campaign that is defined in leads per day.

geo String

ISO 3166 alpha-2 two-character code of the country that offer is targeted to.

vertical String

The name of the campaign’s vertical.

pwl Integer

The number 0 or 1 that indicates whether publisher whitelist is set for this campaign or not. 1 - means yes.

unpausable Numeric String

The number "0" or "1" that indicates whether campaign can be unpaused by advertiser (owner) or not. "1" - means yes.

conversion_flow String

The conversion flow of the campaign (offer).

assignment_id Integer

The unique id of the assignment that is created for this campaign (offer).

today_spend Numeric amount

The amount that was spent on the campaign for specified spend time frame. See spendTimeFrame query param.

today_leads Numeric amount

The number of campaign’s leads (clicks for cpc campaigns) for specified spend time frame. See spendTimeFrame query param.

qs Float or null

The quality score of the campaign. (Multiply it by 100% to get a percentage CPA score value of the campaign)

rank Float or null

The rank of the campaign.

target_bid or null Float

The campaign’s target bid.

target_epc Float

The campaign’s target EPC.

max_epc Float

The maximum value of campaign’s EPC.

edit_ts String

For now this value always is equal to empty string ("").

edit_status String

For now this value always is equal to empty string ("").

status String

The status of the campaign.

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The value of the action parameter is missing

400 Bad Request Unsupported action

The value of the action parameter is invalid.

500 Internal Server Error Internal Server Error

An unexpected error has occurred

Example Response

[
  {
    "aff_campaign_id": 412980,
    "aff_campaign_id_public": 24129807,
    "aff_campaign_payout": "0.08000",
    "aff_network_id": 12542,
    "aff_campaign_name": "Test CPA Campaign 4",
    "network": "TestNetwork",
    "aff_campaign_partners_wl_data": [
      "14144"
    ],
    "format_created": "Jan 10th, 2020",
    "wifi": "only",
    "assignment_count": 1,
    "live_assignment_count": "1",
    "paused_assignment_count": "0",
    "offer_id": "b9881c",
    "cap": 0,
    "geo": "UA",
    "vertical": "mainstream_desktop",
    "pwl": 1,
    "unpausable": "0",
    "conversion_flow": "direct_offer",
    "assignment_id": 1039411,
    "today_spend": 0,
    "today_leads": 0,
    "qs": null,
    "rank": null,
    "target_bid": null,
    "target_epc": null,
    "max_epc": null,
    "edit_ts": "",
    "edit_status": "",
    "status": "Running"
  }
]

Example Error Response

{
  "message": "Unsupported action"
}

Get Campaigns Count

 

Returns the number of campaigns (offers) for the calling advertiser.

URL

https://api.monetizer.co/data/advertiser-offers.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
action results Yes

Specifies the action to perform.

count true Yes

This parameter is required to return the number of the campaigns.

filter Object No

The object that specifies filter conditions. Only campaigns that match specified conditions are counted. See below for available attributes.

filter.id Integer No

Specifies id of campaign to count.

filter.search_term String No

If set to string that doesn’t begin with # then only campaigns with name that contain specified search term are counted, if set to string that begins with # then specifies the public hash id of campaign. For example: #a3c723.

filter.conversion_flow String No

Allows you to filter campaigns by conversion flow. Allowed values: cpa, direct_offers, in_app, pops_rtb, cpc.

filter.status String No

Allows you to filter campaigns by status. Allowed values: live, pending, rejected. If this filter is not set then campaigns with all statuses are counted.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/data/advertiser-offers.php?action=results&count=true&filter%5Bconversion_flow%5D=cpa' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Response contains array with single object which total attribute is equal to the number of campaigns that satisfy query conditions.

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The value of the action parameter is missing

400 Bad Request Unsupported action

The value of the action parameter is invalid.

500 Internal Server Error Internal Server Error

An unexpected error has occurred

Example Response

[
  {
    "total": 3
  }
]

Example Error Response

{
  "message": "Unsupported action"
}

Get Campaigns Reliability Scores

 

Returns the scores that can be used to estimate the reliability of specified campaigns (offers). The higher the score, the lower the reliability. If the score for some campaign will not be returned, then you should treat it like the score is equal to 0.

The score value returned by this endpoint is used by the UI to compute the Uptime value displayed on Campaigns page. The Uptime score is shown to our publishers. It estimates of how often your campaign is paused, resumed, and outage occurs. Lower uptime values, attract less traffic, as publishers require stability.

The Uptime is calculated by the formula:

If 100% - 5% * Score > 0%, then Uptime = 100% - 5% * Score, where Score is the reliability score returned by this action;

If 100% - 5% * Score < 0%, then Uptime = 0%;

If reliability score for the specified campaign (offer) is undefined, then uptime value is equal to 100%.

URL

https://api.monetizer.co/v3/offerReliabilityPoints.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
assignment_id Array | Integer Yes

Specifies the ID(s) of the offer assignment(s).

The offer assignment ID can be obtained from the assignment_id attribute of Get Campaigns or Get a Campaign action responses.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v3/offerReliabilityPoints.php?assignment_id%5B%5D=1130250&assignment_id%5B%5D=1211597&assignment_id%5B%5D=1211754' \
  --header 'Accept: application/json' \
  --header 'X_AFFLOW_ADVERTISER_ACCESS_TOKEN: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
score Numeric String

The reliability score of the campaign (offer) with specified offer assignment ID.

object_id Numeric String

The campaign (offer) assignment ID.

Errors

HTTP Status Code Message Description
Internal Server Error No DB

Some database connection error.

Example Response

[
  {
    "score": "11.4001",
    "object_id": "1211597"
  },
  {
    "score": "7.9000",
    "object_id": "1211754"
  }
]

Example Error Response

{
  "message": "No DB"
}   

Get Geo Groups

 

Returns the list of ISO 3166 alpha-2 country codes in upper case for each Geo Group.

URL

https://api.monetizer.co/v3/geoGroups.php

Requires Auth

Yes

Example Request

curl --request GET \
  --url https://api.monetizer.co/v3/geoGroups.php \
  --header 'Accept: application/json' \
  --header 'X_AFFLOW_ADVERTISER_ACCESS_TOKEN: <Your access token>'

Response

Returns an object each attribute (key) of which is the number of geo group and value is the list of ISO 3166 alpha-2 country codes in upper case of countries that this group consists of.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

An unexpected error has occurred.

Example Response

{
  "1": [
    "AE",
    "BD",
    "BR",
    "DE",
    ...
  ],
  ...
}

Example Error Response

{
  "message": "Server error. Error ID: 81a4b134"
}

Get a Campaign

 

Returns the specified campaign (offer).

URL

https://api.monetizer.co/data/advertiser-offers.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
action offer Yes

Specifies the action to perform.

id Integer Yes

The public id of campaign (offer).

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/data/advertiser-offers.php?action=offer&id=24129807' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns object with following attributes:

Attribute Type Description
aff_campaign_id Integer

The unique identifier of the campaign.

aff_campaign_id_public Integer

The public unique identifier of the campaign.

offer_id String

The public campaign’s (offer’s) hash id.

aff_campaign_url String

The URL of the campaign.

aff_campaign_payout Numeric String

The payout in USD of the campaign.

unsafe Integer

The number 0 or 1 that indicates whether the campaign is unsafe or not.

private Integer

The number 0 or 1 that indicates whether the campaign is private or not.

wifi String

Indicates the type of connection that the campaign is targeting. Possible values are only - only wifi, deny - not wifi (cellular), allow - all types.

device String

The device that the campaign is targeting. Possible values are mobile, desktop, all.

traffic_source String

The traffic source of campaign (makes sense only for CPA campaigns). Possible values are mainstream, adult, any.

scale Numeric String

The payout scaling of the campaign. Default value is 1.00000.

network String

The unique name of the advertiser (aka network) who owns this campaign.

aff_campaign_time Integer

The campaign creation time as Unix timestamp.

aff_campaign_carrier_data String or null

The list of carriers as JSON string that the campaign is targeting.

aff_campaign_os_data String or null

The list of Operating Systems as JSON string that the campaign is targeting.

aff_campaign_browser_data String or null

The list of browsers as JSON string that the campaign is targeting.

aff_campaign_partners_bl_data String or null

The campaign’s partners (publishers) blacklist as JSON string.

aff_campaign_partners_wl_data String or null

The campaign’s partners (publishers) whitelist as JSON string.

aff_campaign_language_data String or null

The list of ISO 639-1 language codes as JSON string that the campaign is targeting.

aff_campaign_hour_data String

The campaign’s day parting. This attribute specifies hours when campaign should run. For example the value: '10-18,20' means that campaign is running from 10:00 to 18:59 and from 20:00 to 20:59.

aff_campaign_cap Integer

The cap of the campaign that is defined in leads per day.

created String

The campaign creation time in format 'YYYY-MM-DD hh:mm:ss'.

conversion_flow String

The conversion flow of the campaign.

campaign_settings Array

The list of campaigns additional settings. Possible array values: javascriptentry, exitpop, aggressiveantivirus, copyrightmaterial.

preview_url String

The URL of landing page or campaign (offer) page preview image.

archived Integer

The number 0 or 1 that indicates whether the campaign is archived or not.

payout_last_changed Integer

The last time when payout was changed as Unix timestamp.

public_id_hash Integer

Public id hash of the campaign.

app_blacklist_data String or null

The campaign’s app blacklist as JSON string.

app_whitelist_data String or null

The campaign’s app whitelist as JSON string.

in_app String

Specifies what to do with WebView traffic. Possible values: 'allow', 'deny', 'only'.

promotional_comment String

The campaign’s promotional comment.

lander_required Integer

The number 0 or 1 that indicates whether the lander is required for campaign or not.

lander_included Integer | Null

The number 0 or 1 that indicates whether you using a landing page for this campaign or not.

aff_campaign_geo String

The ISO 3166 alpha-2 country code that campaign is targeting. (deprecated)

aff_campaign_vertical String

The vertical of the campaign.

rejection_reason String

If campaign is rejected this attribute contains rejection reason.

assignments Array

Array of Assignment objects.

tags Array

Array of tags assigned to the campaign. (This attribute is set only for CPA campaigns).

tag String

Tag (Category) of the private campaign. (This attribute is set only for private campaigns).

payout_increases Array

Array of Payout Increase objects.

Assignment Object

Represents the offer assignment related to campaign (offer).

Attribute Type Description
assignment_id Integer

The unique id of the offer assignment.

name String

The ISO 3166 alpha-2 country code that specifies the country that offer assignment (and campaign) is targeting.

vertical String

The vertical of the offer assignment. (Actually for most campaigns this is vertical of the campaign.)

paused Integer

The number 0 or 1 that indicates whether the offer assignment is paused or not. The regular campaign has only one offer assignment and when this assignment is paused the campaign is not active (not running).

paused_by Integer

The integer number that indicates the reason why the offer assignment was paused. (You may ignore the value 2).

Payout Increase Object

Describes the campaign payout increase (bump) for specified publisher.

Attribute Type Description
publisher_id Integer

The unique identifier of the publisher.

adjustment Numeric String

Specifies the bump amount for specified publisher. For example the value 1.250000000 means that payout increased by 25%.

share Numeric String

The publisher share in %. For example the value 80.00 means 80%.

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The value of the action parameter is missing

400 Bad Request Unsupported action

The value of the action parameter is invalid.

400 Bad Request `id` is required

The id parameter is not set or is invalid.

500 Internal Server Error Internal Server Error

An unexpected error has occurred

Example Response

{
  "aff_campaign_id": 412980,
  "aff_campaign_id_public": 24129807,
  "offer_id": "b9881c",
  "aff_campaign_name": "Test CPA Campaign 4",
  "aff_campaign_url": "https:\/\/nocapped.net\/0d4f7c61-2a48-4510-8b8c-d0b69afdd842?partner_id=[[partner_id]]&pid=[[pid]]&var={var}&v4={v4}&amount=[[amount]]&subid=[[subid]]",
  "aff_campaign_payout": "0.08000",
  "unsafe": 0,
  "private": 0,
  "wifi": "only",
  "device": "desktop",
  "traffic_source": "any",
  "scale": "1.00000",
  "network": "TestNetwork",
  "aff_campaign_time": 1578651684,
  "aff_campaign_carrier_data": null,
  "aff_campaign_os_data": null,
  "aff_campaign_browser_data": null,
  "aff_campaign_partners_bl_data": null,
  "aff_campaign_partners_wl_data": "[\"14144\"]",
  "aff_campaign_language_data": null,
  "aff_campaign_hour_data": "0-1,10-18,20,22",
  "aff_campaign_cap": 0,
  "created": "2020-01-10 12:21:24",
  "conversion_flow": "direct_offer",
  "campaign_settings": [],
  "preview_url": "https:\/\/api.monetizer.co\/offer_preview\/12542_1578658418.3992.png",
  "archived": 0,
  "payout_last_changed": 1578658860,
  "public_id_hash": 1529416587,
  "aff_campaign_geo": "UA",
  "aff_campaign_vertical": "mainstream_desktop",
  "app_blacklist_data": null,
  "app_whitelist_data": null,
  "in_app": "allow",
  "promotional_comment": null,
  "lander_required": 0,
  "lander_included": 0,
  "pixel_status": "OK",
  "pixel_url": "http:\/\/inbound.pixeltestlink.com\/?utm_medium=e9c715253e0e8a717a07f44cc829a15550fc06a5&utm_campaign=pixel-test",
  "assignments": [
    {
      "assignment_id": 1039411,
      "name": "UA",
      "vertical": "mainstream_desktop",
      "paused": 0,
      "paused_by": 2
    }
  ],
  "tag": "Nutra",
  "payout_increases": [
    {
      "publisher_id": 14144,
      "adjustment": "1.250000000",
      "share": "80.00"
    }
  ]
}

Example Error Response

{
  "message": "`id` is required"
}

Increase CPA Campaigns Limit

 

Makes a request to increase the weekly limit of new CPA Campaigns that the advertiser can create.

The CPA Campaigns Limit will be increased only after the request will be approved by admin.

URL

https://api.monetizer.co/data/advertiser-offers.php

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action requestOfferLimit Yes

Specifies the action to perform.

Example Request

curl --request POST \
  --url https://api.monetizer.co/data/advertiser-offers.php \
  --header 'accept: application/json' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --data action=requestOfferLimit

Response

Returns object with following attributes:

Attribute Type Description
status String

The status of the operation. The success value means that request has been successfully sent to admins.

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The value of the action parameter is missing

400 Bad Request Unsupported action

The value of the action parameter is invalid.

500 Internal Server Error Internal Server Error

An unexpected error has occurred

Example Response

{
  "status": "success"
}

Example Error Response

{
  "message": "Unsupported action"
}

Pause a Campaign

 

Pauses the advertiser’s campaign (offer) with given id.

URL

https://api.monetizer.co/data/advertiser-offers.php

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action pauseOffer Yes

Specifies the action to perform.

id Integer Yes

The id of the campaign that should be paused. You should use the value of the aff_campaign_id attribute from “Get a Campaign” or “Get Campaigns” responses.

pauseReason Integer Yes

The number that specifies pause reason.

Supported values:

  • 0 - temporarily paused
  • 1 - technical issue / maintenance
  • 2 - bad quality
  • 3 - no performance
  • 4 - offer offline

Example Request

curl --request POST \
  --url https://api.monetizer.co/data/advertiser-offers.php \
  --header 'accept: application/json' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --data action=pauseOffer \
  --data id=412980 \
  --data 'pauseReason=0'

Response

Returns object with following attributes:

Attribute Type Description
status String

Status of the operation.

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The value of the action parameter is missing

400 Bad Request Unsupported action

The value of the action parameter is invalid.

400 Bad Request `id` is required

The id parameter is not set or is invalid.

400 Bad Request Please provide a pause reason.

The pauseReason parameter is not provided.

500 Internal Server Error Internal Server Error

An unexpected error has occurred

Example Response

{
  "status": "success"
}

Example Error Response

{
  "message": "`id` is required"
}

Resume a Campaign

 

Resumes (unpauses) the advertiser’s campaign (offer) with the given id.

URL

https://api.monetizer.co/data/advertiser-offers.php

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action unpauseOffer Yes

Specifies the action to perform.

id Integer Yes

The id of the campaign that should be resumed. You should use the value of the aff_campaign_id attribute from “Get a Campaign” or “Get Campaigns” responses.

Example Request

curl --request POST \
  --url https://api.monetizer.co/data/advertiser-offers.php \
  --header 'accept: application/json' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --data action=unpauseOffer \
  --data id=412980

Response

Returns object with following attributes:

Attribute Type Description
status String

Status of the operation.

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The value of the action parameter is missing

400 Bad Request Unsupported action

The value of the action parameter is invalid.

400 Bad Request `id` is required

The id parameter is not set or is invalid.

400 Bad Request Invalid campaign

The campaign with provided id parameter is not found or does not belong to calling advertiser.

400 Bad Request No Assignments found for specified campaign

No Assignments found for the campaign with specified identifier.

406 Not Acceptable Unable to check offer: ...

Unable to check campaign (offer) due to some reason.

406 Not Acceptable Carrier or WiFi targeting conflicts with other live offers: ...

Unable to resume campaign due to conflicts with other live offers.

406 Not Acceptable Offer can not be unpaused.

It means that specified offer can not be resumed due to some reason, for example, it may be rejected by admin.

500 Internal Server Error Internal Server Error

An unexpected error has occurred

Example Response

{
  "status": "success"
}

Example Error Response

{
  "message": "Invalid campaign"
}

Update Payout Increases

 

Increases payouts to the specified publishers for the specified campaign.

Decreasing payouts on approved Advertizer campaigns is not allowed. This harms our publishers because decreasing payouts makes it impossible to scale as a Media Buyer.
If you want to lower the payout, please pause the campaign and submit new.

URL

https://api.monetizer.co/data/advertiser-offers.php

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action updatePayoutIncreases Yes

Specifies the action to perform.

id Integer Yes

The unique public identifier of the campaign. You should use the value of the aff_campaign_id_public attribute from “Get a Campaign” or “Get Campaigns” responses.

payouts String Yes

The array of payout increase objects encoded as JSON string.

Every payout increase object should have partner_id attribute set to publisher ID and amount attribute set to value that specify the payout increase.

For example, to increase payout for publisher with ID = 12 by 20% you should provide: [{"partner_id":12,"amount":1.2}]

Please note that objects with invalid partner_id parameter or with amount parameter lesser than 1 or lesser than current publisher’s payout increase will be ignored.

Use “Validate a Publisher ID” action to check if some partner_id value is valid.

Example Request

curl --request POST \
  --url https://api.monetizer.co/data/advertiser-offers.php \
  --header 'accept: application/json' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --data action=updatePayoutIncreases \
  --data id=24129807 \
  --data 'payouts=[{"partner_id":14144,"amount":1.1},{"partner_id":14145,"amount":1.25}]'

Response

Returns object with following attributes:

Attribute Type Description
status String

The status of the operation. Possible values: 'success' - operation has been performed successfully, 'nothing changed' - nothing has changed because no correct payout increase was specified in the request.

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The value of the action parameter is missing

400 Bad Request Unsupported action

The value of the action parameter is invalid.

400 Bad Request `id` is required

The id parameter is not set.

400 Bad Request `payouts` is required

The payouts parameter is not set.

400 Bad Request `payouts` is invalid

The payouts parameter is invalid.

400 Bad Request Invalid campaign id

The id parameter is invalid. You don’t have campaign with provided id value.

Example Response

{
  "status": "success"
}

Example Error Response

{
  "message": "`payouts` is required"
}

Update a campaign

 

Updates an existing campaign (offer).

URL

https://api.monetizer.co/data/advertiser-offers.php

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action updateOffer Yes

Specifies the action to perform.

id Integer Yes

The public id of the campaign that is equal to value of aff_campaign_id_public attribute of Campaign object.

conversion_flow String Yes

Specifies the conversion flow of campaign and/or type of the campaign.

Important: You should provide the current conversion_flow value of the campaign, because for now it is not allowed to change conversion flow or type of existing campaign.

tag String No

This parameter is required for Private CPA campaign and should not be provided for other types of campaigns.

Supported values: Adult, APK, Cash On Delivery, Crypto, CPI, Click2Call, Casino, Credit Card Submit, CPL, Dating, E-Commerce, Mobile Content, Nutra, Push CPS, Other.

aff_campaign_name String Yes

The name of the campaign.

tags Array No

The array of tags of the campaign. Max number of allowed tags is equal to 3. This parameter is supported only for CPA campaigns with conversion_flow that is equal to any of the following: carrierbilling, leadgen, sweepstakes or cpi.

Supported values depends on specified converstion flow:

  • carrierbilling: 1 click, 2 clicks, Click2SMS, Pin Flow, MO Flow, IVR/Click to call
  • leadgen or sweepstakes: Amazon, Iphone, Samsung, Ikea, Supermarkets
  • cpi: Gaming, Utility (Antivirus,Cleaner), VPN, Video, Dating, Travel, Finance
aff_campaign_url String Yes

The URL of the campaign (offer). This URL should include https:// and the following Monetizer placeholders:

  • [[subid]] is used for our unique clickid per visitor (posted back to us in case of a conversion ) (mandatory)
  • [[partner_id]] is the publisher id in our system (mandatory);
  • [[pid]] is the placement id in our system, allowing you to block on a placement level rather than a publisher level (optional);
  • [[campaign_id]] is the public hash ID or your campaign;

Important: Changing the url will require re-approval of the campaign.

aff_campaign_payout Float Yes

The payout (bid) of the campaign in US dollars.

It should be greater than minumum allowed bid for targeted country. See how to obtain minumum bid value here.

For In-App campaigns the payout also have to be lesser than value of max_cpc_bid attribute from “Get an Account Data” response. The the default value of max_cpc_bid is $0.01.

Note: Campaign payouts cannot be reduced. If you want to decrease a payout then delete current campaign and create new with lesser payout value.

aff_campaign_cap Integer No

The number of leads per day that campaign accepts. Minimum cap for In-App campaigns is 1000.

Note: If you don’t provide the value, the campaign’s cap will be changed to 0, which means no cap.

aff_campaign_hour_data String No

The campaign’s day parting. This parameter specifies hours when campaign should run. For example the value: 10-18,20 means that campaign is running from 10:00 to 18:59 and from 20:00 to 20:59.

Note: if you don’t provide the value, the campaign’s day parting will be set to null (no restrictions).

category String Yes

The category of the campaign (offer). Allowed values: mainstream, adult.

Important: You should provide the current category value of the campaign, because for now it is not allowed to change the category.

in_app String Yes

Specifies what to do with WebView traffic. Allowed values are allow, deny, only.

device String Yes

The device that the campaign is targeting. Allowed values are mobile, desktop, all.

wifi String Yes

Specifies the type of connection that the campaign is targeting. Allowed values are only - only wifi, deny - not wifi (cellular), allow - all types.

Important: You should provide the current wifi value of the campaign, because for now it is not allowed to change the connection type.

country String Yes

The ISO 3166 alpha-2 country code in upper case that campaign is targeting.

Important: You should provide the current country value of the campaign, because changing country targetting isn’t currently allowed for existing campaigns.

Your account may be restricted from running campaigns targetting some countries. Please see geo_blacklist in “Get an Account Data”.

aff_campaign_carrier_data Array No

The carriers (connection providers) that the campaign is targeting. See how to obtain list of supported carriers here.

Note: If you don’t provide the value of this parameter then the default value null will be used.

aff_campaign_os_data Array No

The list of operating systems that the campaign is targeting. See how to obtain list of supported operating systems here.

Note: If you don’t provide the value of this parameter then the default value null will be used.

aff_campaign_browser_data Array No

The list of browsers that the campaign is targeting. See how to obtain list of supported browsers here.

Note: If you don’t provide the value of this parameter then the default value null will be used.

aff_campaign_language_data Array No

The list of ISO 639-1 language codes in lower case that the campaign is targeting.

Note: If you don’t provide the value of this parameter then the default value null will be used.

aff_campaign_partners_bl_data Array No

The publisher blacklist represented as an array of publisher IDs. You should not specify this parameter for the private campaign (direct offer).

Note: If you don’t provide the value of this parameter then the default value null will be used.

aff_campaign_partners_wl_data Array No

The publisher whitelist represented as an array of publisher IDs.

Note: If you don’t provide the value of this parameter for not private campaign then the default value null will be used. For private campaign it is not allowed to change the whitelisted (target) publisher.

lander_required Integer No

The number 0 or 1 that indicates whether the lander is required for campaign or not. You should specify this parameter only for private campaigns (direct offers).

lander_included Integer No

The number 0 or 1 that indicates whether you using a landing page for this campaign or not. You should scecify this parameter for all campaigns except private campaigns (direct offers).

app_blacklist_data Array No

The app blacklist. It should only be specified for In-App Campaigns. See here how to obtain the supported list of apps.

Note: If you don’t provide the value of this parameter then the default value null will be used.

app_whitelist_data Array No

The app whitelist. It should only be specified for In-App Campaigns. See here how to obtain the supported list of apps.

Note: If you don’t provide the value of this parameter then the default value null will be used.

payout_increase_data String No

The array of payout increase objects encoded as JSON string. This parameter may be specified only for CPA campaigns.

Every payout increase object should have partner_id attribute set to publisher ID and amount attribute set to a value that specify the payout increase.

For example, to increase payout for publisher with ID = 12 by 20% you should provide: [{"partner_id":12,"amount":1.2}]

Please note that objects with invalid partner_id parameter or with amount parameter lesser than 1 or lesser than current publisher’s payout increase will be ignored.

Use “Validate a Publisher ID” action to check if some partner_id value is valid. Also see “Update Payout Increases”.

Example Request

curl --request POST \
  --url https://api.monetizer.co/data/advertiser-offers.php \
  --header 'accept: application/json' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --form action=updateOffer \
  --form id=14766164 \
  --form conversion_flow=sweepstakes \
  --form 'aff_campaign_name=Test CPA Campaign 8 edited' \
  --form 'aff_campaign_url=https://testdomain.com/test1112?sid=[[subid]]&pubid=[[partner_id]]' \
  --form aff_campaign_payout=0.24 \
  --form aff_campaign_cap=300 \
  --form aff_campaign_hour_data=8-18 \
  --form category=mainstream \
  --form in_app=allow \
  --form device=mobile \
  --form wifi=deny \
  --form country=GR \
  --form 'aff_campaign_carrier_data[]="GR VODAFONE"' \
  --form 'aff_campaign_carrier_data[]="GR WIND"' \
  --form 'aff_campaign_os_data[]=iOS' \
  --form 'aff_campaign_os_data[]=Android' \
  --form 'aff_campaign_browser_data[]=Chrome Mobile' \
  --form 'aff_campaign_browser_data[]=Chrome Mobile on iOS' \
  --form 'aff_campaign_language_data[]=en' \
  --form 'aff_campaign_language_data[]=el' \
  --form 'aff_campaign_partners_bl_data[]=1255' \
  --form lander_included=0 \

Response

Returns object with following attributes:

Attribute Type Description
status String

The status of the operation.

success - means that the campaign has been updated successfully.

error - means that some posted data was invalid. In that case the error attribute contains error messages.

error Array

This attribute is set only when status attribute is equal to error. It contains the array of error messages.

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The value of the action parameter is missing

400 Bad Request Unsupported action

The value of the action parameter is invalid.

400 Bad Request Unable to check offer: ...

The offer can’t be updated due to the reason, that is explained in the message.

Example Response

{
  "status": "success"
}

Example Error Response

{
  "message": "Unsupported action"
}

Get Campaigns Reports

 

Returns reports for your campaigns.

URL

https://api.monetizer.co/data/advertiser-vertical-geo-hourly.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
type String Yes

The type of the report.

Supported values:

  • overall - the overall report for all your campaigns by date;
  • campaign - the reports for each campaign by date;
  • bid - the reports by bid type.
start_ts String Yes

The start date of the report’s timeframe in format YYYY-MM-DD.

The start date can’t specify the date earlier than 45 days ago.

end_ts String Yes

The end date of the report’s timeframe in format YYYY-MM-DD

vertical String No

The vertical filter value. See how to obtain available vertical values here.

geo String No

The country filter in ISO 3166 alpha-2 (uppercase) format.

breakdown yes No

If this parameter is set then hourly breakdown is performed.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/data/advertiser-vertical-geo-hourly.php?type=overall&start_ts=2020-08-24&end_ts=2020-08-27' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
start_ts String

The date in the format YYYY-MM-DD.

clicks Numeric String

The number of clicks.

spend Numeric String

The amount in USD that was spend.

leads Numeric String

The number of leads.

cvr Numeric String

The conversion rate.

ecpm Numeric String

The eCPM value.

data_field Mixed

The value of this attribute depends on the requested report’s type.

When type is equal to overall then it will be timestamp of the start of the hour interval when data was aggregated. (America/New_York timezone)

When type is equal to campaign then it will be equal to the string that contains the campaign’s name and campaign’s hash ID.

When type is equal to bid then it will be equal to the conversion flow value of the campaign.

timestamp Integer

The timestamp of the start of the aggregation interval. (America/New_York timezone)

Errors

HTTP Status Code Message Description
400 Bad Request Report type required

The type parameter is not set. Please provide correct report type.

400 Bad Request Time frame required

The start_ts or/and end_ts parameters are not provided.

400 Bad Request Invalid time frame

The start_ts or/and end_ts parameters are invalid.

Example Response

[
  {
    "start_ts": "2020-08-24",
    "clicks": "6060",
    "spend": "30.56",
    "leads": "109",
    "cvr": "1.7987",
    "ecpm": "5.042904",
    "data_field": 1598292000,
    "timestamp": 1598292000
  },
  {
    "start_ts": "2020-08-25",
    "clicks": "5030",
    "spend": "6.16",
    "leads": "77",
    "cvr": "1.5308",
    "ecpm": "1.224652",
    "data_field": 1598328000,
    "timestamp": 1598328000
  },
  {
    "start_ts": "2020-08-26",
    "clicks": "9600",
    "spend": "45.36",
    "leads": "147",
    "cvr": "1.5313",
    "ecpm": "4.725000",
    "data_field": 1598414400,
    "timestamp": 1598414400
  },
  {
    "start_ts": "2020-08-27",
    "clicks": "9000",
    "spend": "29.80",
    "leads": "110",
    "cvr": "1.2222",
    "ecpm": "3.311111",
    "data_field": 1598500800,
    "timestamp": 1598500800
  }
]

Example Error Response

{
  "message": "Report type required"
}

Get Push Campaigns Reports

 

Returns reports for your push campaigns.

URL

https://api.monetizer.co/data/advertiser-push-billing-data.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
type String Yes

The type of the report.

Supported values:

  • overall - the overall report for all your push campaigns by date;
  • campaign - the reports for each push campaign by date;
start_ts String Yes

The start date of the report’s timeframe in format YYYY-MM-DD.

The start date can’t specify the date earlier than 45 days ago.

end_ts String Yes

The end date of the report’s timeframe in format YYYY-MM-DD

geo String No

The country filter in ISO 3166 alpha-2 (uppercase) format.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/data/advertiser-push-billing-data.php?type=overall&start_ts=2020-08-24&end_ts=2020-08-27' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
start_ts String

The date in the format YYYY-MM-DD.

push_clicks Numeric String

The number of clicks.

spend Numeric String

The amount in USD that was spend.

pushes Numeric String

The number of pushes.

push_cvr Numeric String

The conversion rate.

data_field Mixed

The value of this attribute depends on the requested report’s type.

When type is equal to overall then it will be timestamp of the start of the hour interval when data was aggregated. (America/New_York timezone)

When type is equal to campaign then it will be equal to the string that contains the campaign’s name and campaign’s ID.

Errors

HTTP Status Code Message Description
400 Bad Request Report type required

The type parameter is not set. Please provide correct report type.

400 Bad Request Time frame required

The start_ts or/and end_ts parameters are not provided.

400 Bad Request Invalid time frame

The start_ts or/and end_ts parameters are invalid.

Example Response

[
  {
    "start_ts": "2020-08-24",
    "push_clicks": "23",
    "spend": "0.0280",
    "pushes": "3500",
    "push_cvr": "0.6571",
    "data_field": 1598292000
  },
  {
    "start_ts": "2020-08-25",
    "push_clicks": "44",
    "spend": "0.0510",
    "pushes": "5100",
    "push_cvr": "0.8627",
    "data_field": 1598328000
  },
  {
    "start_ts": "2020-08-26",
    "push_clicks": "35",
    "spend": "0.0400",
    "pushes": "4000",
    "push_cvr": "0.8750",
    "data_field": 1598414400
  },
  {
    "start_ts": "2020-08-27",
    "push_clicks": "41",
    "spend": "0.0450",
    "pushes": "5500",
    "push_cvr": "0.7455",
    "data_field": 1598500800
  }
]

Example Error Response

{
  "message": "Time frame required"
}

Get a Campaign Report

 

Returns a campaign report for one of your campaigns.

You should specify the ID of the campaign, the type of the report and the time range.

URL

https://api.monetizer.co/v3/advertiserCampaignReport.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
id Integer Yes

The ID of the campaign that is equal to the value of the aff_campaign_id attribute of the response of “Get a Campaign” action.

type String Yes

The type of the report.

Supported values:

  • overall - the report includes overall hourly stats data grouped by time.
  • pid - the report includes stats data grouped by PID and time.
  • publisher_id - the report includes stats data grouped by publisher ID and time.
  • carrier - the report includes stats data grouped by carrier and time.
timeframe Integer No

The number of past hours that should be included in the report. The upper limit is 720 (720 hours is equal to 30 days).

Note: if timeframe is lesser than 72 then data grouped by hourly intervals, otherwise the data grouped by date.

startTs Integer No

The Unix timestamp of the start of the time range. The lower limit is 31 days ago.

Note: if length of the date range specified by startTs and endTs is lesser than 72 hours then data grouped by hourly intervals, otherwise the data grouped by date.

endTs Integer No

The Unix timestamp of the end of the time range.

Note: if length of the date range specified by startTs and endTs is lesser than 72 hours then data grouped by hourly intervals, otherwise the data grouped by date.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v3/advertiserCampaignReport.php?id=412980&type=overall&timeframe=48' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
start_ts Integer

The timestamp of the hour interval.

clicks Numeric String

The number of clicks.

spend Numeric String

The amount that was spend in USD.

leads Numeric String

The number of leads.

cvr Numeric String

The conversion rate in percents.

ecpm Numeric String

The eCPM value.

data_field String

If the type parameter of the request is equal to overall then the value of this attribute is the same as the value of start_ts attribute.

If the type parameter of the request is equal to pid then this attribute is equal to the PID.

If the type parameter of the request is equal to publisher_id then this attribute is equal to the ID of the publisher.

If the type parameter of the request is equal to carrier then this attribute is equal to the carrier value.

Errors

HTTP Status Code Message Description
400 Bad Request Campaign ID required

The id parameter is not set.

400 Bad Request Report type required

The type parameter is not set.

400 Bad Request Time frame required

The timeframe parameter or startTs and endTs parameters are not provided.

400 Bad Request Invalid ID parameter

The id parameter is not valid.

400 Bad Request Invalid timeframe parameter.

The provided timeframe value is not valid. Please use integer value from 1 to 720 (inclusive).

400 Bad Request Invalid startTs parameter.

The provided startTs value is not valid. Please use Unix timestamp not older than 31 days ago.

400 Bad Request Invalid type parameter.

The provided type value is not valid.

404 Not Found Campaign not found

The campaign with specified ID not found or some database error occured.

400 Bad Request Not your campaign

The specified campaign is not yours.

Example Response

[
  {
    "start_ts": 1599026400,
    "clicks": "20",
    "spend": "0.08",
    "leads": "1",
    "cvr": "5.0000",
    "ecpm": "4.000000",
    "data_field": 1599026400
  },
  {
    "start_ts": 1599030000,
    "clicks": "22",
    "spend": "0.08",
    "leads": "1",
    "cvr": "4.5455",
    "ecpm": "3.636363",
    "data_field": 1599030000
  },
  ...
]

Example Error Response

{
  "message": "Campaign ID required"
}

Get a Push Campaign PID Report

 

Returns a breakdown by date and PID (or publisher ID) of stats of the specified push campaign for the calling advertiser.

URL

https://api.monetizer.co/v3/pushPidScoreboard.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
id Integer Yes

The ID of the push campaign.

type String Yes

The type of the report.

Supported values:

  • pid - returns a breakdown by date and PID of stats of the specified campaign;
  • publisher_id - returns a breakdown by date and publisher ID of stats of the specified campaign;
timeframe Integer No

The number of past days that should be included in the report. The upper limit is 30.

Note: You have to specify date range using timeframe parameter or startDate and endDate parameters.

startDate String No

The start date of the date range in format YYYY-MM-DD (e.g. 2020-12-20). The minimum supported date is 30 days ago.

Note: You have to specify date range using timeframe parameter or startDate and endDate parameters.

endDate String No

The end date of the date range in format YYYY-MM-DD (e.g. 2020-12-20).

Note: You have to specify date range using timeframe parameter or startDate and endDate parameters.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v3/pushPidScoreboard.php?id=10185&type=pid&timeframe=7' \
  --header 'Accept: application/json' \
  --header 'X_AFFLOW_ADVERTISER_ACCESS_TOKEN: <Your access token>'

Response

The response format depends on the value of type parameter.

If type parameter is equal to publisher_id then Publisher ID Report is returned.

If type parameter is equal to pid then PID Report is returned.

Publisher ID Report

Contains the breakdown by date and publisher ID of stats data of the specified push campaign.

The response is an array of objects with the following attributes:

Attribute Type Description
date String

The date in format YYYY-MM-DD.

clicks Numeric String

The number of clicks.

pushes Numeric String

The number of pushes.

spend Numeric String

The amount that was spend in USD.

ctr Numeric String

The click-through rate in percents.

data_field Numeric String

The publisher ID.

PID Report

Contains the breakdown by date and PID of stats data of the specified push campaign.

The response is an array of objects with the following attributes:

Attribute Type Description
date String

The date in format YYYY-MM-DD.

clicks Numeric String

The number of clicks.

pushes Numeric String

The number of pushes.

spend Numeric String

The amount that was spend in USD.

ctr Numeric String

The click-through rate in percents.

data_field String

The PID.

Errors

HTTP Status Code Message Description
400 Bad Request Missing Params

One or more of required parameters is not set.

400 Bad Request Invalid ID parameter

The id parameter is not valid.

400 Bad Request Invalid timeframe parameter.

The provided timeframe value is not valid. Please use integer value from 1 to 30 (inclusive).

400 Bad Request Invalid startDate parameter

The provided startDate value is not valid.

400 Bad Request Valid date range required

You should specify date range using valid timeframe parameter or startDate and endDate parameters.

400 Bad Request Not your campaign

The specified campaign is not yours.

400 Bad Request Unsupported type

The provided type value is not supported.

Example Response

[
  {
    "date": "2020-12-16",
    "clicks": 1,
    "pushes": 703,
    "spend": "0.195000000",
    "ctr": "0.1422",
    "data_field": "11317-14afa912"
  },
  {
    "date": "2020-12-16",
    "clicks": 1,
    "pushes": 11,
    "spend": "0.195000000",
    "ctr": "9.0909",
    "data_field": "10817-24acc573"
  },
  ...
]

Example Error Response

{
  "message": "Missing Params"
}

Get a Push Campaign Report

 

Returns a push campaign report for one of your campaigns.

URL

https://api.monetizer.co/v3/pushCreativeScoreboard.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
id Integer Yes

The ID of the push campaign.

type String Yes

The type of the report.

Supported values:

  • creative - the report includes stats data for each creative set of the specified campaign.
  • overall - the report includes stats aggregated for all creative sets of the specified campaign.
timeframe Integer No

The number of past days that should be included in the report. The upper limit is 30.

Note: You have to specify date range using timeframe parameter or startDate and endDate parameters.

startDate String No

The start date of the date range in format YYYY-MM-DD (e.g. 2020-12-20). The minimum supported date is 30 days ago.

Note: You have to specify date range using timeframe parameter or startDate and endDate parameters.

endDate String No

The end date of the date range in format YYYY-MM-DD (e.g. 2020-12-20).

Note: You have to specify date range using timeframe parameter or startDate and endDate parameters.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v3/pushCreativeScoreboard.php?id=10185&type=creative&timeframe=4' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

The response format depends on the value of type parameter.

If type parameter is equal to overall then Overal Report is returned.

If type parameter is equal to creative then Creative Set Report is returned.

Overall Report

Contains the breakdown by date of stats data of the specified push campaign.

The response is an array of objects with the following attributes:

Attribute Type Description
date String

The date in format YYYY-MM-DD.

data_field String

The date in format YYYY-MM-DD (it’s same as date attribute).

clicks Numeric String

The number of clicks.

pushes Numeric String

The number of pushes.

spend Numeric String

The amount that was spend in USD.

ctr Numeric String

The click-through rate in percents.

Creative Set Report

Contains the breakdown by date and creative set of stats data of the specified push campaign.

The response is an array of objects with the following attributes:

Attribute Type Description
date String

The date in format YYYY-MM-DD.

clicks Integer

The number of clicks.

pushes Integer

The number of pushes.

spend Numeric String

The amount that was spend in USD.

ctr Numeric String

The click-through rate in percents.

data_field Integer

The ID of the creative set.

c_title String

The title of the creative set (push notification).

c_body String

The body of the creative set (short message of push notification).

c_icon String

The icon of the creative set (the URL of the icon of push notification).

Errors

HTTP Status Code Message Description
400 Bad Request Missing Params

One or more of required parameters is not set.

400 Bad Request Invalid ID parameter

The id parameter is not valid.

400 Bad Request Invalid timeframe parameter.

The provided timeframe value is not valid. Please use integer value from 1 to 30 (inclusive).

400 Bad Request Invalid startDate parameter

The provided startDate value is not valid.

400 Bad Request Valid date range required

You should specify date range using valid timeframe parameter or startDate and endDate parameters.

400 Bad Request Not your campaign

The specified campaign is not yours.

Example Response

[
  {
    "date": "2020-08-28",
    "clicks": 19,
    "pushes": 76,
    "spend": "0.020000000",
    "ctr": "25.0000",
    "data_field": 26130,
    "c_title": "Test title",
    "c_body": "Test body",
    "c_icon": ""
  },
  {
    "date": "2020-08-29",
    "clicks": 18,
    "pushes": 36,
    "spend": "0.017000000",
    "ctr": "50.0000",
    "data_field": 26130,
    "c_title": "Test title",
    "c_body": "Test body",
    "c_icon": ""
  },
  ...
]

Example Error Response

{
  "message": "Missing Params"
}

Get The List of Carriers

 

Returns the list of supported carriers (connection providers) for specified countries.

URL

https://api.monetizer.co/data/partner-ls-carrier.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
geo_arr String Yes

Specifies the list of countries for which you want to get the list of carriers (connection providers). The parameters value should be an array of ISO3166 alpha-2 country codes in upper case encoded as JSON string.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/data/partner-ls-carrier.php?geo_arr=%5B%20%22EC%22%5D' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
geo String

The ISO3166 alpha-2 country code in upper case.

carrier String

The string that identifies carrier (connection provider).

Errors

HTTP Status Code Message Description
400 Bad Request Missing Param

The geo_arr parameter is not set.

400 Bad Request Bad Param

The geo_arr parameter is invalid.

500 Internal Server Error No DB

No database connection.

500 Internal Server Error Bad Query

The database query error.

Example Response

[
  {
    "geo": "EC",
    "carrier": "EC CLARO"
  },
  {
    "geo": "EC",
    "carrier": "EC CNT MOBILE"
  },
  {
    "geo": "EC",
    "carrier": "EC MOVISTAR"
  },
  {
    "geo": "EC",
    "carrier": "EC WiFi"
  }
]

Example Error Response

{
  "message": "Bad Param"
}    

Check The Conversion Test

 

Returns the number of completed conversion tests. You can use this action to check whether you complete a conversion test. If returned number will be greater than 0 then you can create CPA campaigns and private campaigns (Direct Offers).

URL

https://api.monetizer.co/data/advertiser-pixel-test.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
status OK Yes

The status of completed conversion test.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/data/advertiser-pixel-test.php?status=OK' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns object with following attributes:

Attribute Type Description
success Boolean

Whether the operation was successful or not.

result Integer

Number of completed conversion tests.

Errors

HTTP Status Code Message Description
500 Internal Server Error Internal Server Error

An unexpected error has occurred

Example Response

{
  "success": true,
  "result": 1
}
 

Create a Conversion Test

 

Creates a conversion test and returns url that should be used to perform the test.

You must complete a conversion test before creating a CPA or Private campaign.

  1. Make sure your account has funds ($90 minimum) or the test will not connect to your chosen URL.
  2. Make sure you provide your tracking link with our token “=[[subid]]” in your parameter for the unique Click ID.
  3. Make sure you provide your tracking link with our token “=[[partner_id]]” for the publisher (partner) ID.
  4. Make sure you are posting back an actual amount, amount=0 or empty amounts will fail!

Related article: How Do I Complete The Conversion Test?

You can obtain your postback URL from your account details (advertizer_postback property of account object).
See Get an Account Data

URL

https://api.monetizer.co/data/advertiser-pixel-test.php

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
url String Yes

Your tracking link.

Example Request

curl --request POST \
  --url https://api.monetizer.co/data/advertiser-pixel-test.php \
  --header 'accept: application/json' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --data 'url=https://mytracker.com/?h=c69eb0c3bdc32946d5ea858db21a00c0&pci=[[subid]]&ppi=[[partner_id]]&amount=0.25'

Response

Returns object with following attributes:

Attribute Type Description
success Boolean

Whether the operation was successful or not.

result Object

The object with identifier id of created conversion test and conversion test url inbound_url

result.inbound_url String

The url that should be used to start the test.

Errors

HTTP Status Code Message Description
406 Not Acceptable expected parameters

The request has no parameters.

406 Not Acceptable url: is required

The required url parameter is not provided.

406 Not Acceptable url: is invalid

The provided url is not valid URL.

406 Not Acceptable You must include [[subid]] in URL

The provided url parameter doesn’t have [[subid]] token (placeholder).

406 Not Acceptable You must include [[partner_id]] in URL

The provided url parameter doesn’t have [[partner_id]] token (placeholder).

500 Internal Server Error Internal Server Error

An unexpected error has occurred

Example Response

{
  "success": true,
  "result": {
    "success": true,
    "id": 6948,
    "inbound_url": "http:\/\/inbound.pixeltestlink.com\/?utm_medium=f4cc1d57827c486c4ff515ab360a1eae1640bc13&utm_campaign=pixel-test"
  }
}

Example Error Response

{
  "message": "url: is required"
}

Get Conversion Tests List

 

Returns the list of all your conversion tests.

URL

https://api.monetizer.co/data/advertiser-pixel-test.php

Requires Auth

Yes

Example Request

curl --request GET \
  --url https://api.monetizer.co/data/advertiser-pixel-test.php \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns object with following attributes:

Attribute Type Description
success Boolean

Whether the operation was successful or not.

result Array

List of Conversion Test objects.

Conversion Test Object
Attribute Type Description
id Integer

Identifier of the conversion test.

inbound_url String

The inbound link that is used to register click (visit) in Advertizer.

outbound_url String

Your tracking link.

status String

Test status. OK - test passed. WAITING - waiting for postback.

Errors

HTTP Status Code Message Description
500 Internal Server Error Internal Server Error

An unexpected error has occurred

Example Response

{
  "success": true,
  "result": [
    {
      "id": 6950,
      "inbound_url": "http:\/\/inbound.pixeltestlink.com\/?utm_medium=73463f5e5e78f7200cc06a655b70126484e3f69e&utm_campaign=pixel-test",
      "outbound_url": "https:\/\/mytracker.com\/?h=c69eb0c3bdc32946d5ea858db21a00c0&pci=[[subid]]&ppi=[[partner_id]]&amount=0.25",
      "status": "WAITING"
    },
    {
      "id": 6948,
      "inbound_url": "http:\/\/inbound.pixeltestlink.com\/?utm_medium=f4cc1d57827c486c4ff515ab360a1eae1640bc13&utm_campaign=pixel-test",
      "outbound_url": "https:\/\/mytracker.com\/?h=c69eb0c3bdc32946d5ea858db21a00c0&pci=[[subid]]&ppi=[[partner_id]]&amount=0.25",
      "status": "OK"
    }
  ]
}
 

Get Insights Report

 

Returns the overall statistical data for regular campaigns like traffic volume, number of conversions for different countries, device types, operating systems or carriers.

URL

https://api.monetizer.co/v3/advertiserInsights.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
conversion_flow String No

The conversion flow filter. Accepted values: cpa, in-app.

Default value: cpa.

type String No

The traffic type filter. Accepted values: mainstream, adult, aggressive.

Default value: mainstream.

geo String No

The ISO 3166 alpha-2 country code in upper case that specifies the country filter.

If this parameter is not specified, then stats data for all countries will be returned.

timeframe Integer Yes

The number of past hours that should be included in the report. The upper limit is 720 (720 hours is equal to 30 days).

Note: if timeframe is lesser than 72 then data grouped by hourly intervals, otherwise the data grouped by date.

report String No

The type of the report that allows to obtain the stats data breakdown by device type, operating system or carrier.

Allowed values: device_type, os, carrier.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v3/advertiserInsights.php?conversion_flow=cpa&type=mainstream&geo=US&timeframe=168&report=device_type' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
vertical String

The name of the vertical.

start_ts Integer

The Unix timestamp of the start of the interval when data has been aggregated.

volume Numeric String

The volume of the traffic. (The number of clicks)

conversions Numeric String

The number of conversions.

data_field String

The value of this attribute depends on the value of the report query parameter.

If report is equal to device_type, then data_field contains the name of the device type.

If report is equal to os, then data_field contains the name of the operating system.

If report is equal to carrier, then data_field contains the name of the carrier.

If report parameter is not provided, then data_field contains the country code.

geo String

The ISO 3166 alpha-2 country code in upper case.

Errors

HTTP Status Code Message Description
400 Bad Request Time frame required

The timeframe parameter is not set.

400 Bad Request Invalid timeframe parameter.

The provided timeframe value is not valid. Please use integer value from 1 to 720 (inclusive).

Example Response

[
  {
    "vertical": "mainstream",
    "start_ts": 1599624000,
    "volume": "300033",
    "conversions": "1495",
    "data_field": "desktop",
    "geo": "US"
  },
  {
    "vertical": "mainstream",
    "start_ts": 1599710400,
    "volume": "377880",
    "conversions": "1971",
    "data_field": "desktop",
    "geo": "US"
  },
  ...
]

Example Error Response

{
  "message": "Time frame required"
}

Get Push Subscriptions Trends

 

Returns the data that may be used to build a graph of the dependence of the number of push subscriptions on the date for the last 30 days for all countries.

URL

https://api.monetizer.co/v3/advertiserPushInsights.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
action subscriptionsTrend Yes

Specifies the action to perform.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v3/advertiserPushInsights.php?action=subscriptionsTrend' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
geo String

The ISO 3166 alpha-2 country code in upper case.

subscriptions Numeric String

The total number of active push subscriptions.

date String

The date in format YYYY-MM-DD.

Errors

HTTP Status Code Message Description
400 Bad Request Missing 'action' parameter

The action parameter is not set.

400 Bad Request Invalid action

The action parameter is invalid.

Example Response

[
  {
    "geo": "00",
    "subscriptions": "205",
    "date": "2020-08-17"
  },
  {
    "geo": "AD",
    "subscriptions": "745",
    "date": "2020-08-17"
  },
  {
    "geo": "AE",
    "subscriptions": "189781",
    "date": "2020-08-17"
  },
  {
    "geo": "AF",
    "subscriptions": "40805",
    "date": "2020-08-17"
  },
  {
    "geo": "AG",
    "subscriptions": "1198",
    "date": "2020-08-17"
  },
  ...
]

Example Error Response

{
  "message": "Invalid action"
}

Get a Campaigns Competition Insight

 

Returns the statistical data like number of campaigns, maximum and average payout, that may be used to estimate campaigns competition for different countries, device types, operating systems or carriers.

Note that you can get the minimum values of campaign payouts (bids) using List All Minimum Bids action.

URL

https://api.monetizer.co/v3/advertiserInsightsCampaigns.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
conversion_flow String No

The conversion flow filter. Accepted values: cpa, in-app.

Default value: cpa.

type String No

The traffic type filter. Accepted values: mainstream, adult, aggressive.

Default value: mainstream.

geo String No

The ISO 3166 alpha-2 country code in upper case that specifies the country filter.

Important: The geo parameter is required when report parameter is specified. If report parameter is not specified, then geo is ignored and stats data for each country will be returned.

report String No

The type of the report that allows to obtain the stats data breakdown by device type, operating system or carrier.

Allowed values: device_type, os, carrier.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v3/advertiserInsightsCampaigns.php?conversion_flow=cpa&type=mainstream&geo=US&report=device_type' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
geo String

The ISO 3166 alpha-2 country code in upper case.

campaign_count Integer

The number of campaigns that match specified filters.

max_payout Numeric String

The maximum value of the campaign’s payout (bid).

average_payout Numeric String

The average value of the campaign’s payout (bid).

data_field String

The value of this attribute depends on the value of the report query parameter.

If report is equal to device_type, then data_field contains the name of the device type.

If report is equal to os, then data_field contains the name of the operating system.

If report is equal to carrier, then data_field contains the name of the carrier.

If report parameter is not provided, then data_field contains the country code.

Errors

HTTP Status Code Message Description
400 Bad Request Geo required

The geo parameter is not set, when report parameter is provided.

Example Response

[
  {
    "geo": "US",
    "campaign_count": 155,
    "max_payout": "9999.99999",
    "average_payout": "67.391265419",
    "data_field": "mobile"
  },
  {
    "geo": "US",
    "campaign_count": 62,
    "max_payout": "19.00000",
    "average_payout": "2.890419354",
    "data_field": "desktop"
  },
  {
    "geo": "US",
    "campaign_count": 12,
    "max_payout": "0.25000",
    "average_payout": "0.250000000",
    "data_field": "all"
  }
]

Example Error Response

{
  "message": "Geo required"
}

Get a Push Campaign Competition Insight

 

Returns the statistical data like number of push campaigns, maximum and average bids, that may be used to estimate push campaigns competition for all countries.

URL

https://api.monetizer.co/v3/advertiserPushInsights.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
action campaigns Yes

Specifies the action to perform.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v3/advertiserPushInsights.php?action=campaigns' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
geo String | Null

The ISO 3166 alpha-2 country code in upper case.

campaign_count Integer

The number of active push campaigns.

average_payout Numeric String

The average value of bids (click cost).

max_payout Numeric String

The maximum value of bids (click cost).

Errors

HTTP Status Code Message Description
400 Bad Request Missing 'action' parameter

The action parameter is not set.

400 Bad Request Invalid action

The action parameter is invalid.

Example Response

[
  {
    "geo": null,
    "campaign_count": 6,
    "average_payout": "0.000000000",
    "max_payout": "0.00000"
  },
  {
    "geo": "AD",
    "campaign_count": 2,
    "average_payout": "0.002700000",
    "max_payout": "0.00310"
  },
  {
    "geo": "AE",
    "campaign_count": 78,
    "average_payout": "0.010089102",
    "max_payout": "0.08300"
  },
  {
    "geo": "AF",
    "campaign_count": 10,
    "average_payout": "0.003210000",
    "max_payout": "0.00350"
  },
  ...
]

Example Error Response

{
  "message": "Invalid action"
}

Get a Push Campaigns Insights

 

Returns overall push campaigns stats like the total number of pushes, clicks and conversion rates for all counties for last 30 days.

URL

https://api.monetizer.co/v3/advertiserPushInsights.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
action insights Yes

Specifies the action to perform.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v3/advertiserPushInsights.php?action=insights' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
date String

The date of data aggregation.

geo String

The ISO 3166 alpha-2 country code in upper case.

pushes Numeric String

The total number of pushes.

clicks Numeric String

The total number of clicks.

cvr Numeric String

The conversion rate in percents (calculated based on total number of pushes and clicks).

Errors

HTTP Status Code Message Description
400 Bad Request Missing 'action' parameter

The action parameter is not set.

400 Bad Request Invalid action

The action parameter is invalid.

Example Response

[
  {
    "date": "2020-08-17",
    "geo": "00",
    "pushes": "2022",
    "clicks": "0",
    "cvr": "0.0000"
  },
  {
    "date": "2020-08-17",
    "geo": "AD",
    "pushes": "15400",
    "clicks": "10",
    "cvr": "0.0649"
  },
  {
    "date": "2020-08-17",
    "geo": "AE",
    "pushes": "3199259",
    "clicks": "4439",
    "cvr": "0.1388"
  },
  {
    "date": "2020-08-17",
    "geo": "AF",
    "pushes": "450927",
    "clicks": "1258",
    "cvr": "0.2790"
  },
  ...
]

Example Error Response

{
  "message": "Invalid action"
}

Get a Push Subscriptions Stats

 

Returns the numbers of push subscriptions for all countries.

URL

https://api.monetizer.co/v3/advertiserPushInsights.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
action subscriptions Yes

Specifies the action to perform.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v3/advertiserPushInsights.php?action=subscriptions' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
geo String

The ISO 3166 alpha-2 country code in upper case.

total Numeric String

The total number of active push subscriptions.

Errors

HTTP Status Code Message Description
400 Bad Request Missing 'action' parameter

The action parameter is not set.

400 Bad Request Invalid action

The action parameter is invalid.

Example Response

[
  {
    "geo": "00",
    "total": "234"
  },
  {
    "geo": "AD",
    "total": "672"
  },
  {
    "geo": "AE",
    "total": "197855"
  },
  {
    "geo": "AF",
    "total": "36034"
  },
  {
    "geo": "AG",
    "total": "858"
  },
  {
    "geo": "AI",
    "total": "809"
  },
  ...
]

Example Error Response

{
  "message": "Invalid action"
}

Archive Messages

 

Archives all messages in your correspondence with the specified publisher.

URL

https://api.monetizer.co/v3/messages.php

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action archive Yes

Specifies the action to perform.

publisher_id Integer Yes

The ID of the publisher.

Example Request

curl --request POST \
  --url https://api.monetizer.co/v3/messages.php \
  --header 'accept: application/json' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --data action=archive \
  --data publisher_id=14145

Response

Returns object with the following attributes:

Attribute Type Description
status String

The status of the operation. Should be equal to success.

Errors

HTTP Status Code Message Description
400 Bad Request Invalid action

The value of action parameter is invalid.

400 Bad Request Missing Params

Not all required parameters are set.

500 Internal Server Error No DB

Some problem with connection to database. Try to make another request.

Example Response

{
  "status": "success"
}

Example Error Response

{
  "message": "Invalid action"
}

Block a Publisher

 

Blocks the specified publisher.

The blocked publisher can't sent messages to you.

URL

https://api.monetizer.co/v3/messages.php

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action block Yes

Specifies the action to perform.

publisher_id Integer Yes

The ID of the publisher.

Example Request

curl --request POST \
  --url https://api.monetizer.co/v3/messages.php \
  --header 'accept: application/json' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --data action=block \
  --data publisher_id=14145

Response

Returns object with the following attributes:

Attribute Type Description
status String

The status of the operation. Should be equal to success.

Errors

HTTP Status Code Message Description
400 Bad Request Invalid action

The value of action parameter is invalid.

400 Bad Request Missing Params

Not all required parameters are set.

500 Internal Server Error No DB

Some problem with connection to database. Try to make another request.

Example Response

{
  "status": "success"
}

Example Error Response

{
  "message": "Invalid action"
}

Create a Message

 

Creates a new message.

Please Note: All messages need to be approved before being delivered.

URL

https://api.monetizer.co/v3/messages.php

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action send Yes

Specifies the action to perform.

publisher_id Integer Yes

The ID of the publisher you want to send the message to.

message String Yes

The text of the message.

Warning: Sending or asking for contact information such as Skype or E-mail address is considered abuse.

Example Request

curl --request POST \
  --url https://api.monetizer.co/v3/messages.php \
  --header 'accept: application/json' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --data action=send \
  --data publisher_id=14145 \
  --data 'message=Hi I have an offer for You in USA  it'\''s high converting would you want to test it?'

Response

Returns object with the following attributes:

Attribute Type Description
status String

The status of the operation. Possible values: success, error.

record Object

The created message object. See Message object description below.

This attribute is set only when status="success".

errors Array

An array of error messages.

This attribute is set only when status="error".

Message

Represents the message object.

Attribute Type Description
id Integer

The ID of the message.

sender_type Integer

Determines the sender type. It should be equal to 1 in this case.

network_id Integer

The ID of your account.

publisher_id Integer

The ID of the publisher.

is_approved Integer

The status of the message.

  • 0 - rejected
  • 1 - approved
  • 2 - pending for approval
send_ts String

The time when the message was sent. (New York time zone)

body String

The text of the message.

read_ts String

The time when the message was read by you. (New York time zone)

archived Integer

The value 1 or 0 that indicates whether the message has been archived by you. In this case it should be 0.

admin_comment String

The admin comment.

Errors

HTTP Status Code Message Description
400 Bad Request Invalid action

The value of action parameter is invalid.

500 Internal Server Error No DB

Some problem with connection to database. Try to make another request.

Example Response

{
  "status": "success",
  "record": {
    "id": 85,
    "sender_type": 1,
    "network_id": 12542,
    "publisher_id": 14145,
    "is_approved": 2,
    "send_ts": "2020-09-17 10:27:29",
    "body": "Hi I have an offer for You in USA  it's high converting would you want to test it?",
    "read_ts": "2020-09-17 10:27:29",
    "archived": 0,
    "admin_comment": ""
  }
}

Example Error Response

{
  "message": "Invalid action"
}

Get Correspondence with Publisher

 

Returns a list of all messages from your correspondence with the specified publisher.

URL

https://api.monetizer.co/v3/messages.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
action log Yes

Specifies the action to perform.

publisher_id Integer Yes

The ID of the publisher.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v3/messages.php?action=log&publisher_id=14145' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
id Integer

The ID of the message.

sender_type Integer

Determines the sender type.

The value 1 means that the message was sent by you.

The value 2 means that the message was sent by publisher.

network_id Numeric String

The ID of yours account.

publisher_id Numeric String

The ID of the publisher.

send_ts String

The time when the message was sent. (New York time zone)

body String

The text of the message.

network_read_ts String | null

The time when the message was read by you. (New York time zone)

publisher_read_ts String | null

The time when the message was read by the publisher. (New York time zone)

is_approved Integer

The value 1 or 0 that indicates whether the message has been approved by admin.

Note: Only messages approved by admin are available to recipient.

rejection_reason String | null

If message has been rejected by admin, then this attribute should contain a reason explaining why it was rejected.

archived_by_network Integer

The value 1 or 0 that indicates whether the message has been archived by you.

archived_by_publisher Integer

The value 1 or 0 that indicates whether the message has been archived by publisher.

admin_comment String | null

The admin comment related to this message.

blocked Integer

The value 1 or 0 that indicates whether the publisher is blocked by you.

Note: If publisher is blocked by you, then he can’t send you new messages and respond to your messages.

Errors

HTTP Status Code Message Description
500 Internal Server Error No DB

Some problem with connection to database. Try to make another request.

400 Bad Request The 'publisher_id' is not set or invalid

Required publisher_id parameter is not set or has invalid value.

Example Response

[
  {
    "id": 15,
    "sender_type": 1,
    "network_id": 12542,
    "publisher_id": 14145,
    "send_ts": "2020-06-19 16:33:19",
    "body": "Test message from advertiser to publisher 2",
    "network_read_ts": "2020-06-19 21:08:23",
    "publisher_read_ts": "2020-07-02 21:26:18",
    "is_approved": 1,
    "rejection_reason": null,
    "archived_by_network": 1,
    "archived_by_publisher": 0,
    "admin_comment": null,
    "blocked": 0
  },
  {
    "id": 70,
    "sender_type": 2,
    "network_id": 12542,
    "publisher_id": 14145,
    "send_ts": "2020-07-03 10:43:50",
    "body": "Answer to test message ",
    "network_read_ts": "2020-07-03 10:47:38",
    "publisher_read_ts": "2020-07-03 10:43:50",
    "is_approved": 1,
    "rejection_reason": null,
    "archived_by_network": 1,
    "archived_by_publisher": 0,
    "admin_comment": null,
    "blocked": 0
  },
  {
    "id": 84,
    "sender_type": 1,
    "network_id": 12542,
    "publisher_id": 14145,
    "send_ts": "2020-09-17 11:41:03",
    "body": "Hello! Are you here?",
    "network_read_ts": "2020-09-17 11:41:03",
    "publisher_read_ts": null,
    "is_approved": 2,
    "rejection_reason": null,
    "archived_by_network": 0,
    "archived_by_publisher": 0,
    "admin_comment": null,
    "blocked": 0
  }
]

Example Error Response

{
  "message": "The 'publisher_id' is not set or invalid"
}

Get Recent Messages

 

Returns a list of recent messages in your correspondence with publishers.

URL

https://api.monetizer.co/v3/messages.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
limit Integer No

The maximum number of messages to receive. Default value is equal to 25.

page Integer No

The page number (zero based). Default value is equal to 0.

archived Integer No

If this parameter is equal to 0, then only not archived messages will be included in the response;

If this parameter is equal to 1, then only archived messages will be included in the response;

If this parameter is not set, then archived status of the message will be ignored and messages with and without archived status will be included in the response;

Example Request

curl --request GET \
  --url https://api.monetizer.co/v3/messages.php?limit=25&page=0&archived=0 \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
id Numeric String

The ID of the message.

sender_type Numeric String

Determines the sender type.

The value 1 means that the message was sent by advertiser (The message from you to other publisher).

The value 2 means that the message was sent by publisher (The message from some publisher to you).

network_id Numeric String

The ID of yours account.

publisher_id Numeric String

The ID of the publisher who is sender or recipient of the message (depends on sender_type).

send_ts String

The time when the message was sent. (New York time zone)

body String

The text of the message.

read_ts String | Null

The time when the message was read by you. (New York time zone)

archived Numeric String

The value 1 or 0 that determines whether the message has been archived by you.

Errors

HTTP Status Code Message Description
500 Internal Server Error No DB

Some problem with connection to database. Try to make another request.

Example Response

[
  {
    "id": "78",
    "sender_type": "1",
    "network_id": "12542",
    "publisher_id": "14144",
    "send_ts": "2020-07-03 16:26:20",
    "body": "(Regarding your offer request \"Offer wanted: APK\/Direct Download - Cyprus\" [#27]) - I am interested. How much traffic you may provide?",
    "read_ts": "2020-07-03 16:26:20",
    "archived": "0"
  },
  {
    "id": "48",
    "sender_type": "1",
    "network_id": "12542",
    "publisher_id": "14149",
    "send_ts": "2020-07-01 19:07:59",
    "body": "Hi, I have a good offer for you? Interested?",
    "read_ts": "2020-07-01 19:07:59",
    "archived": "0"
  },
  ...
]

Example Error Response

{
  "message": "No DB"
}

Mark Messages as Read

 

Marks all unread messages in your correspondence with the specified publisher as read.

URL

https://api.monetizer.co/v3/messages.php

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action read Yes

Specifies the action to perform.

publisher_id Integer Yes

The ID of the publisher.

Example Request

curl --request POST \
  --url https://api.monetizer.co/v3/messages.php \
  --header 'accept: application/json' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --data action=read \
  --data publisher_id=14145

Response

Returns object with the following attributes:

Attribute Type Description
status String

The status of the operation. Should be equal to success.

Errors

HTTP Status Code Message Description
400 Bad Request Invalid action

The value of action parameter is invalid.

400 Bad Request The 'publisher_id' is not set or invalid.

The publisher_id parameter is not set or invalid.

500 Internal Server Error No DB

Some problem with connection to database. Try to make another request.

Example Response

{
  "status": "success"
}

Example Error Response

{
  "message": "The 'publisher_id' is not set or invalid."
}

Get a Minimum Bid

 

Returns the minimum bids for specified country.

URL

https://api.monetizer.co/v2/AdvertiserMinBidGeo

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
countryCode String Yes

The ISO 3166 alpha-2 country code in upper case that specifies the country for which min bid data should be returned.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v2/AdvertiserMinBidGeo?countryCode=US' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns the object with following attributes:

Attribute Type Description
id Integer

The unique identifier of the min bid record.

countryCode String

The ISO 3166 alpha-2 country code in upper case.

countryName String

The name of the country.

minBid Numeric String

The minimum bid value in USD that is accepted for CPA campaigns and private campaigns (direct offers) for country specified by countryCode attribute.

pushCost Numeric String

The minimum push cost value in USD that is accepted for push campaigns for country specified by countryCode attribute.

cpc Numeric String

The minimum bid value in USD that is accepted for CPC campaigns for country specified by countryCode attribute.

pushCpc Numeric String

The minimum cost per click in USD that is accepted for push campaigns for country specified by countryCode attribute.

cpaTrial Numeric String

The minimum bid in USD that is accepted for CPA trial campaigns for country specified by countryCode attribute.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

Unexpected error occurred during handling of request.

500 Internal Server Error No GeoMinBid found with country code: XX

The minimum bid for given country is not set.

Example Response

{
  "id": 233,
  "countryName": "United States",
  "countryCode": "US",
  "minBid": 0.2,
  "pushCost": 0.4,
  "cpc": 0.0015,
  "pushCpc": 0.03,
  "cpaTrial": 9.99999
}

Example Error Response

{
  "message": "No GeoMinBid found with country code: UQ"
}

List All Minimum Bids

 

Returns the list of all minimum bids for all countries.

URL

https://api.monetizer.co/v2/AdvertiserMinBidGeo

Requires Auth

Yes

Example Request

curl --request GET \
  --url https://api.monetizer.co/v2/AdvertiserMinBidGeo \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
id Integer

The unique identifier of the min bid record.

country_code String

The ISO 3166 alpha-2 country code in upper case.

country_name String

The name of the country.

min_bid Numeric String

The minimum bid value in USD that is accepted for CPA campaigns and private campaigns (direct offers) for country specified by country_code attribute.

push_cost Numeric String

The minimum push cost value in USD that is accepted for push campaigns for country specified by country_code attribute.

cpc Numeric String

The minimum bid value in USD that is accepted for CPC campaigns for country specified by country_code attribute.

push_cpc Numeric String

The minimum cost per click in USD that is accepted for push campaigns for country specified by country_code attribute.

cpa_trial Numeric String

The minimum bid in USD that is accepted for CPA trial campaigns for country specified by country_code attribute.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

Unexpected error occurred during handling of request.

Example Response

[
  {
    "id": 1,
    "country_code": "AD",
    "country_name": "Andorra",
    "min_bid": "0.01000",
    "push_cost": "0.05000",
    "cpc": "0.00050",
    "push_cpc": "0.00300",
    "cpa_trial": "1.00000"
  },
  {
    "id": 2,
    "country_code": "AE",
    "country_name": "United Arab Emirates",
    "min_bid": "0.15000",
    "push_cost": "0.20000",
    "cpc": "0.00130",
    "push_cpc": "0.00600",
    "cpa_trial": "7.00000"
  },
  ...
]

Example Error Response

{
  "message": "Server error. Error ID: 2ae44496"
}

Archive Notifications

 

Archives the specified notifications.

URL

https://api.monetizer.co/v3/notifications.php

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action archive Yes

Specifies the action to perform.

notification Array | Integer No

Specifies IDs of notifications to be archived. If you will not provide this parameter, then all unarchived notifications sent to you will be archived.

Example Request

curl --request POST \
  --url https://api.monetizer.co/v3/notifications.php \
  --header 'accept: application/json' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --data action=archive \
  --data 'notification[]=555771' \
  --data 'notification[]=555769'

Response

Returns an object with the following attributes:

Attribute Type Description
status String

The status of the operation. Possible values: success, failure.

Errors

HTTP Status Code Message Description
500 Internal Server Error No DB

The database error.

400 Bad Request Unknown Action

The action parameter is invalid.

Example Response

{
  "status": "success"
}

Example Error Response

{
  "message": "No DB"
}

Get Notifications

 

Returns the paginated list of notifications.

Notifications are used to inform the user about different events.

URL

https://api.monetizer.co/v3/notifications.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
page Integer No

The zero based page number. Default is 0.

limit Integer No

The number of notifications per page. Default is 25.

sender_type String No

Specifies the sender type filter. Supported values: SYSTEM.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v3/notifications.php?page=0&limit=10' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
id Numeric String

The ID of the notification.

notification_ts String

The time when the notification was created (New York time zone).

sender_type String

The type of the sender of the notification.

sender_id Numeric String

The ID of the sender. Should be 0 for system notifications.

recipient_type String

The type of the recipient of the notification.

recipient_id Numeric String

The ID of the recipient of the notification. (Your ID)

body String

The text of the notification.

is_read Numeric String

The number 1 or 0 that indicates whether the notification was read or not.

is_archived Numeric String

The number 1 or 0 that indicates whether the notification was archived or not.

Errors

HTTP Status Code Message Description
500 Internal Server Error No DB

The database error.

Example Response

[
  {
    "id": "555770",
    "notification_ts": "2020-09-24 11:30:11",
    "sender_type": "SYSTEM",
    "sender_id": "0",
    "recipient_type": "ADVERTISER",
    "recipient_id": "12542",
    "body": "Test notification message body 2",
    "is_read": "0",
    "is_archived": "0"
  },
  {
    "id": "555769",
    "notification_ts": "2020-09-24 11:30:10",
    "sender_type": "SYSTEM",
    "sender_id": "0",
    "recipient_type": "ADVERTISER",
    "recipient_id": "12542",
    "body": "Test notification message body 1",
    "is_read": "0",
    "is_archived": "0"
  }
]

Example Error Response

{
  "message": "No DB"
}

Mark Notifications as Read

 

Mark the specified notifications as read.

URL

https://api.monetizer.co/v3/notifications.php

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action read Yes

Specifies the action to perform.

notifications String Yes

The comma separated list of IDs of notifications to be marked as read.

Example Request

curl --request POST \
  --url 'https://api.monetizer.co/v3/notifications.php \
  --header 'accept: application/json' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --data action=read \
  --data 'notifications=555769,555770'

Response

Returns an object with the following attributes:

Attribute Type Description
status String

The status of the operation. Possible values: success, failure.

Errors

HTTP Status Code Message Description
500 Internal Server Error No DB

The database error.

400 Bad Request Unknown Action

The action parameter is invalid.

400 Bad Request Parameter 'notifications' is not set or invalid

The notifications parameter is not set or has invalid format.

400 Bad Request Missing ID(s)

The notifications parameter does not specify any IDs.

400 Bad Request Bad ID

The notifications parameter contains invalid ID.

Example Response

{
  "status": "success"
}

Example Error Response

{
  "message": "Parameter 'notifications' is not set or invalid"
}

Get Offer Request

 

Returns the specified offer request.

Offer request is a tool that a publisher can use to request an offer for their traffic.
These requests are displayed on the "Offer Market" pages of the Monetizer and Advertizer sites.

URL

https://api.monetizer.co/v3/offerMarket.php

Requires Auth

No

Query Parameters

Name Type/Value Required? Description
action publisherRequest Yes

Specifies the action to perform.

id Integer Yes

The ID of the offer request.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v3/offerMarket.php?action=publisherRequest&id=74' \
  --header 'accept: application/json'

Response

Returns the specified offer request object as first element of the array or empty array if the specified offer request doesn’t exists.

Here the description of attributes of the offer request object:

Attribute Type Description
id Integer

The ID of the request.

name String

The title of the request.

traffic_type String

The traffic type for which the offer is requested.

conversion_flow String

The conversion flow or vertical of the requested offer.

min_payout Numeric String | null

The minimum payout value in USD of the requested offer.

min_cap Numeric String | null

The minimum cap (daily budget) in USD of the requested offer.

geo String

The comma separated list of country codes in ISO 3166 alpha-2 (upper case) format.

It specifies the country targeting of the requested offer.

device String

The device type targetting of the requested offer. Possible values: mobile, desktop, all.

connection_type String

The connection type targeting of the requested offer. Possible values: cellular, wifi, all.

carrier_data String | null

The JSON encoded array of carriers (providers) that requested offer is targeting.

os_data String | null

The JSON encoded array of operating system names that requested offer is targeting.

lp_wanted Integer

The number 1 or 0 that indicates whether landing page wanted or not.

comments String

The comments of the request.

status String

The status of the request. Should be approved.

partner_id Integer

The ID of the publisher who created this request.

created_at String

The time when the request was created. (New York time zone)

updated_at String

The time of the last update of the request. (New York time zone)

archived Integer

Determines whether the request is archived or not. It should be equal to 0.

notify Integer

Determines whether the creator of the request should be notified about creation of new traffic requests that match this offer request.

rejection_reason String | null

The rejection reason of the request. It should be equal to null.

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The required action parameter is not set.

400 Bad Request Unsupported action

The value of action parameter is invalid.

400 Bad Request Id not specified

The required id parameter is not set.

Example Response

[
  {
    "id": 74,
    "name": "Offer wanted: Leadgen - United States",
    "traffic_type": "ppv",
    "conversion_flow": "leadgen",
    "min_payout": "0.30000",
    "min_cap": "100.00000",
    "geo": "US",
    "device": "mobile",
    "connection_type": "all",
    "carrier_data": null,
    "os_data": null,
    "lp_wanted": 0,
    "comments": "Looking for Push subscription offer in US with good CR and NO Shaving. competition is high on my source so eCPM must be greater than 13$. Quality has been proven many times before! ",
    "status": "approved",
    "partner_id": 5079,
    "created_at": "2020-07-24 15:17:55",
    "updated_at": "2020-07-24 15:18:19",
    "archived": 0,
    "notify": 1,
    "rejection_reason": null
  }
]

Example Error Response

{
  "message": "Id not specified"
}

Get Offer Requests

 

Returns the paginated list of all offer requests that match specified filters.

Offer request is a tool that a publisher can use to request an offer for their traffic.
These requests are displayed on the "Offer Market" pages of the Monetizer and Advertizer sites.

URL

https://api.monetizer.co/v3/offerMarket.php

Requires Auth

No

Query Parameters

Name Type/Value Required? Description
action publishersRequests Yes

Specifies the action to perform.

page Integer No

The page number. Default value is equal to 1 (first page).

perPage Integer No

The number of requests per page. The value should be >= 1 or <= 100. Default value is equal to 25.

filter Object No

The object that specifies filter conditions. Only offer requests that match specified conditions are returned. See below for available attributes.

filter.search String No

Allows you to filter requests by keywords.

filter.conversion_flow String No

Allows you to filter requests by conversion flow.

Supported values:

  • carrier billing - Carrier Billing
  • leadgen - Leadgen
  • revshare - Revshare
  • sweepstakes - Sweepstakes
  • cpi - CPI (Apps)
  • dating - Dating
  • cash on delivery - Cash on Delivery
  • ecommerce - ECommerce
  • apk direct download - APK/Direct Download
  • finance insurance - Finance/Insurance
  • cc submit - CC Submit
  • nutra - Nutra
  • other - Other
filter.payout Float No

Allows you to filter requests by payout. Only offer requests with payouts lesser than or equal to the specified payout value or offer requests without any payout constraints are returned.

filter.cap Float No

Allows you to filter requests by minimum cap (daily budget) value. Only offer requests with minumum cap lesser than or equal to specified cap value (in USD) or offer requests without any cap constraints are returned.

filter.geo String No

The ISO 3166 alpha-2 country code in upper case. Allows you to filter requests by country.

filter.device String No

Allows you to filter requests by device type.

Supported values: mobile, desktop, all.

filter.connection_type String No

Allows you to filter requests by connection type.

Supported values: cellular, wifi, all.

filter.traffic_type String No

Allows you to filter requests by traffic type.

Supported values:

  • search engine - Search Engine
  • ppv - PPV
  • social - Social
  • push - Push Notifications
  • native - Native
  • seo - SEO
  • video - Video
  • pop - Pop
  • ecommerce - Ecommerce
  • incentive - Incentive
  • adult - Adult
  • other - Other

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v3/offerMarket.php?action=publishersRequests&filters%5Bconversion_flow%5D=leadgen&filters%5Bgeo%5D=US&filters%5Bdevice%5D=mobile' \
  --header 'accept: application/json'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
id Integer

The ID of the request.

name String

The title of the request.

traffic_type String

The traffic type for which the offer is requested.

conversion_flow String

The conversion flow or vertical of the requested offer.

min_payout Numeric String | null

The minimum payout value in USD of the requested offer.

min_cap Numeric String | null

The minimum cap (daily budget) in USD of the requested offer.

geo String

The comma separated list of country codes in ISO 3166 alpha-2 (upper case) format.

It specifies the country targeting of the requested offer.

device String

The device type targetting of the requested offer. Possible values: mobile, desktop, all.

connection_type String

The connection type targeting of the requested offer. Possible values: cellular, wifi, all.

carrier_data String | null

The JSON encoded array of carriers (providers) that requested offer is targeting.

os_data String | null

The JSON encoded array of operating system names that requested offer is targeting.

lp_wanted Integer

The number 1 or 0 that indicates whether landing page wanted or not.

comments String

The comments of the request.

status String

The status of the request. Should be approved.

partner_id Integer

The ID of the publisher who created this request.

created_at String

The time when the request was created. (New York time zone)

updated_at String

The time of the last update of the request. (New York time zone)

archived Integer

Determines whether the request is archived or not. It should be equal to 0.

notify Integer

Determines whether the creator of the request should be notified about creation of new traffic requests that match this offer request.

rejection_reason String | null

The rejection reason of the request. It should be equal to null.

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The required action parameter is not set.

400 Bad Request Unsupported action

The value of action parameter is invalid.

Example Response

[
  {
    "id": 74,
    "name": "Offer wanted: Leadgen - United States",
    "traffic_type": "ppv",
    "conversion_flow": "leadgen",
    "min_payout": "0.30000",
    "min_cap": "100.00000",
    "geo": "US",
    "device": "mobile",
    "connection_type": "all",
    "carrier_data": null,
    "os_data": null,
    "lp_wanted": 0,
    "comments": "Looking for Push subscription offer in US with good CR and NO Shaving. competition is high on my source so eCPM must be greater than 13$. Quality has been proven many times before! ",
    "status": "approved",
    "partner_id": 5079,
    "created_at": "2020-07-24 15:17:55",
    "updated_at": "2020-07-24 15:18:19",
    "archived": 0,
    "notify": 1,
    "rejection_reason": null
  },
  {
    "id": 23,
    "name": "Looking for US - iOS&Android CPL\/Sweeps offers",
    "traffic_type": "social",
    "conversion_flow": "leadgen",
    "min_payout": "3.20000",
    "min_cap": "50.00000",
    "geo": "US",
    "device": "mobile",
    "connection_type": "all",
    "carrier_data": null,
    "os_data": null,
    "lp_wanted": 0,
    "comments": "Looking for Sweeps\/Leadgen offers with more than 3.2$ payout to reach the most of the traffic from my social channel. will be great to have with and without Pre-lander.",
    "status": "approved",
    "partner_id": 5079,
    "created_at": "2020-05-31 05:59:43",
    "updated_at": "2020-06-03 08:12:26",
    "archived": 0,
    "notify": 1,
    "rejection_reason": null
  }
]

Example Error Response

{
  "message": "Unsupported action"
}

Get Traffic Request

 

Returns the specified traffic request.

Traffic request is a tool that an advertiser can use to request traffic from publishers for their offer.
These requests are displayed on the "Offer Market" pages of the Monetizer and Advertizer sites.

URL

https://api.monetizer.co/v3/offerMarket.php

Requires Auth

No

Query Parameters

Name Type/Value Required? Description
action advertiserRequest Yes

Specifies the action to perform.

id Integer Yes

The ID of the traffic request.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v3/offerMarket.php?action=advertiserRequest&id=36' \
  --header 'accept: application/json'

Response

Returns the specified traffic request object as first element of the array or empty array if the specified traffic request doesn’t exists.

Here the description of attributes of the traffic request object:

Attribute Type Description
id Integer

The ID of the request.

name String

The title of the request.

traffic_type String | null

The traffic type.

conversion_flow String

The conversion flow or vertical of the offer for which traffic is requested.

payout Numeric String | null

The payout value in USD of the offer for which traffic is requested.

daily_budget Numeric String | null

The daily budget in USD of the offer for which traffic is requested.

geo String

The comma separated list of country codes in ISO 3166 alpha-2 (upper case) format.

It specifies the country targeting of the offer for which traffic is requested.

device String

The device type of the requested traffic. (The device type targeting of the offer for which traffic is requested.) Possible values: mobile, desktop, all.

connection_type String

The connection type of the requested traffic. (The connection type targeting of the offer for which traffic is requested.) Possible values: cellular, wifi, all.

carrier_data String | null

The JSON encoded array of carriers (providers) from which traffic is requested.

os_data String | null

The JSON encoded array of operating system names that specifies the OS targeting of the offer for which traffic is requested.

offer_screenshot String

The URL of the screenshot of the offer for which traffic is requested.

comments String

The comments of the request.

network_id Integer

The ID of the advertiser who created this request.

created_at String

The time when the request was created. (New York time zone)

updated_at String

The time of the last update of the request. (New York time zone)

status String

The status of the request. Should be approved.

archived Integer

Determines whether the request is archived or not. It should be equal to 0.

notify Integer

Determines whether the creator of the request should be notified about creation of new offer requests that match this traffic request.

rejection_reason String | null

The rejection reason of the request. It should be equal to null.

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The required action parameter is not set.

400 Bad Request Unsupported action

The value of action parameter is invalid.

400 Bad Request Id not specified

The required id parameter is not set.

Example Response

[
  {
    "id": 36,
    "name": "US_Raid - Shadow League SOI  ",
    "traffic_type": "search engine",
    "conversion_flow": "leadgen",
    "payout": "3.00000",
    "daily_budget": "50.00000",
    "geo": "US",
    "device": "desktop",
    "connection_type": "all",
    "carrier_data": null,
    "os_data": null,
    "offer_screenshot": "https:\/\/api.monetizer.co\/offer_preview\/3326_1591864882.64.jpg",
    "comments": "test budget of 5 \/day until quality checks out",
    "network_id": 3326,
    "created_at": "2020-06-11 04:41:22",
    "updated_at": "2020-06-11 04:41:22",
    "status": "approved",
    "archived": 0,
    "notify": 1,
    "rejection_reason": null
  }
]

Example Error Response

{
  "message": "Id not specified"
}

Get Traffic Requests

 

Returns the paginated list of all traffic requests that match specified filters.

Traffic request is a tool that an advertiser can use to request traffic from publishers for their offer.
These requests are displayed on the "Offer Market" pages of the Monetizer and Advertizer sites.

URL

https://api.monetizer.co/v3/offerMarket.php

Requires Auth

No

Query Parameters

Name Type/Value Required? Description
action advertisersRequests Yes

Specifies the action to perform.

page Integer No

The page number. Default value is equal to 1 (first page).

perPage Integer No

The number of requests per page. The value should be >= 1 or <= 100. Default value is equal to 25.

filter Object No

The object that specifies filter conditions. Only traffic requests that match specified conditions are returned. See below for available attributes.

filter.search String No

Allows you to filter requests by keywords.

filter.conversion_flow String No

Allows you to filter requests by conversion flow.

Supported values:

  • carrier billing - Carrier Billing
  • leadgen - Leadgen
  • revshare - Revshare
  • sweepstakes - Sweepstakes
  • cpi - CPI (Apps)
  • dating - Dating
  • cash on delivery - Cash on Delivery
  • ecommerce - ECommerce
  • apk direct download - APK/Direct Download
  • finance insurance - Finance/Insurance
  • cc submit - CC Submit
  • nutra - Nutra
  • other - Other
filter.payout Float No

Allows you to filter requests by payout. Only traffic requests with payouts greater than or equal to the specified payout value or traffic requests without any payout constraints are returned.

filter.cap Float No

Allows you to filter requests by daily budget (cap). Only traffic requests with daily budget greater than or equal to the specified cap value (in USD) or traffic requests without any daily budget constraints are returned.

filter.geo String No

The ISO 3166 alpha-2 country code in upper case. Allows you to filter requests by country.

filter.device String No

Allows you to filter requests by device type.

Supported values: mobile, desktop, all.

filter.connection_type String No

Allows you to filter requests by connection type.

Supported values: cellular, wifi, all.

filter.traffic_type String No

Allows you to filter requests by traffic type.

Supported values:

  • search engine - Search Engine
  • ppv - PPV
  • social - Social
  • push - Push Notifications
  • native - Native
  • seo - SEO
  • video - Video
  • pop - Pop
  • ecommerce - Ecommerce
  • incentive - Incentive
  • adult - Adult
  • other - Other

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v3/offerMarket.php?action=advertisersRequests&page=1&perPage=20&filters%5Bconversion_flow%5D=leadgen&filters%5Bpayout%5D=1&filters%5Bgeo%5D=CA&filters%5Bdevice%5D=all' \
  --header 'accept: application/json'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
id Integer

The ID of the request.

name String

The title of the request.

traffic_type String | null

The traffic type.

conversion_flow String

The conversion flow or vertical of the offer for which traffic is requested.

payout Numeric String | null

The payout value in USD of the offer for which traffic is requested.

daily_budget Numeric String | null

The daily budget in USD of the offer for which traffic is requested.

geo String

The comma separated list of country codes in ISO 3166 alpha-2 (upper case) format.

It specifies the country targeting of the offer for which traffic is requested.

device String

The device type of the requested traffic. (The device type targeting of the offer for which traffic is requested.) Possible values: mobile, desktop, all.

connection_type String

The connection type of the requested traffic. (The connection type targeting of the offer for which traffic is requested.) Possible values: cellular, wifi, all.

carrier_data String | null

The JSON encoded array of carriers (providers) from which traffic is requested.

os_data String | null

The JSON encoded array of operating system names that specifies the OS targeting of the offer for which traffic is requested.

offer_screenshot String

The URL of the screenshot of the offer for which traffic is requested.

comments String

The comments of the request.

network_id Integer

The ID of the advertiser who created this request.

created_at String

The time when the request was created. (New York time zone)

updated_at String

The time of the last update of the request. (New York time zone)

status String

The status of the request. Should be approved.

archived Integer

Determines whether the request is archived or not. It should be equal to 0.

notify Integer

Determines whether the creator of the request should be notified about creation of new offer requests that match this traffic request.

rejection_reason String | null

The rejection reason of the request. It should be equal to null.

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The required action parameter is not set.

400 Bad Request Unsupported action

The value of action parameter is invalid.

Example Response

[
  {
    "id": 61,
    "name": "Traffic wanted: Leadgen - United States",
    "traffic_type": "search engine",
    "conversion_flow": "leadgen",
    "payout": null,
    "daily_budget": "100.00000",
    "geo": "US",
    "device": "mobile",
    "connection_type": "all",
    "carrier_data": null,
    "os_data": null,
    "offer_screenshot": "https:\/\/api.monetizer.co\/offer_preview\/12461_1594923450.7255.png",
    "comments": "Swepstakes SOI available for BR, US, CA, ES, FR, UK, DE, IT, BE, NL, DK, SE, NO, FI, TH, ID, NZ, ZA\nPlease, message me for more details.",
    "network_id": 12461,
    "created_at": "2020-07-16 14:17:31",
    "updated_at": "2020-07-16 14:17:31",
    "status": "approved",
    "archived": 0,
    "notify": 1,
    "rejection_reason": null
  },
  {
    "id": 36,
    "name": "US_Raid - Shadow League SOI  ",
    "traffic_type": "video",
    "conversion_flow": "leadgen",
    "payout": "3.00000",
    "daily_budget": "50.00000",
    "geo": "US",
    "device": "desktop",
    "connection_type": "all",
    "carrier_data": null,
    "os_data": null,
    "offer_screenshot": "https:\/\/api.monetizer.co\/offer_preview\/3326_1591864882.64.jpg",
    "comments": "test budget of 5 \/day until quality checks out",
    "network_id": 3326,
    "created_at": "2020-06-11 04:41:22",
    "updated_at": "2020-06-11 04:41:22",
    "status": "approved",
    "archived": 0,
    "notify": 1,
    "rejection_reason": null
  },
  {
    "id": 17,
    "name": "OddsChecker US soi dekstop CPL ",
    "traffic_type": null,
    "conversion_flow": "leadgen",
    "payout": "1.50000",
    "daily_budget": "50.00000",
    "geo": "US",
    "device": "all",
    "connection_type": "all",
    "carrier_data": null,
    "os_data": null,
    "offer_screenshot": "https:\/\/api.monetizer.co\/offer_preview\/3326_1590916439.0437.png",
    "comments": "Odds Checker CPL offer - quality traffic only ",
    "network_id": 3326,
    "created_at": "2020-05-31 05:13:59",
    "updated_at": "2020-06-03 08:12:10",
    "status": "approved",
    "archived": 0,
    "notify": 1,
    "rejection_reason": null
  }
]

Example Error Response

{
  "message": "Missing \"action\" parameter"
}

Get Unread Offer Requests Count

 

Returns the number of unread offer requests for the calling advertiser.

URL

https://api.monetizer.co/v3/advertiserUnreadOfferMarketTotal.php

Requires Auth

Yes

Example Request

curl --request GET \
  --url https://api.monetizer.co/v3/advertiserUnreadOfferMarketTotal.php \
  --header 'Accept: application/json' \
  --header 'X_AFFLOW_ADVERTISER_ACCESS_TOKEN: <Your access token>'

Response

Returns object with the following attributes:

Attribute Type Description
total Integer

The total number of unread offer requests.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

An unexpected error has occurred.

Example Response

{
  "total": 21
}

Example Error Response

{
  "message": "Server error. Error ID: 23abf40b"
}

Mark All Offer Requests as Read

 

Marks all current offer requests as read.

URL

https://api.monetizer.co/v3/advertiserUnreadOfferMarketUpdateTs.php

Requires Auth

Yes

Example Request

curl --request POST \
  --url https://api.monetizer.co/v3/advertiserUnreadOfferMarketUpdateTs.php \
  --header 'Accept: application/json' \
  --header 'X_AFFLOW_ADVERTISER_ACCESS_TOKEN: <Your access token>'

Response

Returns object with the following attributes:

Attribute Type Description
status String

The status of the operation. Should be equal to success.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

An unexpected error has occurred.

Example Response

{
  "status": "success"
}

Example Error Response

{
  "message": "Server error. Error ID: 8a3c7290"
}

Get OSes for Push Campaigns

 

Returns the list of operating system names that can be used to specify the OS targeting for push campaigns (offers).

URL

https://api.monetizer.co/v2/AdvertiserPushNotification

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
a os Yes

Specifies the action to perform.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v2/AdvertiserPushNotification?a=os' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns array with operating system names.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

Unexpected error occurred during handling of request.

400 Bad Request Invalid action

The a parameter is invalid.

Example Response

[
  "Android",
  "Fire OS",
  "Linux",
  "Mac",
  "Windows"
]

Example Error Response

{
  "message": "Invalid action"
}

Get The List Of OSes

 

Returns the list of supported operating systems names, that can be used to specify a campaign (offer) OS targeting.

The operating system names returned by this endpoint can't be used to specify the OS targeting of push campaigns.
See how to get operating system names that can be used for push campaigns here.

URL

https://api.monetizer.co/data/partner-ls-os.php

Requires Auth

Yes

Example Request

curl --request GET \
  --url https://api.monetizer.co/data/partner-ls-os.php \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
os_name String

The Operating System identifier.

Errors

HTTP Status Code Message Description
500 Internal Server Error No DB

No database connection.

Example Response

[
  {
    "os_name": "Android"
  },
  {
    "os_name": "iOS"
  },
  {
    "os_name": "Windows-Desktop"
  },
  ...
]

Example Error Response

{
  "message": "No DB"
}    

Create a Traffic Request

 

Creates a new traffic request.

URL

https://api.monetizer.co/v3/advertiser-requests.php

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action create Yes

Specifies the action to perform.

traffic_type String Yes

The traffic type that offer accepts.

Supported values:

  • search engine - Search Engine
  • ppv - PPV
  • social - Social
  • push - Push Notifications
  • native - Native
  • video - Video
  • pop - Pop
  • seo - SEO
  • ecommerce - Ecommerce
  • incentive - Incentive
  • adult - Adult
  • other - Other
conversion_flow String Yes

The conversion flow or vertical of the offer for which traffic is requested.

Supported values:

  • carrier billing - Carrier Billing
  • leadgen - Leadgen
  • revshare - Revshare
  • sweepstakes - Sweepstakes
  • cpi - CPI (Apps)
  • dating - Dating
  • cash on delivery - Cash on Delivery
  • ecommerce - ECommerce
  • apk direct download - APK/Direct Download
  • finance insurance - Finance/Insurance
  • cc submit - CC Submit
  • nutra - Nutra
  • other - Other
payout Float No

The payout value in USD of the offer for which traffic is requested. Default is null (not specified / no constraints)

daily_budget Float No

The daily budget in USD of the offer for which traffic is requested. Default is null (not specified / no constraints)

geo String | Array Yes

Specifies the country targeting of the offer for which traffic is requested. You should use ISO 3166 alpha-2 country codes (upper case) to specify countries.

You may use string with comma separated country codes or an array of country codes.

Important: The maximum allowed number of countries is 10.

device String Yes

The device type of the requested traffic. (The device type targeting of the offer for which traffic is requested.)

Allowed values: mobile, desktop, all.

connection_type String Yes

The connection type of the requested traffic. (The connection type targeting of the offer for which traffic is requested.)

Allowed values: cellular, wifi, all.

carrier_data Array No

The array of carriers (providers) from which traffic is requested.

os_data Array No

The array of operating system names that specifies the OS targeting of the offer for which traffic is requested.

See how to obtain list of supported operating systems here.

comments String No

The comments of the request.

Write here any additional info (it will be searchable on the main page). But please don’t share contact information.

Note: Changing this field after approval will require re-approval.

offer_screenshot File Yes

The screenshot of the offer page for which traffic is requested.

Important: Only png or jpg images with size <2.5MB are supported.

notify Integer No

The number 0 or 1 that indicates whether you should be notified about creation of new offer requests that match this traffic request. Default is 1.

Example Request

curl --request POST \
  --url https://api.monetizer.co/v3/advertiser-requests.php \
  --header 'accept: application/json' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --form action=create \
  --form traffic_type=social \
  --form conversion_flow=leadgen \
  --form payout=1.1 \
  --form daily_budget=200 \
  --form geo=US \
  --form device=mobile \
  --form connection_type=cellular \
  --form 'os_data[]=Android' \
  --form 'os_data[]=iOS' \
  --form 'comments=Test comment' \
  --form offer_screenshot= \
  --form notify=1

Response

Returns an object with the following attributes:

Attribute Type Description
status String

The status of the operation. Should be ok on success.

data Object

The created traffic request object. See the description of traffic request object here.

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The required action parameter is not set.

400 Bad Request Unsupported action

The value of action parameter is invalid.

406 Not Acceptable You should have at least $500 to create a request.

You should increase your balance at least to the $500 to be able to create a traffic request.

406 Not Acceptable Not enough funds for this request. Have at least ...

To be able to create a new traffic request your outstanding balance should be greater than or equal to the request’s payout value (daily budget in USD).

400 Bad Request Traffic type is not specified or invalid.

The required traffic_type parameter is not set or is invalid.

400 Bad Request Flow/Vertical is not specified or invalid.

The required conversion_flow parameter is not set or is invalid.

400 Bad Request Incorrect Payout value. It must be a number greater than zero or empty value.

The payout value is invalid. You should provide positive float number or not provide value at all.

400 Bad Request Incorrect Daily budget value. It must be a number greater than zero or empty value.

The daily_budget value is invalid. You should provide positive float number or not provide value at all.

400 Bad Request Country is not specified.

The required geo parameter is not set.

400 Bad Request No more than 10 countries allowed.

The maximum number of countries that may be specified for traffic request is 10.

400 Bad Request Invalid country

The value of geo parameter is invalid.

400 Bad Request Device is not specified or incorrect.

The device parameter is not set or has invalid value.

400 Bad Request Connection type is not specified or incorrect.

The connection_type parameter is not set or has invalid value

400 Bad Request Offer screenshot must be a valid jpg or png file

The offer_screenshot parameter should be valid jpg or png file.

400 Bad Request Offer screenshot: image upload error

Some error occurred during uploading the offer screenshot image file.

400 Bad Request Offer screenshot: uploaded file cannot be larger than 2.5MB.

The offer screenshot image file should be lesser than 2.5MB.

400 Bad Request You are not allowed to create new traffic requests

The ability to create new traffic requests is disabled for your account.

Example Response

{
  "status": "ok",
  "data": {
    "network_id": 12542,
    "traffic_type": "social",
    "conversion_flow": "leadgen",
    "payout": 1.1,
    "daily_budget": 200,
    "geo": "US",
    "device": "mobile",
    "connection_type": "cellular",
    "carrier_data": null,
    "os_data": "[\"Android\",\"iOS\"]",
    "comments": "Test comment",
    "offer_screenshot": "12542_1600787149.4937.png",
    "notify": 1,
    "name": "Traffic wanted: Leadgen - United States",
    "keywords": "United States mobile cellular Android iOS",
    "id": "41",
    "status": "pending",
    "created_at": "2020-09-22 11:05:51",
    "archived": 0
  }
}

Example Error Response

{
  "message": "No more than 10 countries allowed."
}

Delete a Traffic Request

 

Deletes specified traffic requests.

URL

https://api.monetizer.co/v3/advertiser-requests.php

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action delete Yes

Specifies the action to perform.

ids Array Yes

The array of traffic requests IDs.

Example Request

curl --request POST \
  --url https://api.monetizer.co/v3/advertiser-requests.php \
  --header 'accept: application/json' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --data action=delete \
  --data 'ids[]=42'

Response

Returns an object with the following attributes:

Attribute Type Description
status String

The status of the operation. Should be ok on success.

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The required action parameter is not set.

400 Bad Request Unsupported action

The value of action parameter is invalid.

400 Bad Request Ids are not specified

The ids parameter is not set or is invalid.

Example Response

{
  "status": "ok",
}

Example Error Response

{
  "message": "Ids are not specified"
}

Get Own Traffic Requests

 

Returns an array of own traffic requests.

URL

https://api.monetizer.co/v3/advertiser-requests.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
action getRequests Yes

Specifies the action to perform.

page Integer No

The page number. Default value is equal to 1 (first page).

perPage Integer No

The number of requests per page. The value should be >= 1 or <= 100. Default value is equal to 25.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v3/advertiser-requests.php?action=getRequests&page=1&perPage=2' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
id Integer

The ID of the request.

name String

The title of the request.

traffic_type String | null

The traffic type that offer accepts.

conversion_flow String

The conversion flow or vertical of the offer for which traffic is requested.

payout Numeric String | null

The payout value in USD of the offer for which traffic is requested.

daily_budget Numeric String | null

The daily budget in USD of the offer for which traffic is requested.

geo String

The comma separated list of country codes in ISO 3166 alpha-2 (upper case) format.

It specifies the country targeting of the offer for which traffic is requested.

device String

The device type of the requested traffic. (The device type targeting of the offer for which traffic is requested.) Possible values: mobile, desktop, all.

connection_type String

The connection type of the requested traffic. (The connection type targeting of the offer for which traffic is requested.) Possible values: cellular, wifi, all.

carrier_data String | null

The JSON encoded array of carriers (providers) from which traffic is requested.

os_data String | null

The JSON encoded array of operating system names that specifies the OS targeting of the offer for which traffic is requested.

offer_screenshot String

The URL of the screenshot of the offer for which traffic is requested.

comments String

The comments of the request.

network_id Integer

The ID of your account.

created_at String

The time when the request was created. (New York time zone)

updated_at String

The time of the last update of the request. (New York time zone)

status String

The status of the request.

Possible values: approved, rejected, pending (pending for approval)

archived Integer

Determines whether the request is archived (deleted) or not. It should be equal to 0.

notify Integer

Determines whether you should be notified about creation of new offer requests that match this traffic request.

rejection_reason String | null

The rejection reason of the request. (It is set only if request has rejected status)

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The required action parameter is not set.

400 Bad Request Unsupported action

The value of action parameter is invalid.

Example Response

[
  {
    "id": 39,
    "name": "Traffic wanted: Revshare - Cyprus...",
    "traffic_type": "social",
    "conversion_flow": "revshare",
    "payout": null,
    "daily_budget": null,
    "geo": "CY,EC",
    "device": "all",
    "connection_type": "all",
    "carrier_data": null,
    "os_data": null,
    "offer_screenshot": "https://api.monetizer.co/offer_preview/12542_1594385412.9828.png",
    "comments": "",
    "network_id": 12542,
    "created_at": "2020-07-10 12:50:13",
    "updated_at": "2020-07-10 12:50:13",
    "status": "pending",
    "archived": 0,
    "notify": 1,
    "rejection_reason": null
  },
  {
    "id": 38,
    "name": "Traffic wanted: Carrier Billing - Belgium",
    "traffic_type": "other",
    "conversion_flow": "carrier billing",
    "payout": "0.10000",
    "daily_budget": "200.00000",
    "geo": "BE",
    "device": "mobile",
    "connection_type": "cellular",
    "carrier_data": null,
    "os_data": "[\"Android\",\"iOS\"]",
    "offer_screenshot": "https://api.monetizer.co/offer_preview/12542_1594320299.7305.png",
    "comments": "",
    "network_id": 12542,
    "created_at": "2020-07-09 18:45:00",
    "updated_at": "2020-07-10 12:49:35",
    "status": "pending",
    "archived": 0,
    "notify": 1,
    "rejection_reason": null
  }
]

Example Error Response

{
  "message": "Missing \"action\" parameter"
}

Update a Traffic Request

 

Updates the specified traffic request.

URL

https://api.monetizer.co/v3/advertiser-requests.php

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action update Yes

Specifies the action to perform.

id Integer Yes

The ID of the traffic request.

traffic_type String Yes

The traffic type that offer accepts.

Supported values:

  • search engine - Search Engine
  • ppv - PPV
  • social - Social
  • push - Push Notifications
  • native - Native
  • video - Video
  • pop - Pop
  • seo - SEO
  • ecommerce - Ecommerce
  • incentive - Incentive
  • adult - Adult
  • other - Other
conversion_flow String Yes

The conversion flow or vertical of the offer for which traffic is requested.

Supported values:

  • carrier billing - Carrier Billing
  • leadgen - Leadgen
  • revshare - Revshare
  • sweepstakes - Sweepstakes
  • cpi - CPI (Apps)
  • dating - Dating
  • cash on delivery - Cash on Delivery
  • ecommerce - ECommerce
  • apk direct download - APK/Direct Download
  • finance insurance - Finance/Insurance
  • cc submit - CC Submit
  • nutra - Nutra
  • other - Other
payout Float No

The payout value in USD of the offer for which traffic is requested. Default is null (not specified / no constraints)

daily_budget Float No

The daily budget in USD of the offer for which traffic is requested. Default is null (not specified / no constraints)

geo String | Array Yes

Specifies the country targeting of the offer for which traffic is requested. You should use ISO 3166 alpha-2 country codes (upper case) to specify countries.

You may use string with comma separated country codes or an array of country codes.

Important: The maximum allowed number of countries is 10.

device String Yes

The device type of the requested traffic. (The device type targeting of the offer for which traffic is requested.)

Allowed values: mobile, desktop, all.

connection_type String Yes

The connection type of the requested traffic. (The connection type targeting of the offer for which traffic is requested.)

Allowed values: cellular, wifi, all.

carrier_data Array No

The array of carriers (providers) from which traffic is requested.

os_data Array No

The array of operating system names that specifies the OS targeting of the offer for which traffic is requested.

See how to obtain list of supported operating systems here.

comments String No

The comments of the request.

Write here any additional info (it will be searchable on the main page). But please don’t share contact information.

Note: Changing this field after approval will require re-approval.

notify Integer No

The number 0 or 1 that indicates whether you should be notified about creation of new offer requests that match this traffic request. Default is 1.

Example Request

curl --request POST \
  --url https://api.monetizer.co/v3/advertiser-requests.php \
  --header 'accept: application/json' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --form action=update \
  --form id=41 \
  --form traffic_type=social \
  --form conversion_flow=leadgen \
  --form payout=1.4 \
  --form daily_budget=200 \
  --form 'geo=US,CA' \
  --form device=mobile \
  --form connection_type=cellular \
  --form 'os_data[]=Android' \
  --form 'os_data[]=iOS' \
  --form 'comments=Test comment' \
  --form notify=1

Response

Returns an object with the following attributes:

Attribute Type Description
status String

The status of the operation. Should be ok on success.

data Object

The updated traffic request object. See the description of traffic request object here.

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The required action parameter is not set.

400 Bad Request Unsupported action

The value of action parameter is invalid.

400 Bad Request Id is not specified.

The id parameter is not set.

403 Forbidden Forbidden

You provided not valid access token or tried to update not your traffic request.

400 Bad Request Editing of rejected requests is not allowed

Traffic requests with rejected status can not be edited.

400 Bad Request Traffic type is not specified or invalid.

The required traffic_type parameter is not set or is invalid.

400 Bad Request Flow/Vertical is not specified or invalid.

The required conversion_flow parameter is not set or is invalid.

400 Bad Request Incorrect Payout value. It must be a number greater than zero or empty value.

The payout value is invalid. You should provide positive float number or not provide value at all.

400 Bad Request Incorrect Daily budget value. It must be a number greater than zero or empty value.

The daily_budget value is invalid. You should provide positive float number or not provide value at all.

400 Bad Request Country is not specified.

The required geo parameter is not set.

400 Bad Request No more than 10 countries allowed.

The maximum number of countries that may be specified for traffic request is 10.

400 Bad Request Invalid country

The value of geo parameter is invalid.

400 Bad Request Device is not specified or incorrect.

The device parameter is not set or has invalid value.

400 Bad Request Connection type is not specified or incorrect.

The connection_type parameter is not set or has invalid value

400 Bad Request Offer screenshot must be a valid jpg or png file

The offer_screenshot parameter should be valid jpg or png file.

400 Bad Request Offer screenshot: image upload error

Some error occurred during uploading the offer screenshot image file.

400 Bad Request Offer screenshot: uploaded file cannot be larger than 2.5MB.

The offer screenshot image file should be lesser than 2.5MB.

400 Bad Request You are not allowed to update traffic requests

The ability to update traffic requests is disabled for your account.

Example Response

{
  "status": "ok",
  "data": {
    "id": 41,
    "traffic_type": "social",
    "conversion_flow": "leadgen",
    "payout": 1.4,
    "daily_budget": 200,
    "comments": "Test comment",
    "geo": "US,CA",
    "device": "mobile",
    "connection_type": "cellular",
    "carrier_data": null,
    "os_data": "[\"Android\",\"iOS\"]",
    "offer_screenshot": "12542_1600787149.4937.png",
    "status": "pending",
    "network_id": 12542,
    "created_at": "2020-09-22 15:05:49",
    "updated_at": "2020-09-22 16:53:46",
    "archived": 0,
    "notify": 1,
    "name": "Traffic wanted: Leadgen - United States...",
    "rejection_reason": null,
    "old_comments": null,
    "edited": 0,
    "keywords": "United States Canada mobile cellular Android iOS"
  }
}

Example Error Response

{
  "message": "Id is not specified."
}

Get a Publisher Share

 

Returns the value of the share of the specified publisher.

You may use this value to calculate the partner’s payout. For example, if returned value is equal to 80, then 80% of the campaign’s payout will be paid to the publisher and 20% of the campaign’s payout will be deducted as Monetizer fee.

URL

https://api.monetizer.co/v3/advertiserPublisherShare.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
id Integer Yes

The ID of the publisher.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v3/advertiserPublisherShare.php?id=14144' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns null if there is no publisher with specified ID or an object with the following attributes:

Attribute Type Description
share Numeric String

The value of the publisher’s share in percents.

Errors

HTTP Status Code Message Description
400 Bad Request Id is not set

The required id parameter is not provided.

500 Internal Server Error Server error. Error ID: ...

An unexpected error occurred.

Example Response

{
  "share": "80.00"
}

Example Error Response

{
  "message": "Id is not set"
}

Validate a Publisher ID

 

Checks if a publisher exists with given identifier.

URL

https://api.monetizer.co/data/advertiser-offers.php

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
action validatePartnerId Yes

Specifies the action to perform.

id Integer Yes

The unique identifier of the publisher.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/data/advertiser-offers.php?action=validatePartnerId&id=14144' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns object with following attributes:

Attribute Type Description
status String

If status value is 'success' then publisher with given id exists, else if status value is 'error' then publisher with given id does not exists.

Errors

HTTP Status Code Message Description
400 Bad Request Missing "action" parameter

The value of the action parameter is missing

400 Bad Request Unsupported action

The value of the action parameter is invalid.

400 Bad Request `id` is required

The id parameter is not set or is invalid.

500 Internal Server Error Internal Server Error

An unexpected error has occurred

Example Response

{
  "status": "success"
}

Example Error Response

{
  "message": "`id` is required"
}

Create a Push Campaign

 

Creates a new push campaign (offer).

The created campaign will be live (running) only after it will be approved by the admin.

You may create a new campaign only if you have completed your account details.
See how to get an account details and update account details.

URL

https://api.monetizer.co/v2/AdvertiserPushNotification

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action add Yes

Specifies the action to perform.

name String Yes

The name of the push campaign. (Up to 255 characters)

destinationUrl String Yes

The URL of the campaign (offer). This URL should include https:// and the following Monetizer placeholders:

  • [[partner_id]] is the publisher id in our system (mandatory)
  • [[pid]] is the placement id in our system, allowing you to block on a placement level rather than a publisher level (optional)
  • [[campaign_id]] is the ID or your campaign
  • [[click_cost]] is the cost per click (optional)
  • [[creative_id]] is the ID of the creative set (optional)
  • [[push_id]] is the push ID. It will be unique for a single click (i.e. if you see multiple clicks with the same pushid you should count it only once, because all subsequent clicks are free) (optional)
  • [[browser]] is the name and version of browser
  • [[os]] is the name of the operating system
  • [[carrier]] is the name of the carrier

Tip: Please use landing pages! Direct linking to offer pages will result in poor performance.

countryCode String Yes

The ISO 3166 alpha-2 country code in upper case that campaign is targeting.

device String Yes

The device that the campaign is targeting. Allowed values are mobile, desktop, both.

connection String Yes

The connection type that the campaign is targeting. Allowed values are wifi, cellular, both.

creativeSets Array Yes

The array of creative set IDs that should be assigned to this push campaign.

You should create at least one push creative set with push_notification_id attibute set to 0 and then use the IDs of these creative sets here to assign them to this push campaign.

See how to create a new push creative set here.

pushCost Float Yes

The cost of sending the push notification in US dollars. Set it to 0 if pay per click model should be used.

Important: For now the pay per push model is deprecated and not supported. So this parameter should be set to 0.

clickCost Float Yes

The campaign’s CPC bid in US dollars.

dailyBudget Float Yes

The amount in USD you wish to spend daily. Daily budget is spread across 24 hours evenly. Depending on your bid, your daily spend may exceed this goal due to delayed clicks.

Daily budget must be at least $20, but the $100+ is recommended for faster delivery.

preview File Yes

The preview image of your landing page or offer page (in case there is no landing page used).

Only png and jpeg formats supported. Maximum supported file size is 2.5Mb.

sendAfterTs Integer No

The Unix timestamp of the time when you would like to start sending push notifications.

sub_freshness Integer No

The subscription freshness in seconds. It specifies how fresh a subscription must be to send your push notification. Default value is 0 (ignore freshness).

cooldown Integer No

This parameter is used to determine how many times to send this push notification per user per day. In other words it determines the frequency cap. To have no frequency cap use value 0. For 1 push per 24 hours use value 86400, for 2 pushes per 24 hours use value 43200 and so on for n pushes per 24 hours use value 86400/n rounded to integer. The maximum allowed value is 86400.

carriers Array No

The carriers (connection providers) that the campaign is targeting. See how to obtain the list of supported carriers here.

os Array No

The list of operating systems that the campaign is targeting. See how to obtain the list of supported operating systems here.

language_data Array No

The list of ISO 639-1 language codes in lower case that the campaign is targeting.

partners_bl Array No

The publisher or the placement blacklist represented as an array of publisher IDs or placement IDs.

partners_wl Array No

The publisher or the placement whitelist represented as an array of publisher IDs or placement IDs.

Example Request

curl --request POST \
  --url https://api.monetizer.co/v2/AdvertiserPushNotification \
  --header 'accept: application/json' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --form action=add \
  --form 'name=Test push campaign 1' \
  --form 'destinationUrl=https://pntest.com/1111?pubid=[[partner_id]]&pid=[[pid]]&cid=[[creative_id]]' \
  --form countryCode=US \
  --form device=mobile \
  --form connection=cellular \
  --form 'creativeSets[]=26130' \
  --form pushCost=0 \
  --form clickCost=0.03 \
  --form dailyBudget=200 \
  --form preview= \
  --form sendAfterTs=1600116291 \
  --form cooldown=7200 \
  --form 'carriers[]=US AT&T' \
  --form 'carriers[]=US VERIZON' \
  --form 'os[]=Android'

Response

Returns object with following attributes:

Attribute Type Description
status String

The status of the operation. Possible values: success, error.

error Array

The array of error messages. This attribute is set only if status is equal to error.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

Unexpected error occurred during handling of request.

400 Bad Request Invalid action

The action parameter is invalid.

Example Response

{
  "status": "success"
}

Example Error Response

{
  "message": "Invalid action"
}

Delete a Push Campaign

 

Deletes a single campaign.

URL

https://api.monetizer.co/v2/AdvertiserPushNotification

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action delete Yes

Specifies the action to perform.

id Integer Yes

The ID of the push campaign.

Example Request

curl --request POST \
  --url https://api.monetizer.co/v2/AdvertiserPushNotification \
  --header 'accept: application/json' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --data action=delete \
  --data id=10185

Response

Returns object with following attributes:

Attribute Type Description
status String

The status of the operation.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

Unexpected error occurred during handling of request.

400 Bad Request Invalid action

The action parameter is invalid.

400 Bad Request id not present or invalid

The id parameter is not set or is invalid.

404 Not Found Campaign not found

Campaign with the specified id attribute not found.

400 Bad Request Not your push notification

The specified push campaign is not yours.

400 Bad Request No changes have been made

The specified campaign has already been deleted previously, or some db error has been occurred.

Example Response

{
  "status": "success"
}

Example Error Response

{
  "message": "No changes have been made"
}

Get Push Campaigns

 

Returns the list of all push campaigns for the calling advertiser.

Please note that objects that returned in the response include only limited set of push campaign properties with some stats data. If you want to obtain the more detailed info about push campaign use "Get a Push Campaign" action.

URL

https://api.monetizer.co/v2/AdvertiserPushNotification

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
a results Yes

Specifies the action to perform.

limit Integer No

Specifies the number of results to return per page. Default value is 100. If you want to obtain list of all your campaigns pass all value instead of number

page Integer No

Specifies the page number (0 based). Default value: 0.

order_field String No

Specifies the field that is used for sorting results.

Supported values:

  • title - order by campaign’s name;
  • spend - order by amount spend (only if spendTimeFrame parameter is specified);
  • created - order by campaign creation time (this is the default);
order_direction Integer No

The number that specifies direction order. The value -1 means ascending order and 1 - descending order. By default, It’s the ascending order.

filter Object No

The object that specifies filter conditions. Only campaigns that match specified conditions are returned. See below for available attributes.

filter.search String No

If this parameter is set then only campaigns with names that contain the value of this parameter are returned.

filter.status String No

Allows you to filter campaigns by status. Supported values: approved, pending, rejected, paused.

spendTimeFrame Object No

Specifies the time frame that is used to calculate amount spend, the total number of clicks and the total number of sent pushes.

If this parameter is not specified then the amount spend, the total number of clicks and the total number of sent pushes are not included in the response.

spendTimeFrame.from_ts Integer Yes

The Unix timestamp that specifies the start of the time frame.

spendTimeFrame.to_ts Integer No

The Unix timestamp that specifies the end of the time frame. Default value is equal to current timestamp.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v2/AdvertiserPushNotification?a=results&limit=50&page=0&filter%5Bstatus%5D=pending&filter%5Bsearch%5D=amazon&spendTimeFrame%5Bfrom_ts%5D=1594481636' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns array of push campaign objects with following attributes:

Attribute Type Description
name String

The name of the push campaign.

id Integer

The unique identifier of the push campaign.

created_ts Integer

The Unix timestamp of the time when the campaign was created.

send_after_ts Integer

The Unix timestamp that specifies the time after which the pushes should start.

country_code String

The ISO 3166 alpha-2 country code that campaign is targeting.

title String

The title of the push campaign.

status String

The status of the push campaign. Possible values: approved, pending, rejected, paused.

push_cost Numeric String

The cost of sending the push notification in US dollars. It is equal to 0.00000 if pay per click model is used.

daily_budget Numeric String

The daily budget of the push campaign.

connection String

The type of connection the campaign is targeting.

Possible values: wifi, cellular, both.

device String

The type of device the campaign is targeting.

Possible values: desktop, mobile, both.

reject_reason String

If campaign is rejected by admin then this attribute should contain the reason why it was rejected.

click_cost Numeric String

The campaign’s CPC bid in US dollars.

rank Float | null

The rank or the position of the campaign.

The position (rank) can be delayed up to 12 hours (so if you update your bid, you will need to check the effect it’s had later). We display your position as an average. 1.6 for example would mean your 1st in some targeting segments, and 6th in others.

topCost Float | null

The value of wining bid based on campaign’s CTR.

topCpm Float | null

The top value of the CPM.

avgCpc Float | null

The average value of cost per click.

targetCpc Float | null

The target value of cost per click.

liveCreatives Integer

The number of live creatives that are assigned to this push campaign.

totalCreatives Integer

The total number of creatives that are assigned to this push campaign.

spend Float | null

The amount in US dollars that was spend on the campaign during the specified timeframe.

sentTotal Integer | null

The total number of push notifications sent during the specified timeframe.

clickTotal Integer | null

The total number of clicks during the specified timeframe.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

Unexpected error occurred during handling of request.

400 Bad Request Invalid action

The a parameter is invalid.

Example Response

[
  {
    "name": "amazon1000",
    "id": 10180,
    "created_ts": 1582651046,
    "send_after_ts": 1582581600,
    "country_code": "DE",
    "title": "",
    "status": "pending",
    "push_cost": "0.00000",
    "daily_budget": "20.00000",
    "connection": "cellular",
    "device": "mobile",
    "reject_reason": null,
    "click_cost": "0.04000",
    "rank": null,
    "topCost": null,
    "topCpm": null,
    "avgCpc": null,
    "targetCpc": null,
    "liveCreatives": 2,
    "totalCreatives": 2,
    "spend": null,
    "sentTotal": null,
    "clickTotal": null
  }
]

Example Error Response

{
  "message": "Invalid action"
}

Get The Highest Bid

 

Returns the highest bid in US dollars among all push campaigns targeting specified country.

URL

https://api.monetizer.co/v2/AdvertiserPushNotification

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
a geoHighestBid Yes

Specifies the action to perform.

countryCode String Yes

The ISO 3166 alpha-2 country code in upper case.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v2/AdvertiserPushNotification?a=geoHighestBid&countryCode=US' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns object with following attributes:

Attribute Type Description
bid Integer

The highest bid value in USD.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

Unexpected error occurred during handling of request.

400 Bad Request Invalid action

The a parameter is invalid.

400 Bad Request Country not specified

The countryCode query parameter is not provided.

Example Response

{
  "bid": "1.00000"
}

Example Error Response

{
    "message": "Country not specified"
}

Get a Push Campaign

 

Returns a push campaign specified by the requested ID.

URL

https://api.monetizer.co/v2/AdvertiserPushNotification

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
id Integer Yes

The ID of the campaign.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v2/AdvertiserPushNotification?id=10182' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns object with following attributes:

Attribute Type Description
id Integer

The ID of the push campaign.

requestedByAdmin Boolean

The attribute that determines whether offer was created by the admin.

requestedById Integer

The ID of the advertiser who created this campaign.

createdTs Integer

The time of the creation of the campaign, represented as Unix timestamp.

sendAfterTs Integer

The Unix timestamp that specifies the time after which the pushes should start.

countryCode String

The ISO 3166 alpha-2 country code that campaign is targeting.

sendToAdminOnly Boolean

For regular push campaigns this attribute is equal to false. You may ignore it.

icon String | null

The URL of the icon. This attribute is deprecated.

Now icon URLs can be obtained from “List Push Creative Sets” response.

iconFilename String | null

The filename of the icon. This attribute is deprecated.

destinationUrl String

The URL of the push campaign.

status String

The status of the campaign. Possible values: pending, approved, rejected, paused, deleted.

previewUrl String

The URL of the preview image of your landing page or offer page (in case there is no landing page used).

volume Integer

This attribute is deprecated.

pushCost Float

The cost of sending the push notification in US dollars.

Important: For now the pay per push model is deprecated. So this parameter should be equal to 0.

clickCost Float

The campaign’s CPC bid in US dollars.

dailyBudget Float

The daily budget of the campaign.

Note: Depending on your bid, your daily spend may exceed this goal due to delayed clicks.

languageData Array | null

The list of ISO 639-1 language codes in lower case that the campaign is targeting.

settings null

This attribute is deprecated. It should always be equal to null.

connection String

The connection type that the campaign is targeting. Possible values are wifi, cellular, both.

device String

The device that the campaign is targeting. Possible values are mobile, desktop, both.

carrierData Array | null

The list of carriers (connection providers) that the campaign is targeting.

osData Array | null

The list of operating systems that the campaign is targeting.

partnersBlData Array | null

The publisher or the placement blacklist represented as an array of publisher IDs or placement IDs.

image String | null

The URL of the push notification image. This attribute is deprecated.

Now image URLs can be obtained from “List Push Creative Sets” response.

imageFilename String | null

The push notification image filename. This attribute is deprecated.

badge String | null

The url of the push notification badge. This attribute is deprecated.

Now badge URLs can be obtained from “List Push Creative Sets” response.

badgeFilename String | null

The badge filename. This attribute is deprecated.

name String

The name of the campaign.

rejectReason String | null

The rejection reason. This attribute is set only when campaign is rejected.

partnersWlData Array | null

The publisher or the placement whitelist represented as an array of publisher IDs or placement IDs.

subFreshness Integer

The subscription freshness in seconds. It specifies how fresh a subscription must be to send your push notification. A value of 0 means no constraints.

cooldown Integer

This parameter is used to determine how many times to send this push notification per user per day. In other words it determines the frequency cap. The number of pushes per user per day is equal to 86400/cooldown.

The maximum supported value is 86400.

urlOld String | null

The old URL of the campaign.

urlChanged Boolean

Determines whether the campaign’s URL has been changed.

topCost Float | null

The value of wining bid based on campaign’s CTR.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

Unexpected error occurred during handling of request.

400 Bad Request id not present or invalid

The id parameter is not set or is invalid.

404 Not Found Campaign not found

Campaign with the specified id attribute not found.

400 Bad Request Not your push notification

The specified push campaign is not yours.

Example Response

{
  "id": 10185,
  "requestedByAdmin": false,
  "requestedById": 12542,
  "createdTs": 1598464366,
  "sendAfterTs": 1600116240,
  "countryCode": "US",
  "sendToAdminOnly": false,
  "icon": null,
  "iconFilename": null,
  "destinationUrl": "https:\/\/pntest.com\/1111?pubid=[[partner_id]]&pid=[[pid]]&cid=[[creative_id]]",
  "status": "approved",
  "previewUrl": "https:\/\/api.monetizer.co\/offer_preview\/12542_1598464366.416.png",
  "volume": 0,
  "pushCost": 0,
  "clickCost": 0.03,
  "dailyBudget": 200,
  "languageData": null,
  "settings": null,
  "connection": "cellular",
  "device": "mobile",
  "carrierData": [
    "US AT&T",
    "US VERIZON"
  ],
  "osData": [
    "Android"
  ],
  "partnersBlData": null,
  "image": null,
  "imageFilename": null,
  "badge": null,
  "badgeFilename": null,
  "name": "Test push campaign 1",
  "rejectReason": null,
  "partnersWlData": null,
  "subFreshness": 0,
  "cooldown": 7200,
  "urlOld": null,
  "urlChanged": false,
  "topCost": null
}

Example Error Response

{
  "message": "id not present or invalid"
}

Pause a Push Campaign

 

Pauses a single push campaign.

URL

https://api.monetizer.co/v2/AdvertiserPushNotification

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action pause Yes

Specifies the action to perform.

id Integer Yes

The ID of the push campaign.

Example Request

curl --request POST \
  --url https://api.monetizer.co/v2/AdvertiserPushNotification \
  --header 'accept: application/json' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --data action=pause \
  --data id=10185

Response

Returns object with following attributes:

Attribute Type Description
status String

The status of the operation.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

Unexpected error occurred during handling of request.

400 Bad Request Invalid action

The action parameter is invalid.

400 Bad Request id not present or invalid

The id parameter is not set or is invalid.

404 Not Found Campaign not found

Campaign with the specified id attribute not found.

400 Bad Request Not your push notification

The specified push campaign is not yours.

400 Bad Request Unable to pause this push campaign

The specified push campaign can’t be paused.

500 Internal Server Error Unable to save changes

Due to DB error, the changes could not be saved.

Example Response

{
  "status": "success"
}

Example Error Response

{
  "message": "Unable to pause this push campaign"
}

Resume a Push Campaign

 

Resumes a single push campaign.

URL

https://api.monetizer.co/v2/AdvertiserPushNotification

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action resume Yes

Specifies the action to perform.

id Integer Yes

The ID of the push campaign.

Example Request

curl --request POST \
  --url https://api.monetizer.co/v2/AdvertiserPushNotification \
  --header 'accept: application/json' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --data action=resume \
  --data id=10185

Response

Returns object with following attributes:

Attribute Type Description
status String

The status of the operation.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

Unexpected error occurred during handling of request.

400 Bad Request Invalid action

The action parameter is invalid.

400 Bad Request id not present or invalid

The id parameter is not set or is invalid.

404 Not Found Campaign not found

Campaign with the specified id attribute not found.

400 Bad Request Not your push notification

The specified push campaign is not yours.

400 Bad Request Unable to resume this push campaign

The specified push campaign can’t be resumed.

500 Internal Server Error Unable to save changes

Due to DB error, the changes could not be saved.

Example Response

{
  "status": "success"
}

Example Error Response

{
  "message": "Unable to resume this push campaign"
}

Update a Push Campaign

 

Updates the specified push campaign (offer).

URL

https://api.monetizer.co/v2/AdvertiserPushNotification

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action update Yes

Specifies the action to perform.

id Integer Yes

The ID of the push campaign.

name String Yes

The name of the push campaign. (Up to 255 characters)

destinationUrl String Yes

The URL of the campaign (offer). This URL should include https:// and the following Monetizer placeholders:

  • [[partner_id]] is the publisher id in our system (mandatory)
  • [[pid]] is the placement id in our system, allowing you to block on a placement level rather
  • [[campaign_id]] is the ID or your campaign than a publisher level (optional)
  • [[click_cost]] is the cost per click (optional)
  • [[creative_id]] is the ID of the creative set (optional)
  • [[push_id]] is the push ID. It will be unique for a single click (i.e. if you see multiple clicks with the same pushid you should count it only once, because all subsequent clicks are free) (optional)
  • [[browser]] is the name and version of browser
  • [[os]] is the name of the operating system
  • [[carrier]] is the name of the carrier

Tip: Please use landing pages! Direct linking to offer pages will result in poor performance.

Important: Changing the url will require re-approval of the campaign.

device String Yes

The device that the campaign is targeting. Allowed values are mobile, desktop, both.

connection String Yes

The connection type that the campaign is targeting. Allowed values are wifi, cellular, both.

creativeSets Array Yes

The array of creative set IDs that should be assigned to this push campaign.

See how to create a new push creative set here.

pushCost Float Yes

The cost of sending the push notification in US dollars. Set it to 0 if pay per click model should be used.

Important: For now the pay per push model is deprecated and not supported. So this parameter should be set to 0.

clickCost Float Yes

The campaign’s CPC bid in US dollars.

dailyBudget Float Yes

The amount in USD you wish to spend daily. Daily budget is spread across 24 hours evenly. Depending on your bid, your daily spend may exceed this goal due to delayed clicks.

Daily budget must be at least $20, but the $100+ is recommended for faster delivery.

sendAfterTs Integer No

The Unix timestamp of the time when you would like to start sending push notifications.

sub_freshness Integer No

The subscription freshness in seconds. It specifies how fresh a subscription must be to send your push notification.

cooldown Integer No

This parameter is used to determine how many times to send this push notification per user per day. In other words it determines the frequency cap. To have no frequency cap use value 0. For 1 push per 24 hours use value 86400, for 2 pushes per 24 hours use value 43200 and so on for n pushes per 24 hours use value 86400/n rounded to integer. The maximum allowed value is 86400.

carriers Array No

The carriers (connection providers) that the campaign is targeting. See how to obtain the list of supported carriers here.

Warning: If you do not set this parameter its value will be reset to default value null (all carriers).

os Array No

The list of operating systems that the campaign is targeting. See how to obtain the list of supported operating systems here.

Warning: If you do not set this parameter its value will be reset to default value null (all OSes).

language_data Array No

The list of ISO 639-1 language codes in lower case that the campaign is targeting.

Warning: If you do not set this parameter its value will be reset to default value null (all languages).

partners_bl Array No

The publisher or the placement blacklist represented as an array of publisher IDs or placement IDs.

Warning: If you do not set this parameter its value will be reset to default value null (no blacklist).

partners_wl Array No

The publisher or the placement whitelist represented as an array of publisher IDs or placement IDs.

Warning: If you do not set this parameter its value will be reset to default value null (no whitelist).

Example Request

curl --request POST \
  --url https://api.monetizer.co/v2/AdvertiserPushNotification \
  --header 'accept: application/json' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --form action=update \
  --form id=10185 \
  --form 'name=Test push campaign 1' \
  --form 'destinationUrl=https://pntest.com/1111?pubid=[[partner_id]]&pid=[[pid]]&cid=[[creative_id]]' \
  --form device=mobile \
  --form connection=cellular \
  --form 'creativeSets[]=26130' \
  --form pushCost=0 \
  --form clickCost=0.03 \
  --form dailyBudget=200 \
  --form sendAfterTs=1600116291 \
  --form cooldown=3600 \
  --form 'carriers[]=US AT&T' \
  --form 'carriers[]=US VERIZON' \
  --form 'os[]=Android' \
  --form 'language_data[]=en'

Response

Returns object with following attributes:

Attribute Type Description
status String

The status of the operation. Possible values: success, error.

error Array

The array of error messages. This attribute is set only if status is equal to error.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

Unexpected error occurred during handling of request.

400 Bad Request Invalid action

The action parameter is invalid.

400 Bad Request id not present or invalid

The id parameter is not set or is invalid.

404 Not Found Campaign not found

Campaign with the specified id attribute not found.

400 Bad Request Not your push notification

The specified push campaign is not yours.

Example Response

{
  "status": "success"
}

Example Error Response

{
  "message": "id not present or invalid"
}

Create a Push Creative Set

 

Creates a new push creative set.

Note: Push creative sets are used to rotate push notifications for your push campaign.

URL

https://api.monetizer.co/v2/AdvertiserPushNotification

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action uploadCreatives Yes

Specifies the action to perform.

push_notification_id Integer Yes

The unique identifier of the push campaign that is equal to the value of id attribute of the Push Campaign Object.

The created push creative set will be assigned to the specified push campaign.

Note: You can use the value 0 instead of an existing push campaign ID to create a creative set, which will not be assigned to any push campaign and add (assign) this created set to one of your push campaigns at any time.

title String Yes

The title to send with push notification. (Maximum 255 characters)

You may use the following placeholders:

  • [[country]] - the name of the country of the subscription;
  • [[city]] - the name of the city of the subscription;
  • [[carrier]] - the carrier of the subscription;
  • [[os]] - the OS of the subscription;
  • [[random|series]] - for example [[option1|option2|option3]] etc.
body String Yes

A short message to send with push notification. (Maximum 255 characters)

You may use the following placeholders:

  • [[country]] - the name of the country of the subscription;
  • [[city]] - the name of the city of the subscription;
  • [[carrier]] - the carrier of the subscription;
  • [[os]] - the OS of the subscription;
  • [[random|series]] - for example [[option1|option2|option3]] etc.
icon File Yes

The image file of the icon to send with push notification. Only png and jpeg formats are supported. Maximum allowed size is 2.5Mb.

image File No

The image file of the push notification. Only png and jpeg formats are supported. Maximum allowed size is 2.5Mb.

badge File No

The image file of the monochrome badge of the push notification. Only png and jpeg formats are supported. Maximum allowed size is 2.5Mb.

Example Request

curl --request POST \
  --url https://api.monetizer.co/v2/AdvertiserPushNotification \
  --header 'accept: application/json' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --form action=uploadCreatives \
  --form push_notification_id=10180 \
  --form 'title=Test title' \
  --form 'body=The message of the push notification' \
  --form icon=

Response

Returns object with following attributes:

Attribute Type Description
status String

The status of the operation. Possible values: success, error.

error Array

This attribute is set only when status is equal to error. It contains the array of error messages.

id Integer

The ID of the created push creative set.

icon String

The URL of the icon of the created push creative set.

image String

The URL of the image of the created push creative set or empty string.

badge String

The URL of the monochrome badge of the created push creative set or empty string.

title String

The title of the created push creative set.

body String

The body of the created push creative set.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

Unexpected error occurred during handling of request.

400 Bad Request Invalid action

The action parameter is invalid.

Example Response

{
  "status": "success",
  "id": 26125,
  "icon": "https:\/\/cdn.pushmart.net\/icons\/12542_1598293284.1464.png",
  "image": "",
  "badge": "",
  "title": "Test title",
  "body": "The message of the push notification"
}

Example Error Response

{
  "message": "Invalid action"
}

Delete a Push Creative Set

 

Deletes a single push creative set.

You can't delete the push creative set if it is the last active creative set of the push campaign.

URL

https://api.monetizer.co/v2/AdvertiserPushNotification

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action deleteSet Yes

Specifies the action to perform.

id Integer Yes

The ID of the creative set that should be deleted.

Example Request

curl --request POST \
  --url https://api.monetizer.co/v2/AdvertiserPushNotification \
  --header 'accept: application/json' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --data action=deleteSet \
  --data id=26126

Response

Returns object with following attributes:

Attribute Type Description
status String

The status of the operation.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

Unexpected error occurred during handling of request.

400 Bad Request Invalid action

The action parameter is invalid.

400 Bad Request id is required

The id parameter is not set.

400 Bad Request You must have at least one active creative set per campaign

You can’t delete the last active creative set assigned to the push campaign.

Example Response

{
  "status": "success"
}

Example Error Response

{
  "message": "You must have at least one active creative set per campaign"
}

List Push Creative Sets

 

List all creative sets for the specified push notification campaign.

The notification rotates through its active creative sets.

URL

https://api.monetizer.co/v2/AdvertiserPushNotification

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
a creativeSets Yes

Specifies the action to perform.

id Integer Yes

The unique identifier of the push campaign that is equal to the value of id attribute of the Push Campaign Object.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v2/AdvertiserPushNotification?a=creativeSets&id=10180' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
id Integer

The unique identifier of the push creative set.

title String

The title to send with push notification.

body String

A short message to send with push notification.

icon String

The URL of the icon to send with push notification.

badge String | null

The URL of the monochrome badge for push notification.

image String | null

The URL of the image of the push notification.

status Integer

The status of the creative set. The value 1 means active and 2 - paused.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

Unexpected error occurred during handling of request.

400 Bad Request Invalid action

The a parameter is invalid.

400 Bad Request id is required

The parameter id is required.

Example Response

[
  {
    "id": 26118,
    "title": "Test push notification  title for [[os]] ",
    "body": "Test push notification message ",
    "icon": "https:\/\/cdn.pushmart.net\/icons\/12542_1598278677.9177.png",
    "badge": null,
    "image": "https:\/\/cdn.pushmart.net\/push_images\/12542_1598278677.9233.png",
    "status": 1
  }
]

Example Error Response

{
  "message": "id is required"
}

Pause a Push Creative Set

 

Pauses a single push creative set.

You can't pause the push creative set if it is the last active creative set of the push campaign.

URL

https://api.monetizer.co/v2/AdvertiserPushNotification

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action pauseSet Yes

Specifies the action to perform.

id Integer Yes

The ID of the creative set that should be paused.

Example Request

curl --request POST \
  --url https://api.monetizer.co/v2/AdvertiserPushNotification \
  --header 'accept: application/json' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --data action=pauseSet \
  --data id=26125

Response

Returns object with following attributes:

Attribute Type Description
status String

The status of the operation.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

Unexpected error occurred during handling of request.

400 Bad Request Invalid action

The action parameter is invalid.

400 Bad Request id is required

The id parameter is not set.

400 Bad Request You must have at least one active creative set per campaign

You can’t pause the last active creative set assigned to the push campaign.

Example Response

{
  "status": "success"
}

Example Error Response

{
  "message": "You must have at least one active creative set per campaign"
}

Resume a Push Creative Set

 

Resumes (unpauses) a single push creative set.

URL

https://api.monetizer.co/v2/AdvertiserPushNotification

Requires Auth

Yes

Request Body Parameters

Name Type/Value Required? Description
action resumeSet Yes

Specifies the action to perform.

id Integer Yes

The ID of the creative set that should be resumed.

Example Request

curl --request POST \
  --url https://api.monetizer.co/v2/AdvertiserPushNotification \
  --header 'accept: application/json' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --header 'x_afflow_advertiser_access_token: <Your access token>' \
  --data action=resumeSet \
  --data id=26125

Response

Returns object with following attributes:

Attribute Type Description
status String

The status of the operation.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

Unexpected error occurred during handling of request.

400 Bad Request Invalid action

The action parameter is invalid.

400 Bad Request id is required

The id parameter is not set.

Example Response

{
  "status": "success"
}

Example Error Response

{
  "message": "id is required"
}

Get Geo Totals

 

Returns the numbers of available active subscriptions for each country.

URL

https://api.monetizer.co/v2/AdvertiserPushNotification

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
a geoTotals Yes

Specifies the action to perform.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v2/AdvertiserPushNotification?a=geoTotals' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
country String

The ISO 3166 alpha-2 country code in upper case.

total Numeric String

The number of available active subscriptions for country specified by country attribute.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

Unexpected error occurred during handling of request.

400 Bad Request Invalid action

The a parameter is invalid.

Example Response

[
  {
    "country": "00",
    "total": "339"
  },
  {
    "country": "AD",
    "total": "722"
  },
  {
    "country": "AE",
    "total": "181393"
  },
  {
    "country": "AF",
    "total": "35590"
  },
  ...
]

Example Error Response

{
  "message": "Invalid action"
}

Get a Volume

 

Returns the number of available subscriptions for specified country. This number can be used to estimate the maximum daily volume of push notifications to send for specified country.

URL

https://api.monetizer.co/v2/AdvertiserPushNotification

Requires Auth

Yes

Query Parameters

Name Type/Value Required? Description
a volume Yes

Specifies the action to perform.

country_code String Yes

The ISO 3166 alpha-2 country code in upper case.

Example Request

curl --request GET \
  --url 'https://api.monetizer.co/v2/AdvertiserPushNotification?a=volume&country_code=US' \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns object with following attributes:

Attribute Type Description
volume Integer

The number of available subscriptions.

Errors

HTTP Status Code Message Description
500 Internal Server Error Server error. Error ID: ...

Unexpected error occurred during handling of request.

400 Bad Request Invalid action

The a parameter is invalid.

400 Bad Request Valid country code is required

The country_code query parameter is not set or is invalid.

Example Response

{
  "volume": 1509097
}

Example Error Response

{
  "message": "Valid country code is required"
}

List all Verticals

 

Returns the list of all active verticals.

URL

https://api.monetizer.co/data/vertical.php

Requires Auth

Yes

Example Request

curl --request GET \
  --url https://api.monetizer.co/data/vertical.php \
  --header 'accept: application/json' \
  --header 'x_afflow_advertiser_access_token: <Your access token>'

Response

Returns an array of objects with the following attributes:

Attribute Type Description
str String

The name of the vertical

mainstream Numeric String

The number 0 (false) or 1 (true) that indicates whether the vertical belongs to mainstream category.

adult Numeric String

The number 0 (false) or 1 (true) that indicates whether the vertical belongs to adult category.

mobile Numeric String

The number 0 (false) or 1 (true) that indicates whether the vertical belongs to mobile category.

desktop Numeric String

The number 0 (false) or 1 (true) that indicates whether the vertical belongs to desktop category.

Errors

HTTP Status Code Message Description
500 Internal Server Error No DB Connection

No database connection.

Example Response

[
  {
    "str": "adult",
    "mainstream": "0",
    "adult": "1",
    "mobile": "1",
    "desktop": "0"
  },
  {
    "str": "adult_desktop",
    "mainstream": "0",
    "adult": "1",
    "mobile": "0",
    "desktop": "1"
  },
  {
    "str": "aggressive",
    "mainstream": "1",
    "adult": "1",
    "mobile": "1",
    "desktop": "0"
  },
  {
    "str": "aggressive_desktop",
    "mainstream": "1",
    "adult": "1",
    "mobile": "0",
    "desktop": "1"
  },
  ...
]

Example Error Response

{
  "message": "No DB Connection"
}