Skip to content

List one-time view codes

GET
/v1/artifacts/{id}/view-codes
curl --request GET \
--url https://shareout.site/v1/artifacts/example/view-codes \
--header 'Authorization: Bearer <token>'

Every code on the page: who it is for, whether it was opened, from what kind of device, and what the viewer tried while it was open (copy, print, save, right-click, the screenshot key, leaving the page). The codes themselves are never returned again. Owner or editor.

id
required
string

Artifact ID (e.g. art_abc123).

The page’s codes

Media typeapplication/json
object
enabled

The page opens with a code (auth_method onetime).

boolean
url
string format: uri
gate

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

object
title
string | null
<= 80 characters
message
string | null
<= 200 characters
button
string | null
<= 30 characters
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
view_codes
Array<object>
object
id
string
label

Who the code is for (their watermark).

string
view_seconds
integer
status
string
Allowed values: unused open viewed revoked
created_at
string format: date-time
opened_at
string format: date-time
nullable
closed_at
string format: date-time
nullable
opened_device
string
nullable
Allowed values: phone tablet computer
opened_browser

Browser and system, from the user agent.

string
nullable
opened_city

Approximate city it was opened from, as Cloudflare reports it. The IP is never stored.

string
nullable
opened_region
string
nullable
opened_country

ISO 3166-1 alpha-2 country code.

string
nullable
revoked_at
string format: date-time
nullable
attempts

What the viewer tried while it was open, by kind. Signals, not proof.

object
key
additional properties
integer

Example

{
"gate": {
"title": "Carta del socio fundador",
"message": "Roberto te comparte el cierre de octubre.",
"button": "Abrir la carta",
"preview": false
},
"view_codes": [
{
"status": "unused",
"opened_device": "phone",
"opened_browser": "Chrome · Android",
"opened_region": "Santa Fe",
"opened_country": "AR",
"attempts": {
"copy": 2,
"left_page": 1
}
}
]
}

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"
]
}
}