Shotstash
API referenceREST referenceShare

Unlock a share link

Checks the access code of a PRIVATE link and sets the shotstash_share_<slug> cookie (HttpOnly; Path=/s/<slug>); answers the page. PUBLIC links answer the page without a code. 5 attempts per 15 minutes per IP and 20 per hour per link.

Try the REST routes against the public demo at https://demostash.aldyernesto.my.id. Get a read-only token (valid for 60 minutes), then paste it as the Bearer token in the console of any route.

POST/s/{slug}/unlockNo try-it console: the demo answers cross-origin requests on /api only.

Checks the access code of a PRIVATE link and sets the shotstash_share_ cookie (HttpOnly; Path=/s/); answers the page. PUBLIC links answer the page without a code. 5 attempts per 15 minutes per IP and 20 per hour per link.

Path Parameters

slug*string

Share link slug.

Request Body

application/json
  1. body
code?|

Access code (ignored for PUBLIC links).

section?|

Section id to open inside a project link.

Response Body

The share page

application/json
  1. response
state*string

ok, or why the link cannot be shown.

Value in"ok""expired""revoked""gone""not-found""private"
target?string

What was removed (gone only).

Value in"project""section""file""unknown"
payload?

The page (ok only).

curl -X POST "https://example.com/s/string/unlock" \  -H "Content-Type: application/json" \  -d '{}'
{  "state": "ok",  "target": "project",  "payload": {    "slug": "string",    "kind": "project",    "title": "string",    "number": "string",    "projectId": "string",    "folderId": "string",    "zipUrl": "string",    "projectName": "string",    "sectionLabel": {      "number": "string",      "title": "string"    },    "fileCount": 0,    "sectionCount": 0,    "totalSizeText": "string",    "dateText": "string",    "breakdown": {      "photos": 0,      "videos": 0,      "documents": 0    },    "expiresAt": "string",    "stageThumbs": [      "string"    ],    "files": [      {        "id": "string",        "name": "string",        "kind": "image",        "sizeBytes": 0,        "sizeText": "string",        "thumbnailUrl": "string",        "inlineUrl": "string",        "downloadUrl": "string",        "duration": "string"      }    ],    "sections": [      {        "id": "string",        "number": "string",        "title": "string",        "fileCount": 0,        "repThumbs": [          "string"        ]      }    ],    "single": {      "id": "string",      "name": "string",      "kind": "image",      "sizeBytes": 0,      "sizeText": "string",      "thumbnailUrl": "string",      "inlineUrl": "string",      "downloadUrl": "string",      "duration": "string"    },    "section": {      "id": "string",      "number": "string",      "title": "string",      "fileCount": 0    }  }}