Create a document link (public or recipient-only, with expiration and download limit)
const url = 'https://api.replifier.com/v1/drive/files/dfl_01hx0000000000000000000000/links';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"policy":"pinned","audience":"public","title":"example","expiresAt":"2026-04-15T12:00:00Z","maxDownloads":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.replifier.com/v1/drive/files/dfl_01hx0000000000000000000000/links \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "policy": "pinned", "audience": "public", "title": "example", "expiresAt": "2026-04-15T12:00:00Z", "maxDownloads": 1 }'It is never an attachment: the email carries this link. The file must be active and clean. recipient requires full tracking: the sending engine signs ?r= with each recipient’s send; in anonymous mode events are stored without send or contact.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
dfl_01hx0000000000000000000000Request Bodyrequired
Section titled “Request Bodyrequired”object
Defaults to pinned to the current version: replacing the file does not change what has already gone out.
Defaults to public. recipient requires the 6-digit code sent to the recipient’s email.
Responses
Section titled “Responses”Link
object
pinned: always that version; latest: the file’s current version.
Public link. With audience: recipient, the sending engine appends ?r=<recipient signature>.
Totals for people; machines (security scanners) do not count.
Example
{ "policy": "pinned", "audience": "public", "status": "active"}Invalid data
object
object
Example
{ "error": { "code": "not_found" }}No session, expired session, or invalid, expired or revoked API key
object
object
Example
{ "error": { "code": "not_found" }}Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)
object
object
Example
{ "error": { "code": "not_found" }}Does not exist or is not visible to you
object
object
Example
{ "error": { "code": "not_found" }}Conflict
object
object
Example
{ "error": { "code": "not_found" }}Internal error
object
object
Example
{ "error": { "code": "not_found" }}