OpenAPI spec
The machine-readable v1 contract — import it into Postman, Insomnia or a client generator.
Every v1 endpoint, request schema, response shape, status code and webhook event is described in one OpenAPI 3.1 document:
https://www.wesign.now/openapi.jsonThe same file is served on the letssign.now alias host. It declares
both API hosts as servers — https://api.wesign.now/v1 (canonical) and
https://api.letssign.now/v1 (permanent alias) — so a generated client
can target either.
What is in it
- All 21 paths under
/v1with their zod-derived request bodies, every documented errorcodeper status, and theIdempotency-Key/Idempotent-Replayed/Retry-After/RateLimit-*headers. bearersecurity scheme coveringwsk_live_…keys and legacylsk_live_…keys.- A
webhookssection with one entry per event (signing_request.sent,signing_request.signed,signing_request.expired,document.completed,template_instance.staged,template_instance.confirmed,template_instance.discarded), the delivery envelope, and the signature scheme — both header families,t=…,v1=…, and the signed message${t}.${rawBody}— under the top-levelx-webhook-signature. - The Enterprise gate:
/templates/{id}/generate,/templates/{id}/instantiateand/documents/{id}/confirmcarry a402 enterprise-requiredresponse. - The two retired endpoints (
POST /documents,POST /embedded/sessions) markeddeprecatedwith their stable410.
Import it
Import → Link, paste https://www.wesign.now/openapi.json, then
set the collection variable baseUrl to https://api.wesign.now/v1
and add your key under Authorization → Bearer Token.
Create → Import → URL, paste the spec URL. Pick the canonical server when prompted and set the bearer token on the environment.
npx @openapitools/openapi-generator-cli generate \
-i https://www.wesign.now/openapi.json \
-g typescript-fetch \
-o ./wesign-clientAny generator target works (python, go, java, csharp, …). The
spec uses 3.1.0 features — webhooks, type arrays for nullables,
const — so use a generator release from 2023 or later.
Point any hosted viewer at the URL, e.g.
https://redocly.github.io/redoc/?url=https://www.wesign.now/openapi.json.
The spec is written by hand from the route handlers' zod schemas
and response builders — it is not generated at build time. A unit test
(tests/openapi.test.ts, run on every build) guards it against drift:
every route directory must have a path, every documented method must be
exported by its route file, every status: literal in a handler must be
documented, Enterprise-gated routes must carry a 402, and the webhook
entries must match the event catalogue exactly.
Reading the spec by hand
- Paths are relative to the server URL, so
/documents/{id}meanshttps://api.wesign.now/v1/documents/{id}. - Error responses reference one
Errorschema ({ error, code, meta? }); the response description lists thecodevalues that status can carry. See Errors for the prose version. - Binary responses (
/documents/{id}/signed,/documents/{id}/pdf,/documents/{id}/audit-trail, and the default mode of/templates/{id}/generate) areapplication/pdf. POST /templates/{id}/generateandPOST /templates/{id}/instantiatereturn different shapes depending onvalidate_onlyandreview; the200and201responses spell each one out.
