BillOS v1
Console llms.txt OpenAPI
POST/businesses/{bid}/documents/{id}/share

Get the public PDF link

POST /businesses/{bid}/documents/{id}/share

Requires the documents scope.

The no-login link to the same PDF prints serves, for a WhatsApp or email hand-off: the host streams it at path (/api/docs/<slug>/d.pdf). It IS a print: auto hands out the origin exactly once and the copy after that (הוראה 18(ב)2), so variant says which one the link carries.

Path parameters

NameTypeDescription
bidstringrequiredBusiness id, from POST /businesses.
idstringrequiredDocument id.

Body (optional)

FieldTypeDescription
kindstringauto recommended. One of: auto, origin, copy. Default auto.

Response

200: { "ok": true, … }

FieldTypeDescription
okboolean
variantstringOne of: origin, copy.
fileIdstring
slugstringThe public capability.
pathstringHost path that streams the PDF.

Errors: 400, 401, 403, 404, 409, 429. Every failure answers { "error": …, "reason": … }. Branch on reason.

POST /businesses/{bid}/documents/{id}/share
curl -X POST "$BASE/businesses/$BID/documents/$DOC_ID/share" \
  -H "X-Api-Key: $KEY"
const res = await fetch(`${BASE}/businesses/${BID}/documents/${DOC_ID}/share`, {
  method: 'POST',
  headers: {
    'X-Api-Key': KEY,
  },
})
const data = await res.json()
if (!data.ok) throw new Error(data.reason)
import requests
res = requests.post(
    f"{BASE}/businesses/{BID}/documents/{DOC_ID}/share",
    headers={"X-Api-Key": KEY},
)
data = res.json()
Set BASE to https://api.billos.co.il/v1 and KEY to your bk_live_… key, or a bk_test_… key to run it against the sandbox.
Manage your businesses, keys and webhooks in the BillOS Console.