Skip to content

API reference

Quick reference for the Partner API v1. For the full walkthrough, start at Getting started.

  • Base URL: https://locke-api.trylockey.workers.dev/partner/v1 (read from config — the domain flips to trylockey.com once cut over).
  • Auth: Authorization: Bearer <key> — see Authentication.

Endpoint summary

MethodPathScopePurpose
GET/partner/v1/pingauth onlyCredential smoke test
POST/partner/v1/requestsrequests:writeCreate a document request
GET/partner/v1/requestsrequests:readList requests (filter by status, reference)
GET/partner/v1/requests/:idrequests:readFetch one request
GET/partner/v1/grantsgrants:readList grants
GET/partner/v1/grants/:idgrants:readFetch one grant
POST/partner/v1/grants/:id/sessionsgrants:readMint a watermarked viewing session

Scopes

ScopeGrants access to
requests:writeCreate document requests
requests:readList / fetch requests
grants:readList / fetch grants and mint viewing sessions
webhooks:writeReserved — not yet implemented (poll instead)
verify:readReserved — not yet implemented

Not yet available

  • Webhooks / callbacks — the webhooks:write scope is reserved but no delivery exists. Poll the request endpoints instead.
  • Verification API — the verify:read scope is reserved; no route yet.

Source of truth

These are the current wire contracts. The authoritative definitions live in the Locke monorepo:

  • Machine API route: apps/api/src/routes/partner/v1.ts
  • Validation schemas: packages/validation
  • API contracts: packages/contracts

Going live requires org verification — see the partner approval runbook in the repo (docs/runbooks/partner-approval.md).

Upload once · Share many times · Track forever.