Skip to content
Innovesty

API documentation

Everything you can do from your own servers. Publishers read offers, conversions and earnings. Advertisers read campaigns, spend and conversions. Create keys in your dashboard. You need an approved account.

Getting started

Base URL: https://innovesty.com/api/v1. Send your key in the Authorization header. Keep it on your server and never in an app or web page.

curl https://innovesty.com/api/v1/balance \
  -H "Authorization: Bearer ivk_your_key_here"

Keys are shown once, when you create them. If one leaks, revoke it and make another. Revoking takes effect immediately.

Responses and errors

Every answer is JSON. Successful calls have ok: true. Failed calls have ok: false and a stable error code you can switch on.

// 200
{ "ok": true, "data": { ... } }

// 4xx or 5xx
{ "ok": false,
  "error": { "code": "validation_error",
             "message": "Check the request parameters.",
             "fields": { "from": "Use a date like 2030-01-31" } } }

Money is a string with six decimals in US dollars, for example "0.250000", so nothing is lost to rounding. Times are ISO 8601 in UTC.

Rate limits

Each key has its own limit, 120 requests a minute by default. Every response says where you stand.

X-RateLimit-Limit: 120
X-RateLimit-Remaining: 117
Retry-After: 12          (only on 429)

Scopes

A key only does what its scopes allow. Give each key the least it needs.

ScopeForAllows
offers:readPublishersRead offers for a player
GET /api/v1/offers
properties:readPublishersList your apps and sites
GET /api/v1/properties
campaigns:readAdvertisersList your campaigns
GET /api/v1/campaigns
conversions:readPublishers and advertisersRead conversions
GET /api/v1/conversions, GET /api/v1/conversions/{id}
reports:readPublishers and advertisersRead reports
GET /api/v1/reports/summary
balance:readPublishers and advertisersRead balances
GET /api/v1/balance

If your account is both a publisher and an advertiser, add side=publisher or side=advertiser to calls that exist for both.

Offers

GET/api/v1/offers

Scope: offers:read

The offers one player can see right now, ready to draw in your own screen. Use this instead of the hosted offerwall when you want full control of the design.

app_id (required), player_id (required), country (two letters, defaults to the caller's), platform (IOS, ANDROID, WEB), limit (1 to 100, default 30).

Each offer lists its goals with the reward in your currency and the player's progress. Send the player to the offer's click_url to start tracking.

Properties and campaigns

GET/api/v1/properties

Scope: properties:read

Your apps and sites with their app_id, status, platform and currency settings. Publishers only.

GET/api/v1/campaigns

Scope: campaigns:read

Your campaigns with status, budget, spend and offers. Advertisers only.

Conversions

GET/api/v1/conversions

Scope: conversions:read

from and to (dates, last 30 days by default, at most 92 days), status (APPROVED, PENDING, HELD, REJECTED, REVERSED), app_id (publishers), campaign_id (advertisers), limit (1 to 200, default 50), cursor.

Newest first. When next_cursor is not null, pass it as cursor to get the next page.

GET/api/v1/conversions/{id}

Scope: conversions:read

One conversion. Publishers may also use the transaction_id from their postback in place of the id.

// Publisher
{ "id": "cm...", "status": "APPROVED", "transaction_id": "tx_...",
  "app_id": "app_...", "player_id": "player_42", "offer_name": "Space Raiders",
  "goal_name": "Reach level 10", "amount": 250, "currency": "Gems",
  "earnings_usd": "0.250000", "released": true, "reversed_at": null }

// Advertiser (never sees a publisher's player ids)
{ "id": "cm...", "status": "APPROVED", "campaign_id": "cm...",
  "offer_name": "Space Raiders", "goal_name": "Reach level 10",
  "cost_usd": "0.400000", "country": "US", "reversed_at": null }

Only APPROVED conversions count as money. PENDING and HELD may still change. REVERSED means a paid conversion was taken back.

Reports

GET/api/v1/reports/summary

Scope: reports:read

from, to (at most 92 days), group_by: day (default), offer, country, and property for publishers or publisher for advertisers.

{ "ok": true, "data": {
  "side": "publisher", "from": "2030-01-01", "to": "2030-01-31", "group_by": "day",
  "totals": { "clicks": 1200, "conversions": 84, "pending": 6, "rejected": 3, "earnings_usd": "21.400000" },
  "rows": [ { "date": "2030-01-01", "clicks": 40, "conversions": 3, "pending": 0,
              "rejected": 0, "earnings_usd": "0.750000", "epc_usd": "0.018750" } ] } }

Advertisers get spend_usd and cost_per_conversion_usd instead. The totals match what you see in the dashboard and in your statements.

Balance

GET/api/v1/balance

Scope: balance:read

Publishers: pending (still in the hold period), available (can be paid out), in_payout, paid_out. Advertisers: balance, the money left to spend.

Reward postbacks (publishers)

When a player finishes a goal we call the URL you set on the property, once per goal. Put the macros you need in it. Include {event} so you can tell a reward from a reversal.

{transaction_id}Unique id for this reward. Identical on every retry, so use it to ignore duplicates.
{player_id}The player id your app passed to the offerwall.
{amount}Reward in your virtual currency. To give the player when event is conversion.approved, to take back when it is conversion.reversed.
{payout_usd}Your earning for this reward, in US dollars.
{offer_id}Innovesty offer id.
{offer_name}Offer title.
{goal_id}Id of the goal that was completed.
{goal_name}Name of the goal, for example Reach level 10.
{click_id}Unique id of the click that led to this reward.
{country}Two-letter country of the click, or empty.
{event}conversion.approved, conversion.reversed or test. Include {event} in your URL so you can tell a reward from a reversal.
{ts}Unix time in seconds when the postback was created.

We add &sig= at the end: the HMAC-SHA256 of everything before it, using your property's secret. Check it, check ts is recent, give the reward once per transaction_id, and answer HTTP 200. Anything else is retried with growing delays, seven attempts over about 21 hours.

import { createHmac, timingSafeEqual } from "node:crypto";

export function verify(fullUrl, secret, maxAgeSeconds = 600) {
  const i = fullUrl.lastIndexOf("&sig=");
  if (i === -1) return false;
  const sig = fullUrl.slice(i + 5);
  const query = fullUrl.slice(0, i).split("?")[1];
  const expected = createHmac("sha256", secret).update(query).digest("hex");
  if (sig.length !== expected.length || !timingSafeEqual(Buffer.from(sig), Buffer.from(expected))) return false;
  return Math.abs(Date.now() / 1000 - Number(new URLSearchParams(query).get("ts"))) <= maxAgeSeconds;
}

Webhooks (publishers)

An alternative to postbacks: we POST JSON to your endpoint. Add one under Webhooks. Events: conversion.approved and conversion.reversed. When a conversion is reversed, take the reward back from the player.

POST /your-endpoint
X-Innovesty-Event: conversion.approved
X-Innovesty-Delivery: cm...        (same on every retry)
X-Innovesty-Timestamp: 1893456000
X-Innovesty-Signature: sha256=3f7a...

{ "id": "cm...", "event": "conversion.approved", "created_at": "2030-01-01T10:00:00Z",
  "data": { "conversion_id": "cm...", "transaction_id": "tx_...", "app_id": "app_...",
            "player_id": "player_42", "offer_name": "Space Raiders", "goal_name": "Reach level 10",
            "amount": 250, "currency": "Gems", "payout_usd": "0.250000", "status": "APPROVED" } }

The signature is sha256= plus the hex HMAC-SHA256 of {timestamp}.{raw body} with your webhook secret. Verify against the raw bytes before parsing, reject old timestamps, and use the delivery id to ignore repeats. Answer with any 2xx. Other answers are retried.

import { createHmac, timingSafeEqual } from "node:crypto";

export function verifyWebhook(rawBody, headers, secret, maxAgeSeconds = 600) {
  const ts = headers["x-innovesty-timestamp"];
  const got = headers["x-innovesty-signature"] ?? "";
  const want = "sha256=" + createHmac("sha256", secret).update(ts + "." + rawBody).digest("hex");
  if (got.length !== want.length || !timingSafeEqual(Buffer.from(got), Buffer.from(want))) return false;
  return Math.abs(Date.now() / 1000 - Number(ts)) <= maxAgeSeconds;
}

Advertiser postbacks

Advertisers tell us when a player reaches a goal by calling the campaign's postback URL, shown on the campaign page. The call must be signed.

GET /api/postback/{campaign_token}?click_id=clk_...&goal=level_10&ts=1893456000&sig=...

Calling twice for the same click and goal is safe: the second call answers with the first result and nothing is charged twice.

import { createHmac } from "node:crypto";

function sign(params, secret) {
  const base = Object.entries(params).sort(([a], [b]) => (a < b ? -1 : 1)).map(([k, v]) => k + "=" + v).join("&");
  return createHmac("sha256", secret).update(base).digest("hex");
}
const params = { click_id, goal: "level_10", ts: Math.floor(Date.now() / 1000) };
const url = "https://innovesty.com/api/postback/" + token + "?" + new URLSearchParams({ ...params, sig: sign(params, secret) });

Need something that is not here? Email us from the address on your account and tell us what you are building.