Skip to main content

Shared documents

A share link lets whoever holds it read one sent quote or issued invoice, without signing in. The link opens a page on the Budget Thing web app that shows the document and lets the viewer download it as a PDF. It is how you give a client the document without email or an account. The link is a secret: anyone who has it can read that document, and nothing else of the workspace.

Share links exist only in business workspaces; every operation below returns 409 WORKSPACE_NOT_BUSINESS in a personal workspace.

What can be shared​

DocumentCan be shared whenStops working when
QuoteIt is sent, accepted or declinedIt is superseded by a new version
InvoiceIt is issuedIt is voided

A draft can't be shared (409 DOCUMENT_NOT_SHAREABLE): its content can still change, and a client should only ever see what was sent. The link opens the same PDF the owner downloads from get-quote-pdf or get-invoice-pdf, made from the document's frozen lines and snapshots, so it never changes after sending.

RequestOperationWhat it does
POST /v1/workspaces/{workspaceID}/quotes/{quoteID}/share-linkscreate-quote-share-linkCreates a link (201).
GET /v1/workspaces/{workspaceID}/quotes/{quoteID}/share-linkslist-quote-share-linksLists the newest 100 links of the quote, without secrets.
DELETE /v1/workspaces/{workspaceID}/quotes/{quoteID}/share-links/{linkID}revoke-quote-share-linkRevokes a link (204).
POST /v1/workspaces/{workspaceID}/invoices/{invoiceID}/share-linkscreate-invoice-share-linkCreates a link (201).
GET /v1/workspaces/{workspaceID}/invoices/{invoiceID}/share-linkslist-invoice-share-linksLists the newest 100 links of the invoice, without secrets.
DELETE /v1/workspaces/{workspaceID}/invoices/{invoiceID}/share-links/{linkID}revoke-invoice-share-linkRevokes a link (204).

Creating takes an optional body. expiresInDays is 1 to 365 and defaults to 30:

{ "expiresInDays": 30 }

The response carries the secret once:

{
"id": "dshl_EXAMPLE",
"documentType": "quote",
"documentId": "qte_EXAMPLE",
"status": "active",
"createdAt": "2026-11-13T10:00:00Z",
"expiresAt": "2026-12-13T10:00:00Z",
"token": "btshr_EXAMPLE",
"url": "https://app.example.com/shared/btshr_EXAMPLE"
}

url is {APP_PUBLIC_URL}/shared/{token}, an address on the web app's domain; it never contains the API host. The page reads the token from the address, calls the public routes below, and shows the PDF in the page, so the address bar stays on the app domain. It is marked noindex and sends no referrer. A link that is unknown, revoked or expired shows "This link is no longer available". Links created before this change were API addresses (.../v1/shared-documents/{token}/pdf); they keep working, because the token is the same and the public routes below are unchanged.

Budget Thing stores only a SHA-256 digest of token, so it can't show the link again. Keep it when you create it, or create another link and revoke the one you lost. A document can have several links at once (up to 10 active ones, then 409 SHARE_LINK_LIMIT_REACHED), so a link you gave to one person can be revoked without disturbing the others.

A listed link has status active, expired or revoked, derived from its dates, purpose (manual for a link you create), plus createdAt, expiresAt, revokedAt and lastViewedAt (updated at most once an hour). Revoking is immediate, and revoking a link that is already revoked succeeds and changes nothing.

Creating needs a plan that includes business tools (402 PLAN_FEATURE_REQUIRED otherwise) and a role that can edit data (403 otherwise). Listing is open to every member. Revoking always works, also after a downgrade and while the account is read-only for being over a plan limit (423), because closing a way into a document should never be blocked.

The public routes​

These are the API behind the web page. You can call them directly, for example to fetch the PDF in your own system.

RequestOperationReturns
GET /v1/shared-documents/{token}get-shared-documentA summary: type, number, title (quotes), business name, status, dates, total and currency code. total is the gross total, tax included. Only when the document charges tax, it also has subtotal, taxTotal and taxes (one row per tax rate: name, percentE4, tax). An invoice's pay amount and balance are gross too. It also has accentColor (#RRGGBB), documentTitle (the custom heading, empty for the default one), hasLogo and logoUrl (the path of the logo route below; absent when the document was sent without a logo). These are taken from the style frozen when the document was sent or issued, never from the business's current settings; a document from before document styles reports #1E1E1E, an empty title and its logo as sent.
GET /v1/shared-documents/{token}/pdfget-shared-document-pdfThe PDF (application/pdf, Content-Disposition: inline).
GET /v1/shared-documents/{token}/logoget-shared-document-logoThe logo the document was sent with, as a PNG or JPEG (image/png or image/jpeg), for use as an image source. It is the logo frozen when the document was sent or issued, never the business's current one: replacing or removing the logo afterwards changes nothing here. A document sent without a logo, or an unknown, revoked or expired link, gets the same 404 SHARED_DOCUMENT_NOT_FOUND. The response is no-store, nosniff and sandboxed by a Content-Security-Policy, and it is rate limited like the other public routes.

They need no sign-in and no access token: the secret in the URL is the credential, and an Authorization header adds nothing to it. They show nothing that names your workspace, client or project records; the PDF has what a client would read on the document.

  • One answer for every refusal. An unknown, malformed, expired or revoked link, a quote that was superseded, an invoice that was voided, and a deleted workspace all return 404 SHARED_DOCUMENT_NOT_FOUND, with the same body, so nobody can learn which it was.
  • Re-checked on every request. The link, the workspace and the document's state are read each time, so revoking, voiding or deleting takes effect at once.
  • Read as the workspace owner, not as the member who made the link, so a link keeps working when that member leaves. An archived workspace still serves its links; a workspace marked for deletion does not.
  • Not cached, not indexed. Responses carry Cache-Control: private, no-store, Referrer-Policy: no-referrer, X-Robots-Tag: noindex, nofollow and, for the PDF, X-Content-Type-Options: nosniff.
  • Rate limited per address, per link and, for the PDF, per workspace, with 429 and Retry-After. See Limits.
  • Request paths are redacted in Budget Thing's access logs, so the secret is never logged.

Scopes​

Listing links needs quotes:read or invoices:read; creating and revoking need quotes:write or invoices:write. See Scopes.

Backup, export and clone​

A share link is a bearer credential, so it is left out of backups, data exports and workspace clones. A restored or cloned workspace starts with no links, and a link you revoked can't come back to life there. The sent documents themselves are restored as usual; create new links for them.

Events and audit​

Creating and revoking a link publish the internal events document_share_link.created and document_share_link.revoked. Links you create or revoke are also written to the workspace's audit log. The link the server makes for invoice emails, and the one it retires when it renews, publish the same events but have no acting user, so they have no audit entry. Both carry the link, document type and document IDs, never the secret. They are not offered to webhook subscribers yet.

Errors​

StatusCodeMeaning
402PLAN_FEATURE_REQUIREDThe plan does not include business tools (creating only).
403FORBIDDENYour role can't manage share links.
404QUOTE_NOT_FOUND / INVOICE_NOT_FOUNDNo such document in this workspace.
404SHARE_LINK_NOT_FOUNDThe document has no link with that ID.
404SHARED_DOCUMENT_NOT_FOUNDPublic routes: the link doesn't open a document, for any reason.
409WORKSPACE_NOT_BUSINESSThe workspace is personal.
409DOCUMENT_NOT_SHAREABLEThe document is a draft, a superseded quote or a void invoice.
409SHARE_LINK_LIMIT_REACHEDThe document already has 10 active links.
422VALIDATION_ERRORexpiresInDays is outside 1 to 365.
429rate_limit_exceededPublic routes: too many requests for this address or link.
500DOCUMENT_RENDER_FAILEDThe PDF could not be created; ask again.