Skip to Content
Developers
Earnings

Your earnings by day and campaign, and your balance

Needs the earnings:read scope. About scopes

Try it with a test key

Sends to https://api.traki.io

Test keys only. The key stays in this page while it is open and is never saved.

/v1/publisher/earnings

Authorization

key
headerAuthorizationBearer <traki_publisher_…>

Query Parameters

range?string
Default"30d"
Value in"today""yesterday""7d""30d""custom"
from?string
Formatdate
to?string
Formatdate
grain?string
Default"day"
Value in"day""week""month"

Response Body

Success

application/json
  1. response
range*
calls*|null
leads*|null
Example Request
curl 'https://api.traki.io/v1/publisher/earnings' \  -H "Authorization: Bearer $TRAKI_KEY"
Example Response
{  "range": {    "key": "string",    "label": "string"  },  "calls": {    "totals": {      "calls": -9007199254740991,      "billable": -9007199254740991,      "earned": 0    },    "balance": {      "unbilled": 0,      "processing": 0,      "paidLifetime": 0,      "threshold": 0,      "terms": "string",      "nextPayoutAt": "string"    },    "series": [      {        "key": "string",        "label": "string",        "calls": -9007199254740991,        "billable": -9007199254740991,        "earned": 0      }    ],    "byCampaign": [      {        "campaign": {          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",          "name": "string"        },        "calls": -9007199254740991,        "billable": -9007199254740991,        "earned": 0,        "share": 0      }    ]  },  "leads": {    "campaigns": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "name": "string",        "accepted": -9007199254740991,        "earnings": 0      }    ],    "chargebacks": 0,    "returnedLeads": -9007199254740991,    "total": 0  }}