Skip to content
Docs

API reference

API overview

The Metrixed REST API at a glance, with links to authentication, errors, pagination, schemas and every operation.

The control-plane API manages everything you see in the admin portal: advertisers, partners, offers, goals, payouts, rules, reports, billing and more. It is a JSON REST API under /v1, described by one OpenAPI 3.0.3 contract (packages/contracts/openapi.yaml). This reference is generated from that file when the docs are built, so it cannot drift from the contract.

Base URL

text
https://api.metrixed.com/v1

On a self-hosted install the API listens on the address you set in DT_ADDR (default 127.0.0.1:18082) and the same paths apply under /v1. The tenant is taken from your API key or session, never from the URL.

Conventions

TopicBehaviour
IdsULIDs in id, plus a tenant-scoped integer display_id on most entities.
TimestampsRFC 3339, UTC.
MoneyDecimal strings with 6 places, with a separate currency field. Never floats.
ErrorsOne shape for every failure: see errors.
Listspage, page_size, sort, q and filter[field][op]: see pagination and filtering.
AuthenticationBearer API key or session cookie: see authentication.
Rate limitsPer API key, optional: see rate limits.
Request idsEvery response carries X-Request-Id; send your own to correlate. It is echoed in error bodies as request_id.

Try it in 30 seconds

bash
export DT_API_KEY=dtk_live_xxxxxxxx
curl -s https://api.metrixed.com/v1/offers?page_size=2 -H "Authorization: Bearer $DT_API_KEY"
json
{
  "data": [{ "id": "01JABCDEF0123456789XYZ", "display_id": 1, "name": "Spring sale", "status": "active" }],
  "page": { "page": 1, "page_size": 2, "total": 14 }
}

The admin portal has a built-in API explorer (Settings, API explorer) that fills the same requests from this contract and copies them as cURL.

Where to go next

Not in this API

Tracking traffic does not go through /v1. Clicks hit the edge redirect on your tracking domain; conversions arrive at the ingest endpoints (/p, /postback, /px.gif, /v1/events on the ingest host). See conversion tracking methods. Reporting is part of this API (/reports/*) but is served by a separate reporting service behind it.