API ReferenceAuthentication

Authentication

Praevis uses two authentication methods depending on the context: session-based auth for browser dashboard users, and API key auth for machine-to-machine integrations.


API key authentication

For server-to-server API calls, pass your API key in the request header:

X-API-Key: {YOUR_API_KEY}

Example:

curl https://api.praevis.com/api/metrics?period=24h \
  -H "X-API-Key: pk_live_abc123def456..."

Getting your API key

  1. Log in to exchange.praevis.com
  2. Go to Settings → API Keys
  3. Click Generate New Key
  4. Copy the key — it’s only shown once

API keys are prefixed: pk_live_ for production, pk_sandbox_ for sandbox-only access.

⚠️

Store API keys securely — treat them like passwords. Rotate keys under Settings → API Keys if compromised.


Session authentication

Browser-based dashboard access uses cookie-based sessions. Log in at exchange.praevis.com. Sessions expire after 24 hours of inactivity.

For REST API calls from the dashboard frontend, session cookies are sent automatically. No additional headers required.


Partner context header

For platform partner accounts managing multiple sub-partners, scope requests to a specific partner:

X-User-Partner-ID: {PARTNER_UUID}

This header is required for:

  • GET /api/partner/publishers — list supply sources (Publishers) under a specific partner
  • GET /api/partner/stats — partner-scoped revenue aggregation
  • GET /api/partner/dsps — demand sources (DSPs) scoped to a partner

Without X-User-Partner-ID, API responses aggregate across all partners under your account. Add the header to scope to a single partner.


Sandbox mode

To target sandbox data instead of production data, add:

X-Sandbox: true

This switches all metrics, auction data, and management endpoints to sandbox context. Combine with an API key or session.

Alternatively, use the ?sandbox=true query parameter on endpoints that support it.


Rate limits

Account typeRate limit
Standard1,000 requests/minute
Partner5,000 requests/minute
EnterpriseCustom (contact us)

Rate limit headers are included in every response:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 847
X-RateLimit-Reset: 1708171200

When rate limited, you receive HTTP 429. Back off for 60 seconds before retrying.


Base URL

All API calls use:

https://api.praevis.com

For sandbox:

https://api.praevis.com

(same URL — use X-Sandbox: true header or sandbox=true parameter)


CORS

The API supports CORS for requests from *.praevis.com domains. For partner custom domains, contact support to add your domain to the CORS allowlist.


Verifying your setup

curl https://api.praevis.com/api/health \
  -H "X-API-Key: {YOUR_KEY}"

Response:

{ "status": "ok", "region": "fra", "version": "0.6.30" }

→ Error codes reference