Share a record
One call hands the other side a link and a code: POST .../share, what it returns, how long the link lives, how to turn it off, what the reader needs from you, and what PacSpace still holds.
POST /api/v1/records/{recordType}/{record}/share
POST /api/v1/records/{recordType}/{record}/share/{handle}/revokeSharing a record gives one link to whoever has to rely on it: an outside evaluator checking a lab's evaluation run, an auditor, or an oversight office checking a program. The link opens the Shared Record in their browser, behind a code you send separately, and the check runs when the record opens. The same call is behind the Share button on the record page in the dashboard.
Share
A lab hands outside evaluator E-2 the record of evaluation run 4417:
curl -X POST https://app.pacspace.io/api/v1/records/machine-action-record/eval-run-4417/share \
-H "x-api-key: $PACSPACE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "sharedWith": "Evaluator E-2", "expiresInDays": 30 }'{
"success": true,
"data": {
"handle": "csh1_7f3a...",
"url": "https://app.pacspace.io/c/csh1_7f3a...",
"accessCode": "K7M2QX",
"expiresAt": "2026-11-04T16:04:18.000Z",
"accessPolicy": "TWO_TIER",
"publicLinksEnabled": true,
"preview": false,
"previewUrl": "https://app.pacspace.io/c/csh1_7f3a...",
"recordType": "machine-action-record",
"entityId": "eval-run-4417",
"signedKeyBoundAt": null,
"message": "Anyone who has this link and the code can open the record for 30 days.",
"disclosureLink": true,
"disclosure": false
}
}url is the link and accessCode its code. disclosureLink is true on every link made today: it shows seals first, as below. disclosure says whether the link reveals any fields; a link made through this call reveals none. preview, previewUrl and signedKeyBoundAt serve the dashboard's share card.
A record can be shared once its first entry has been queued; before that there is no record to share, and the call answers RECORD_NOT_FOUND. Calling share again for the same record returns the link that already exists, with its code. Send { "reissue": true } to turn the old link off and make a new one.
| Field | What it is |
|---|---|
sharedWith | Optional. Who the link is for, in your words: "Evaluator E-2", "the program's inspector general". It is the name an acknowledgment is recorded under ("Acknowledged through the link issued to Evaluator E-2") and it is shown to you on the record page. At most 120 characters. |
expiresInDays | Optional. 1 to 366. Default 30. Set it to the length of the engagement. |
accessPolicy | Optional. TWO_TIER (default), GATED, or OPEN. See below. |
reissue | Optional. true turns the existing link off and makes a new one with a new code. |
Choose what the other side sees
A link shows each entry's seal and none of what it says. To let the other side read some of it, share the record from the dashboard: the share card lets you choose, for each entry, seals only, chosen fields, or every field. An evaluator checking a run might get every field of the entries in scope and seals only for the rest. The link then carries the fields you chose, encrypted, and the part of the address that opens them comes after #, which a browser does not send when it opens the link. A link made through this API call shows seals only.
Revealing fields always makes a new link: if the record already has one, it is revoked, with the fields it carried. A link that reveals fields always asks for its code, so it cannot be OPEN. Send the link and the code separately; anyone who has both can read the fields you revealed. Links made before 1 October 2026 keep showing each entry's words.
To hand over chosen fields as a file instead of a link, for example when an evaluator asks to see more of one entry, records.disclose builds a file that reveals the fields you choose. The other side checks each field against its entry's seal with npx @pacspace-io/check, without the link and without PacSpace.
The link and the code
Send the link to the reader. Send the code by a different channel: a call, or a message that is not the one carrying the link. The link opens on a screen that asks for the code and shows nothing of the record until it is entered; the code is asked for every time the link is opened. Five wrong tries lock the field for fifteen minutes.
| Policy | What the reader meets |
|---|---|
TWO_TIER | Your organization and the code field. The default. |
GATED | The code field alone, with nothing about the record before the code. |
OPEN | No code. Anyone holding the link opens the record. Yours to choose per link; never the default, and never on a link that reveals fields. |
How long it lives
Until expiresAt. A reader who opens an expired link sees "This link expired on 4 November. The record it opened has not changed. Ask Northwind Labs for a new link if you still need it." Share again with reissue to hand them a new one.
Revoke
Revoke with the handle the share call answered with, here in SHARE_HANDLE:
curl -X POST "https://app.pacspace.io/api/v1/records/machine-action-record/eval-run-4417/share/$SHARE_HANDLE/revoke" \
-H "x-api-key: $PACSPACE_API_KEY"{ "success": true, "data": { "handle": "csh1_7f3a...", "status": "REVOKED", "revokedAt": "2026-10-20T09:12:44.000Z" } }Revoking ends the link. A reader who opens it afterward sees "Northwind Labs has turned this link off. The record it opened has not changed. Northwind Labs decides who holds a link to it." The record, its entries, and anything the reader saved while the link worked are unchanged; only the link is gone.
Acknowledgments
A reader can record that they checked the record (see What the reader sees). Those acknowledgments are written through a key named Dashboard in your workspace, one per environment, listed with your keys under Settings, Developer. If that key does not exist or is disabled, the control is not offered and the reader can still check everything; make the key from that page to turn acknowledgments on.
Software on the other side
When the other side is a system rather than a person, give it a grant instead of a link. POST /api/v1/records/{recordType}/{record}/grants issues a token that lets software read this one record's history and receipts with ?grant= and no key of yours, for a number of hours you choose (default 720) and, if you like, a number of uses. The token is shown once. Ask us before you build on grants; they are described here so you know they exist.
Preview as the other side
In the dashboard, the record page's share card has "Preview as the other side", which opens the Shared Record as the reader will see it before you send anything. Nothing is shared by previewing.
When the call is refused
| Code | The rule |
|---|---|
RECORD_NOT_FOUND (404) | No record exists for this id in your workspace. |
RECORD_ENTRY_NOT_FOUND (409) | This record has no entries yet; a link can be issued once the first entry is queued. |
CUSTOMER_LINK_NOT_FOUND (404) | On revoke: the handle is not a link to this record. |
RATE_LIMIT_EXCEEDED (429) | A workspace shares up to 30 links a minute. Wait retryAfterSeconds, which the answer also carries as Retry-After. |
What PacSpace still sees
PacSpace stores each entry you write, and the key its fields are sealed with, so it could build what a link reveals by itself. Revealing fields through a link keeps them from anyone who holds the link without the part after #; it does not keep them from PacSpace. PacSpace stores the encrypted fields and their size, sees when a link is opened and which parts of it are read, and deletes the encrypted fields when the link is revoked. An expired link's encrypted fields stay stored until you revoke it, so revoke a link when the engagement ends. Revoking a link stops PacSpace serving it; it does not reach a copy a reader already opened or saved. Browsers do not send the part after #, and the page removes it from the address bar as soon as the page opens, but it stays wherever the full address was kept before that: browser history, bookmarks, screenshots, extensions that can read pages, and any message it was copied into. Anyone who has the full address and the code can read the fields you revealed. A reader sees how many fields each entry with revealed fields has, including those not shown. A seal shows what was committed and when; it does not show that it was true.