ByRecordDocs
byrecord.com›

Authentication and keys

How partner API keys are sent, scoped, stored, rotated and revoked, and how every call is audited.

Every call to the partner API carries an API key. Nothing in the API runs as a person: what a key may do is set by its scopes, and it reaches the programme's records only.

Sending the key

HTTP

X-Api-Key: byr_pk_… is accepted too. A call without a valid key answers 401:

JSON

A key has two parts: a prefix (byr_pk_ and 8 hex characters), then an underscore and 43 random characters. Only the whole key authenticates.

Scopes

ScopeAllows
quotes:readGET /quotes, GET /quotes/:id, GET /quotes/:id/pdf
quotes:writePOST /quotes, POST /quotes/:id/send

A key can hold either or both. A call outside its key's scopes answers 403:

JSON

Give each system the narrowest key it needs: a dashboard that only reads deals needs quotes:read alone.

Who manages keys

Keys are created in the platform by the vendor's finance team, on their API & webhooks page, or by ByRecord's admins. Nobody else can issue, rotate or revoke one. The same page manages webhook endpoints.

  • Shown once. The full key appears only in the response that creates it. The platform stores a SHA-256 hash of the key and its prefix. The prefix is not secret: it is how keys are told apart in the list and the audit log. A lost key cannot be recovered, only rotated.
  • Replace (rotate) issues a new key with the same name and scopes and turns the old one off immediately.
  • Turn off (revoke) is immediate and permanent. A key that is off stays listed, so the audit trail of what it did keeps pointing at something.

Rotating without a gap

Replace turns the old key off at once, so workers still holding it start getting 401. For a change with no gap:

  1. Create a second key with the same scopes.
  2. Deploy it to every worker.
  3. Turn the first key off once nothing uses it. The page shows when each key was last used.

Workers still sending a key that was just revoked slow down only themselves: refused calls are limited per key presented, so they never hold up workers that have the new key.

Keeping keys safe

Server-side only

A key acts for the whole programme within its scopes until it is revoked. Keep it on your servers, in a secrets manager or environment variable: never in a web page, a mobile app, a spreadsheet or a repository. Use one key per system, so one can be revoked without touching the others.

If a key may have leaked, replace it at once, and ask ByRecord for the audit log of what it did.

Audit

Every call is written to the audit log, refused ones included: the key's id and prefix, the method, the path, the status, and the Idempotency-Key when one was sent and whether the answer was a replay. Calls without a valid key are logged as unauthorized attempts.

© 2026 ByRecord · byrecord.com · Status