Orbitoads
Browse documentation

Webhooks

The reference distinguishes status_change, hourly_digest and a test ping. Receive callbacks on HTTPS, validate the signature against the raw body and deduplicate deliveries before processing.

Markdown

Instead of polling, let Orbito Ads call you. Set a Postback URL on a key (panel → API & Webhooks → the key’s card) and every event for the cabinets that key reaches is POSTed there, signed with the key’s webhook secret.

Events

EventWhen
status_changeA campaign’s status changed (In Review → Active, Active → Stopped…). Sent after each sync of the cabinet, and immediately when campaigns are switched on or off in the panel or through the API.
hourly_digestAt 5 minutes past each hour, with the numbers of the hour that just closed — one POST per cabinet. Hours with no views, clicks or spend are skipped.
pingWhen you press Test on the key.

status_change

Example
{
  "event": "status_change",
  "delivered_at": "2026-10-08T12:00:05.123Z",
  "account_id": 53,
  "changes": [
    { "ad_id": 90412, "tme_path": "yourchannel", "old_status": "In Review", "new_status": "Active" },
    { "ad_id": 90388, "tme_path": "yourbot?start=promo", "old_status": "Active", "new_status": "Stopped" }
  ]
}

hourly_digest

Example
{
  "event": "hourly_digest",
  "delivered_at": "2026-10-08T14:05:00.000Z",
  "period": { "start": "2026-10-08T13:00:00.000Z", "end": "2026-10-08T14:00:00.000Z" },
  "account_id": 53,
  "totals": { "views": 18420, "clicks": 137, "spent": 12.456, "actions": 9 },
  "campaigns": [
    { "ad_id": 90412, "tme_path": "yourchannel", "title": "Crypto channels — notes", "status": "Active",
      "views": 9100, "clicks": 73, "spent": 6.221, "actions": 4, "cpm": "0.68", "budget": "100.00" }
  ]
}

campaigns holds at most the top 200 by spend; when more campaigns moved, a truncated block says how many were left out. totals always cover all of them. Money is in the cabinet’s currency.

Headers

Example
Content-Type:      application/json
User-Agent:        Orbito-Webhook/1.0 (+https://Orbito.pro)
X-Orbito-Event:     status_change | hourly_digest | ping
X-Orbito-Delivery:  <uuid — the same on a retry, dedupe on it>
X-Orbito-Timestamp: <unix seconds>
X-Orbito-Signature: sha256=<hex>

Verify the signature

The signature is HMAC-SHA256 of <X-Orbito-Timestamp>.<raw request body> with the key’s webhook secret (shown when the key is created or the secret rotated). Verify it over the raw body — parsing and re-serialising the JSON changes the bytes. Reject requests older than 5 minutes.

Node.js (Express)

Example
const express = require('express');
const crypto = require('crypto');

const app = express();
const SECRET = process.env.ORBITO_WEBHOOK_SECRET;

app.post('/Orbito-webhook', express.raw({ type: 'application/json', limit: '2mb' }), (req, res) => {
  const ts = req.get('X-Orbito-Timestamp');
  const sig = req.get('X-Orbito-Signature') || '';
  if (!ts || Math.abs(Date.now() / 1000 - Number(ts)) > 300) return res.sendStatus(400);

  const expected = 'sha256=' + crypto.createHmac('sha256', SECRET)
    .update(`${ts}.${req.body.toString('utf8')}`)
    .digest('hex');
  const ok = sig.length === expected.length &&
    crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(expected));
  if (!ok) return res.sendStatus(401);

  const event = JSON.parse(req.body.toString('utf8'));
  res.sendStatus(200);               // answer fast, then do the work
  queue.push(event);                 // e.g. hand off to a job queue
});

Python (Flask)

Example
import hmac, hashlib, time, os
from flask import Flask, request, abort

app = Flask(__name__)
SECRET = os.environ["ORBITO_WEBHOOK_SECRET"].encode()

@app.post("/Orbito-webhook")
def orbito_webhook():
    ts = request.headers.get("X-Orbito-Timestamp", "")
    sig = request.headers.get("X-Orbito-Signature", "")
    if not ts or abs(time.time() - int(ts)) > 300:
        abort(400)
    body = request.get_data()                       # raw bytes
    expected = "sha256=" + hmac.new(SECRET, ts.encode() + b"." + body, hashlib.sha256).hexdigest()
    if not hmac.compare_digest(sig, expected):
        abort(401)
    event = request.get_json()
    # … queue the work …
    return "", 200

Delivery

  • Your endpoint must be public HTTPS. http://, localhost and private addresses are refused.
  • Answer with any 2xx within 10 seconds. Do slow work after answering.
  • On a network error or a 5xx we retry once, 750 ms later, with the same X-Orbito-Delivery. A 4xx is not retried.
  • Redirects are not followed.
  • The key’s card in the panel shows the last delivery’s time, status and error.

Which cabinets

A key receives events for the cabinets it reaches (Keys and access). An agency team member’s key receives them for the cabinets shared with them, and stops the moment that access ends.

Testing

Press Test on the key’s card: you receive a ping event signed like the real ones.

Example
{ "event": "ping", "delivered_at": "2026-10-08T12:00:00.000Z", "message": "This is a test ping from Orbito…", "key_id": 41 }

API reference

The full advertising contract requires a dedicated provider credential for this workspace. Use your Orbito API key for client calls. Account orders, provisioning and external billing are separate workflows.

Example · JSON
{
  "event": "status_change",
  "delivered_at": "2026-11-03T12:00:00Z",
  "account_id": 7401,
  "changes": [
    {
      "ad_id": 38017,
      "tme_path": "example_club",
      "old_status": "In Review",
      "new_status": "Active"
    }
  ]
}

Implementation notes

Events and callback setup

Register a public HTTPS callback in the provider’s key settings. status_change reports ad state transitions. hourly_digest covers each active cabinet hour at minute 05. ping tests delivery. Configuration is outside the 22 HTTP operations in this reference.

Signature and redelivery

Verify HMAC-SHA256 over the timestamp, a literal dot and the original request bytes with the webhook secret. Reject timestamps older than five minutes. Respond 2xx within ten seconds. Network failures and 5xx get one retry after 750 ms with the same delivery id.

Operations and fields

status_change hourly_digest ping

  • status_change
  • hourly_digest
  • ping

HTTP

X-Orbito-Event: hourly_digest X-Orbito-Delivery: {uuid} X-Orbito-Timestamp: {unix_seconds} X-Orbito-Signature: sha256={hex}

Schema fields and limits

This table follows the public v1 contract. Parameter and field names are case-sensitive. For each operation, the HTTP response codes distinguish a successful result, input validation and access checks. The linked specification defines the full request and response shapes.

Time window · hourly_digest

An hourly_digest webhook covers the hour that just ended and is emitted five minutes past the hour for each active account with traffic. Store the period timestamps, account ID and delivery ID. Separate the event time from the time the receiving server obtained it.

Schema fields and limits · Receiving campaign events

FieldDocumented value
Content-Typeapplication/json
X-Orbito-Eventstatus_change | hourly_digest | ping
X-Orbito-DeliveryUUID
X-Orbito-TimestampUnix time
X-Orbito-Signaturesha256=<hex>
hourly_digest:05 UTC

Source · Data source

Reference revision

Pro Panel
Pro Panel