Create Share Link
Creates (or replaces, if one already exists for this document) a public share link for a document. Optionally password-protected — passwords are scrypt-hashed and never returned in any response — and optionally set to expire. The caller **must have claimed a username first**, since it forms the public URL (`/{username}/{slug}`); without one the request fails with `400`. Requires the `resume:write` scope when called with an API key.
Your personal API key — vw_ followed by 64 hex characters. The same key is also accepted
as Authorization: Bearer vw_....
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/shares" \ -H "Content-Type: application/json" \ -d '{ "documentId": "doc_123", "snapshot": {}, "noExpiry": true }'{ "success": true, "message": "string", "data": { "id": "string", "userId": "string", "documentId": "string", "slug": "string", "token": "string", "username": "string", "documentSlug": "string", "publicPath": "string", "snapshot": {}, "hasPassword": true, "expiresAt": "2019-08-24T14:15:22Z", "viewCount": 0, "lastViewedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }}