Skip to content

Create one-time view codes

POST
/v1/artifacts/{id}/view-codes
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.

id
required
string

Artifact ID (e.g. art_abc123).

Media typeapplication/json
object
recipients
required

Who each code is for — the name is the watermark they see.

Array
>= 1 items <= 100 items
One of:
string
<= 80 characters
view_seconds
integer
default: 90 >= 10 <= 600
gate

What the code page says before anything opens. Null fields use the defaults.

object
title
string | null
<= 80 characters

Example

Carta del socio fundador
message
string | null
<= 200 characters

Example

Roberto te comparte el cierre de octubre.
button
string | null
<= 30 characters

Example

Abrir la carta
preview

Draw 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.

boolean
image_url

Public path of the preview image (/vg/…); set with PUT …/view-codes/gate/image.

string | null

Created. Hand each person their link (or the page link and their code).

Media typeapplication/json
object
enabled
boolean
url
string format: uri
view_seconds
integer
codes
Array<object>
object
id
string
label
string
code
string
link

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.

string format: uri
view_seconds
integer
created_at
string format: date-time

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)

Media typeapplication/json
object
success
required
boolean
error
required

Human-readable message.

string
code
required

Machine-readable error code.

string
request_id

Correlation id (also the X-Request-Id header). Quote it in support tickets.

string
reason

Finer cause under code. For UNAUTHORIZED: missing, invalid, revoked or expired.

string
hint

What to do next, in plain words.

string
suggestion
string
param

The request field at fault.

string
docs

Doc page for this error.

string
redirect_url
string
support

Present on 5xx — how to reach a human.

object
how
string
include
Array<string>

Example

{
"success": false,
"support": {
"how": "POST /v1/support/tickets",
"include": [
"request_id"
]
}
}

Access denied

Media typeapplication/json
object
success
required
boolean
error
required

Human-readable message.

string
code
required

Machine-readable error code.

string
request_id

Correlation id (also the X-Request-Id header). Quote it in support tickets.

string
reason

Finer cause under code. For UNAUTHORIZED: missing, invalid, revoked or expired.

string
hint

What to do next, in plain words.

string
suggestion
string
param

The request field at fault.

string
docs

Doc page for this error.

string
redirect_url
string
support

Present on 5xx — how to reach a human.

object
how
string
include
Array<string>

Example

{
"success": false,
"support": {
"how": "POST /v1/support/tickets",
"include": [
"request_id"
]
}
}