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, and what the reader needs from you.
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. 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
curl -X POST https://app.pacspace.io/api/v1/records/machine-action-record/build-2026-09-15-0417/share \
-H "x-api-key: $PACSPACE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "sharedWith": "Acme", "expiresInDays": 30 }'{
"success": true,
"data": {
"handle": "csh1_7f3a...",
"url": "https://app.pacspace.io/c/csh1_7f3a...",
"accessCode": "K7M2QX",
"expiresAt": "2026-10-15T16:04:18.000Z",
"accessPolicy": "TWO_TIER",
"preview": false,
"recordType": "machine-action-record",
"entityId": "build-2026-09-15-0417"
}
}A record can be shared once its first entry has been queued; before that the call answers RECORD_ENTRY_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: "Acme", "the auditor". It is the name an acknowledgment is recorded under ("Acknowledged through the link issued to Acme") and it is shown to you on the record page. At most 120 characters. |
expiresInDays | Optional. 1 to 366. Default 30. |
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. |
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 | The record's name, 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. |
How long it lives
Until expiresAt. A reader who opens an expired link sees "This link expired on 15 October. The record it opened has not changed. Ask Northwind Robotics for a new link if you still need it." Share again with reissue to hand them a new one.
Revoke
curl -X POST https://app.pacspace.io/api/v1/records/machine-action-record/build-2026-09-15-0417/share/csh1_7f3a.../revoke \
-H "x-api-key: $PACSPACE_API_KEY"{ "success": true, "data": { "handle": "csh1_7f3a...", "status": "REVOKED", "revokedAt": "2026-09-20T09:12:44.000Z" } }Revoking ends the link. A reader who opens it afterward sees that your organization has turned it off and that the record itself has not changed. The record, its entries, and anything the reader downloaded 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. |
429 RATE_LIMIT_EXCEEDED | A workspace shares up to 30 links a minute. Wait retryAfterSeconds, which the answer also carries as Retry-After. |