Dociya

Shares

A share is a TTL-bound, revocable link to one document or a preparedness packet. Recipients must be signed in to open one — a share always leads to an account, never an anonymous document view.

Create a share link

POST/shares

Owner-only. Every open of the resulting link is logged against this share.

Parameters
documentIdstringoptional

One of documentId or packetId is required.

packetIdstringoptional

Share a whole preparedness packet instead of a single document.

expiresInDaysnumberoptional

curl https://api.dociya.com/shares \
  -H "Authorization: Bearer $DOCIYA_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "documentId": "5b1e2b7a-...", "expiresInDays": 7 }'

Open a shared link

GET/public/shares/:token

Requires the recipient to be signed in — this route sits under /public because it needs no prior relationship to the sharer, not because it's anonymous. An unrecognized token is 404; an expired or revoked one is 410 Gone. The raw document is never rendered to a browser with no account behind it.

curl https://api.dociya.com/public/shares/8f2c1a9e7b... \
  -H "Authorization: Bearer $RECIPIENT_ACCESS_TOKEN"

Also on this resource

GET /sharesList the caller's own outstanding shares.
DELETE /shares/:idRevoke immediately — the link 410s on the next open attempt.
curl https://api.dociya.com/shares \
  -H "Authorization: Bearer $DOCIYA_ACCESS_TOKEN"
Note
Sharing always leads to an account: a recipient with no Dociya account is sent through sign-up first, then lands directly on the shared document — never a raw file link a browser can open on its own.