Create a share link
POST
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.
header
AuthorizationBearer <token>Authorization: Bearer dr_live_… or dr_test_…
id*stringDocument id.
application/json- body
expires_in_days?integerDays until the link stops working (default 7, at most 30).
Range
1 <= value <= 30OK
application/json- response
id*stringobject*unknowndocument*stringurl*|The public link. Returned only when the link is created: Druckling keeps a hash of it, not the link itself.
hint*stringLast four characters of the link, to tell links apart.
status*stringValue in
"active""expired""revoked"expires_at*stringFormat
date-timerevoked_at*|nulltest_mode*booleancreated_at*stringFormat
date-timecurl -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"}