Skip to content

Tenancy & environments

Every API key belongs to exactly one tenant (merchant) and one environment. Tessera never infers the tenant from a request body or path — it’s always resolved from the bearer key, so a key can only ever see and act on its own tenant’s data.

EnvironmentBase URL
sandboxhttps://sandbox.usetessera.io/v1
productionhttps://api.usetessera.io/v1

Sandbox and production are entirely separate deployments with separate data — a member, redemption, or event created in sandbox never appears in production, and vice versa.

Each environment issues a key pair:

Key typePrefixCan call
Secret keysk_test_… (sandbox) / sk_live_… (production)Every endpoint. Server-side only — never ship it to a browser.
Publishable keypk_test_… (sandbox) / pk_live_… (production)Only the public reads: the rewards catalogue (GET /v1/rewards / GET /v1/catalogue), the tier ladder (GET /v1/tiers) one programme (GET /v1/programs/{ref}) and a generic earn preview (POST /v1/earn/preview without external_id). Any other call is rejected with publishable_key_forbidden (403) before it touches your data.

Present whichever key as Authorization: Bearer <key>. See Authentication for the header details and Errors & the envelope for the full error catalogue.

Because sandbox and production are separate deployments, a sandbox key simply doesn’t resolve against the production host (and a production key doesn’t resolve against sandbox) — presenting one to the wrong host fails closed with unauthorized (401), the same as any other invalid credential.