staqlydocs
REST APIAPI referencePosts

A link to a read-only preview page of the post where anyone with it can comment

A link to a read-only preview page of the post where anyone with it can comment (posts:write)

Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.

POST
/v1/posts/{id}/previews

The answer carries url and token once. The token is in the URL fragment, so it does not reach server logs or other sites. expires_in_days 0 (or no body) never expires; revoke with DELETE.

Authorization

headerAuthorizationBearer <token>

API key (stk_...), or in the Community Edition the access token (stk_local_...)

Path Parameters

id*string

Header Parameters

Idempotency-Key?string

Replays the stored response when the same key is repeated with the same method, path, query string and body within 24 hours (422 idempotency_mismatch with a different request, 409 idempotency_in_progress while the first one runs). Not applied to multipart uploads or to responses that carry a secret.

Lengthlength <= 200

Request Body

application/json
  1. body
expires_in_days?integer

0 never expires

Range0 <= value <= 365

Response Body

Created

application/json
  1. response
id*string
post_id*string
created_at*string
Formatdate-time
expires_at*|
Formatdate-time
revoked_at*|
Formatdate-time
active*boolean
url?string

Only when created

token?string

Only when created

curl -X POST 'https://staqly.example.com/v1/posts/string/previews' \  -H 'Content-Type: application/json' \  -d '{}'
{  "id": "string",  "post_id": "string",  "created_at": "2019-08-24T14:15:22Z",  "expires_at": "2019-08-24T14:15:22Z",  "revoked_at": "2019-08-24T14:15:22Z",  "active": true,  "url": "string",  "token": "string"}