All endpoint in our API use JWT-based authentication. To retrieve the Authorization token, publishers' must login with their credentials (which will be provided by Outpush).
The request response will contain an access token, which must be used in the header of any request to any authenticated endpoint
Authorization: Bearer {YOUR_TOKEN}
https://publisher-api.pushmaster-in.xyz/v1/auth/login
{
"email": "[email protected]",
"password": "example1233455"
}
{
"tokens": {
"access": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2MTQ4OTAyMjVlNDZhM2M4YjM3NDJjNmUiLC
JpYXQiOjE2MzI5NTA3NTksImV4cCI6MTYzNTU0Mjc1OSwidHlwZSI6ImFjY2VzcyJ9.VSpJdnOCr2sjyYTZ6jqCdbv4qQFmYBPkA4cNt1xYQM",
"expires": "2021-10-29T21:25:59.262Z"}
}
This endpoint returns daily counts of active subscriptions, new subscriptions and unsubscribed counts. This is the same data accessible from publishers’ dashboard
Query Parameter | required | Value |
---|---|---|
from | YES | reporting start date, format (YYYY-MM-DD) |
to | YES | reporting start date, format (YYYY-MM-DD) |
domain | YES | website url for reporting |
Endpoint:https://publisher-api.pushmaster-in.xyz/v1/subscription-stats?from=2023-03-07&to=2023-03-14&domain=example.com
Sample Response:
[
{ date: '2023-03-07', new_subscribers: 395, unsubscribed: 198, active_userbase: 432617 },
{ date: '2023-03-08', new_subscribers: 967, unsubscribed: 549, active_userbase: 518370 },
{ date: '2023-03-09', new_subscribers: 126, unsubscribed: 956, active_userbase: 275352 },
{ date: '2023-03-10', new_subscribers: 352, unsubscribed: 692, active_userbase: 420418 },
{ date: '2023-03-11', new_subscribers: 153, unsubscribed: 952, active_userbase: 355900 },
{ date: '2023-03-12', new_subscribers: 645, unsubscribed: 263, active_userbase: 479810 },
{ date: '2023-03-13', new_subscribers: 692, unsubscribed: 877, active_userbase: 211410 },
{ date: '2023-03-14', new_subscribers: 81, unsubscribed: 21, active_userbase: 379599 }
]