List documents
Documents the caller can read: their own (active-org-scoped; legacy rows without org_id stay visible) plus any shared with the organization by a teammate. status/q/needsMe filter the page and `total`; counts/toSignCount/waitingCount/hasShared always describe the scope-only set, unaffected by status/q/needsMe/sort/limit/offset — same convention as Templates' `categories`, so switching tabs or typing a search never makes the other tabs' counts move. The result is paged only when limit or offset is sent; without either, every matching document is returned (as before this endpoint was paginated), up to 1000, and limit reports how many came back — total > that count means the list was cut off.
View as MarkdownAuthorization
bearer In: header
Query Parameters
Value in
- "draft"
- "pending"
- "completed"
- "declined"
- "cancelled"
- "expired"
- "awaiting_notarization"
all (default) — everything readable · mine — only the caller's own · shared — only teammates' org-shared documents (excludes own).
Value in
- "all"
- "mine"
- "shared"
Case-insensitive substring match against the document name or a recipient's name/email. "%" and "_" match literally.
activity (default) — updated_at descending · created — created_at descending · name — alphabetical · status — in-flight work first, dead envelopes last, ties broken by activity.
Value in
- "activity"
- "created"
- "name"
- "status"
true narrows to pending documents where the caller is a signer who hasn't signed or declined yet (not turn-order aware — just "am I owed a signature"). Matches nothing for a token with no email claim.
Page size, default 10, capped at 100. Omit both limit and offset to get every matching document unpaged (up to 1000).
Page start. Default 0. Sending it alone pages at the default size.
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/documents"{ "documents": [ { "id": "string", "name": "string", "url": "string", "status": "string", "created": "2019-08-24T14:15:22Z", "modified": "2019-08-24T14:15:22Z", "size": 0, "pages": 0, "templateId": "string", "hasFile": true, "hasFinalFile": true, "files": [ { "id": "string", "name": "string", "position": 0, "size": 0, "pages": 0, "created": "2019-08-24T14:15:22Z", "status": "ready", "conversionError": "string" } ], "signingMode": "string", "message": "string", "sentAt": "2019-08-24T14:15:22Z", "completedAt": "2019-08-24T14:15:22Z", "voidedAt": "2019-08-24T14:15:22Z", "voidReason": "string", "declinedAt": "2019-08-24T14:15:22Z", "expiresAt": "2019-08-24T14:15:22Z", "autoRemindDays": 0, "lastRemindedAt": "2019-08-24T14:15:22Z", "legalHold": true, "scheduledPurgeAt": "2019-08-24T14:15:22Z", "visibility": "string", "ownerId": "string", "requiresNotarization": true, "notaryState": "string", "recipients": [ { "id": "string", "name": "string", "email": "string", "role": "string", "status": "string", "orderIndex": 0, "signedAt": "2019-08-24T14:15:22Z", "viewedAt": "2019-08-24T14:15:22Z", "declinedAt": "2019-08-24T14:15:22Z", "declineReason": "string", "hasAccessCode": true, "verificationMethod": "none", "signature": "string", "isGroup": true, "groupLabel": "string", "signedByName": "string", "signedByEmail": "string", "members": [ { "id": "string", "name": "string", "email": "string", "viewedAt": "2019-08-24T14:15:22Z", "declinedAt": "2019-08-24T14:15:22Z" } ], "reassignedFromName": "string", "reassignedFromEmail": "string", "reassignReason": "string", "reassignedAt": "2019-08-24T14:15:22Z" } ], "fields": [ { "id": "string", "type": "signature", "x": 0, "y": 0, "width": 0, "height": 0, "page": 0, "required": true, "label": "string", "value": "string", "recipientId": "string", "fileId": "string", "config": {} } ] } ], "total": 0, "limit": 0, "offset": 0, "counts": { "property1": 0, "property2": 0 }, "toSignCount": 0, "waitingCount": 0, "hasShared": true}Local-disk storage dev fallback (never present in production)
Only registered when the service falls back to local-disk file storage because no R2 credentials are configured AND the service is not running in production (see internal/storage/local.go) — the route does not exist at all otherwise. Serves the file an HMAC-signed "key"/"exp"/"sig" query string authorizes, standing in for a real R2 presigned URL. Unauthenticated by design: the signature is the credential, scoped to a single key and short TTL, and this whole code path never runs in production.
Create a draft
Creates a draft. The PDF is attached separately (POST /v1/documents/{id}/file) and nothing is emailed until /send. With a templateId (public or owned), template fields are copied and — if no recipients were sent — template recipient slots are created with empty emails; template usageCount increments. An unresolvable templateId is a 400. Recipients passed here are created with status "pending".