Docs
Early Access hello@polariapi.com
Getting Started

Authentication

All Polari API requests authenticate via API key. Keys are tier-scoped, rate-limited, and rotatable.


API key format

Keys are prefixed to identify their environment:

FORMAT
pk_live_xxxxxxxxxxxxxxxxxxxxxxxx # Production pk_test_xxxxxxxxxxxxxxxxxxxxxxxx # Test / sandbox

Test keys return real pipeline data but are capped at 100 requests/day and excluded from webhooks.

Sending the key

Pass the key as a Bearer token in the Authorization header:

BASH
curl https://api.polariapi.com/v1/clusters \ -H "Authorization: Bearer pk_live_your_key" \ -H "Content-Type: application/json"
PYTHON
import requests, os headers = { "Authorization": f"Bearer {os.environ['POLARI_API_KEY']}" } resp = requests.get("https://api.polariapi.com/v1/clusters", headers=headers)
Never expose your key client-side. All API calls must originate from your server. If a key is compromised, contact support@polariapi.com for immediate rotation.

Error responses

Authentication failures return a 401 with a structured error body:

JSON
{ "error": { "code": "invalid_api_key", "message": "The provided API key is invalid or has been revoked.", "status": 401 } }
Code Status Meaning
invalid_api_key 401 Key is malformed, invalid, or revoked
missing_api_key 401 Authorization header absent
tier_restricted 403 Endpoint requires a higher tier (e.g. Layer 3 on Starter)
rate_limit_exceeded 429 Too many requests — see Rate Limits