Skip to content
BursaryDocs

Authentication

Every request under /v1 needs a key. You create keys in the developer console, and an Owner or an Admin of your organization can create them.

Secret Publishable
Looks like sk_live_<keyId>_<token> pk_live_<keyId>
Reaches Every /v1 endpoint GET /v1/schools/autocomplete only
Belongs in A server, a job, or a deployment secret A web page
Shown Once, when you create it Whenever you open it in the console

Use a secret key on your servers. Bursary stores only a hash of it, so nobody can show it to you again. If you lose one, create another and revoke the first.

Use a publishable key in a browser. It is meant to be read off a public page. It reaches one endpoint, and only from the web origins you register for it. Building a school picker covers the browser side.

The keyId near the front of both keys is what support asks for. Never send the whole secret key to anyone.

Either header works:

x-api-key: sk_live_...
Authorization: Bearer sk_live_...

Use whichever your HTTP client makes easier. If you send both, x-api-key is the one that counts.

  1. Create a new key.
  2. Deploy it everywhere the old one is used.
  3. Revoke the old key.

A revoked key stops working everywhere within about a minute, so finish step 2 before step 3.

  • 401 with auth.unauthenticated means no key arrived, or the key does not exist. Check the header name and the value.
  • 401 with api_key.revoked means someone in your organization revoked the key. Create a new one and redeploy.
  • 403 with auth.forbidden and details.requiredTier means the key is valid and your plan doesn’t include what you asked for. See What a plan returns.
  • 403 with auth.forbidden and no details means a publishable key was sent from an origin you haven’t registered, without an Origin header, or to an endpoint other than autocomplete. It also answers POST /v1/exports when your plan lacks the bulk snapshot add-on.

Errors lists every code.

POST /corrections takes no key. Anyone can report a correction, including an institution with no Bursary account.