Skip to content

Authentication

Every Spate API request is authenticated with a bearer token. This page covers how to create a key, use it on requests, and rotate it when needed.

  1. Open Settings → API at app.spate.nyc/settings/api (login required).

  2. Click Create new key and give it a memorable label (e.g. local-dev or prod-server).

  3. Copy the key and store it somewhere safe.

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

Terminal window
curl "https://api.spate.nyc/v1/latest/cat1/trends/top5/popindex/us/6d408533-6979-43aa-80af-4d88bf0be860" \
-H "Authorization: Bearer $SPATE_API_KEY"

Missing, malformed, or revoked keys receive 401 Unauthorized.

Unauthenticated requests are never billed.

To revoke an active key, open Settings → API and remove it. Rotating is the same flow: create a new key, swap it in your environment, then revoke the old one.