D
Druckling
Docs

Create a share link

POST
/documents/{id}/share_links

Creates a public, unguessable link to a rendered document that anyone can open without an API key, until it expires or is revoked. The link never outlives the file: expires_at is capped by the document's retention. The url is returned only here.

Authorization

headerAuthorizationBearer <token>

Authorization: Bearer dr_live_… or dr_test_…

Path Parameters

id*string

Document id.

Request Body

application/json
  1. body
expires_in_days?integer

Days until the link stops working (default 7, at most 30).

Range1 <= value <= 30

Response Body

OK

application/json
  1. response
id*string
object*unknown
document*string
url*|

The public link. Returned only when the link is created: Druckling keeps a hash of it, not the link itself.

hint*string

Last four characters of the link, to tell links apart.

status*string
Value in"active""expired""revoked"
expires_at*string
Formatdate-time
revoked_at*|null
test_mode*boolean
created_at*string
Formatdate-time
Example Request
curl -X POST 'https://druckling-nine.vercel.app/v1/documents/string/share_links' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response201
{  "id": "string",  "object": "share_link",  "document": "string",  "url": "string",  "hint": "string",  "status": "active",  "expires_at": "2019-08-24T14:15:22Z",  "revoked_at": "2019-08-24T14:15:22Z",  "test_mode": true,  "created_at": "2019-08-24T14:15:22Z"}