Create one-time view codes
const url = 'https://shareout.site/v1/artifacts/example/view-codes';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"recipients":[{"label":"example"}],"view_seconds":90,"gate":{"title":"Carta del socio fundador","message":"Roberto te comparte el cierre de octubre.","button":"Abrir la carta","preview":false}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://shareout.site/v1/artifacts/example/view-codes \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "recipients": [ { "label": "example" } ], "view_seconds": 90, "gate": { "title": "Carta del socio fundador", "message": "Roberto te comparte el cierre de octubre.", "button": "Abrir la carta", "preview": false } }'One personal code per person: the page link plus that code opens the page once, with no sign-in, for view_seconds, then it closes by itself and the code never works again. The viewer’s name is written across the page; copy, print, save and download are blocked. Turns the page private; the owner and named collaborators keep their own access. Web pages only. The codes are in this response only. A browser cannot block a screenshot or a photo of the screen — the watermark is what names the person on any capture.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Artifact ID (e.g. art_abc123).
Request Bodyrequired
Section titled “Request Bodyrequired”object
What the code page says before anything opens. Null fields use the defaults.
object
Example
Carta del socio fundadorExample
Roberto te comparte el cierre de octubre.Example
Abrir la cartaDraw a link preview (WhatsApp, Slack, iMessage…): the code page answers 200 with Open Graph tags made of this title, message and the preview image (or the workspace logo). Off, a one-time page advertises nothing. Missing on PUT means off.
Public path of the preview image (/vg/…); set with PUT …/view-codes/gate/image.
Responses
Section titled “Responses”Created. Hand each person their link (or the page link and their code).
object
object
The person’s own link: the page URL with the code in the fragment (#code=…). It opens the code page with the code filled in, so they only tap Open. The fragment never reaches a server; nothing is spent until that tap.
Example
{ "codes": [ { "id": "vcd_3f9a2b", "code": "K7M4-QP9X", "link": "https://acme.shareout.site/precios-noviembre/#code=K7M4-QP9X" } ]}Invalid recipients or view_seconds, not a web page (ONETIME_HTML_ONLY), or too many codes (VIEW_CODE_LIMIT)
object
Human-readable message.
Machine-readable error code.
Correlation id (also the X-Request-Id header). Quote it in support tickets.
Finer cause under code. For UNAUTHORIZED: missing, invalid, revoked or expired.
What to do next, in plain words.
The request field at fault.
Doc page for this error.
Present on 5xx — how to reach a human.
object
Example
{ "success": false, "support": { "how": "POST /v1/support/tickets", "include": [ "request_id" ] }}Access denied
object
Human-readable message.
Machine-readable error code.
Correlation id (also the X-Request-Id header). Quote it in support tickets.
Finer cause under code. For UNAUTHORIZED: missing, invalid, revoked or expired.
What to do next, in plain words.
The request field at fault.
Doc page for this error.
Present on 5xx — how to reach a human.
object
Example
{ "success": false, "support": { "how": "POST /v1/support/tickets", "include": [ "request_id" ] }}