Access push demand via API. Each request will return the following assets that you can use for external push messaging: Title, Message, URL, Image, and Payout information.
POST
#Content-Type application/json
https://api.smpush.com/ads-api/get-content/{apiKey}
| Property | Type | Required | Description |
| pubId | integer | yes | Your assigned account ID |
| ip | string | yes | The end user's IP address |
| userAgent | string | yes | The end user's user agent |
| src1 | string | no | Source information supplied by pub |
| cid | string | no | Category ID that represents the audience type |
| externalid | string | no | An ID that represents the individual user |
| lang | string | yes | 2 letter ISO 639-1 language code or whatever is parsed from the accept-language header. |
| string | no | The end user's email address | |
| email_md5 | string | no | The end user's email address in md5 format |
*Category ID dictionary can be found here
Example:
curl -X POST --header 'Content-Type: application/json' -d '{ \
"ip": "string", \
"pubId": "string", \
"userAgent": "string", \
"cid": "string", \
"lang": "string", \
"src1": "string" \
}' 'https://api.smpush.com/ads-api/get-content/{apiKey}’
GET
# Content-Type application/json
https://api.smpush.com/ads-api/get-content/{apikey}?ip={users.ip.address}&userAgent={useragent}&pubId={pubid}&src1={trafficsource.id}&cid={category.id}&lang={lang-iso-code}
Response
# Accept:application/json
| Property | Description |
| title | Content headline |
| redirect | Content destination URL |
| imageLocation | URL of the content image |
| message | Long form text |
| revenueType | Revenue Type |
| cpc | Payout in USD |
Example Response - JSON format
{
"title":"Your New iPhone XS is Waiting!",
"message":"You have 30 minutes to claim your phone, or
someone else will!",
"redirect":"https://pushclk.com/tr/t/2A8AVbdE64QO3mXRVDVOrl7l8MK
_qXTtfDrECaXjt8W0KjU_IT1-BBSw...",
"imageLocation":"https://pushclk.com/tr/o/2A8AVbdE64QO3mXRVDVOrr
V-VNc76F0OQ9FOlw8ANPX_Majr9E79TSS...",
"cpc":0.02156,
"revenueType":"CPC"
}
* API will return http status code 204 for legit API call that can't be fulfilled