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
| Document | Can be shared when | Stops working when |
|---|---|---|
| Quote | It is sent, accepted or declined | It is superseded by a new version |
| Invoice | It is issued | It 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.
Managing links
| Request | Operation | What it does |
|---|---|---|
POST /v1/workspaces/{workspaceID}/quotes/{quoteID}/share-links | create-quote-share-link | Creates a link (201). |
GET /v1/workspaces/{workspaceID}/quotes/{quoteID}/share-links | list-quote-share-links | Lists the newest 100 links of the quote, without secrets. |
DELETE /v1/workspaces/{workspaceID}/quotes/{quoteID}/share-links/{linkID} | revoke-quote-share-link | Revokes a link (204). |
POST /v1/workspaces/{workspaceID}/invoices/{invoiceID}/share-links | create-invoice-share-link | Creates a link (201). |
GET /v1/workspaces/{workspaceID}/invoices/{invoiceID}/share-links | list-invoice-share-links | Lists the newest 100 links of the invoice, without secrets. |
DELETE /v1/workspaces/{workspaceID}/invoices/{invoiceID}/share-links/{linkID} | revoke-invoice-share-link | Revokes 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.
| Request | Operation | Returns |
|---|---|---|
GET /v1/shared-documents/{token} | get-shared-document | A 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}/pdf | get-shared-document-pdf | The PDF (application/pdf, Content-Disposition: inline). |
GET /v1/shared-documents/{token}/logo | get-shared-document-logo | The 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
404SHARED_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, nofollowand, for the PDF,X-Content-Type-Options: nosniff. - Rate limited per address, per link and, for the PDF, per workspace, with
429andRetry-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
| Status | Code | Meaning |
|---|---|---|
402 | PLAN_FEATURE_REQUIRED | The plan does not include business tools (creating only). |
403 | FORBIDDEN | Your role can't manage share links. |
404 | QUOTE_NOT_FOUND / INVOICE_NOT_FOUND | No such document in this workspace. |
404 | SHARE_LINK_NOT_FOUND | The document has no link with that ID. |
404 | SHARED_DOCUMENT_NOT_FOUND | Public routes: the link doesn't open a document, for any reason. |
409 | WORKSPACE_NOT_BUSINESS | The workspace is personal. |
409 | DOCUMENT_NOT_SHAREABLE | The document is a draft, a superseded quote or a void invoice. |
409 | SHARE_LINK_LIMIT_REACHED | The document already has 10 active links. |
422 | VALIDATION_ERROR | expiresInDays is outside 1 to 365. |
429 | rate_limit_exceeded | Public routes: too many requests for this address or link. |
500 | DOCUMENT_RENDER_FAILED | The PDF could not be created; ask again. |