ConceptsAuthentication

Authentication

Every endpoint except /v1/openapi.json requires an API key issued from the customer portal. The key is passed in the X-API-KEY header on every request:

GET /listings HTTP/1.1
Host: api.zynplex.ca
X-API-KEY: crea_dmbFqWgn98hBq-Y9u5sef6nuqiRjxRls
Accept: application/json
Missing keyInvalid / revoked key
401 Unauthorized401 Unauthorized

API keys look like crea_<24 url-safe chars>. They’re shown once at creation in the portal and stored as Argon2id hashes server-side — recovery is impossible; rotate by creating a new key and revoking the old one.

Storing the key in a frontend

The key is roughly equivalent to a Stripe restricted key. Don’t ship it in client JavaScript. Proxy API calls through your backend or a serverless function — otherwise anyone can scrape your key, hit your account’s rate limit, and run up your bill.

A typical pattern:

Browser  →  your /api/listings (Next.js route, Cloudflare Worker, etc.)
              ↓ adds X-API-KEY from environment
            api.zynplex.ca

Rotating a key

  1. Portal → API keys → Create new key (label it for the system you’ll deploy it on).
  2. Deploy the new key to your service.
  3. Once you’ve confirmed traffic is flowing on the new key, Revoke the old one.

There’s no rotation grace period — a revoked key immediately returns 401.

last_used_at

Every successful authentication updates api_keys.last_used_at for that key. You can see this in the portal’s API keys list to confirm your service is actually calling through, and to find unused (rotation-candidate) keys.