CloudPDF
DocsPricing
Start building

Grants

A grant lets anyone open a document without an account: everyone with its link, or everyone on a website that embeds it. You decide what they can do, and you can change it, pause it or end it whenever you like. Every link and every page that embeds the grant follows.

A document's Grants card with two grants, Website and Client review, each with Copy link and Embed buttons

A document can have as many grants as you need: one for your website, one for a client review, one for a printed QR code. Each has its own permissions and embed code, and a name if you give it one, so you can end one without touching the others.

Make one#

On the document’s page, click New grant. Each setting has a page of its own:

SettingWhat it decides
NameWhat you call it, such as “Website” or “Sent to Acme”. Visitors never see it
People canWhat visitors can do: Read, Comment, Fill and sign or Edit, plus Download, Print and Copy text
Who sees changesWhether visitors share one document, or each get their own copy
Where it opensAnywhere, or only on the websites you list
More optionsA passphrase, an expiry date, and questions visitors answer first
Pages show asImages, or Protected with the Screenshot protection add-on

Put a PDF on your website makes one, step by step.

Use it#

Each grant in the list has two buttons:

  • Copy link copies its page on cloudpdf.link. Whoever opens the link sees the document full screen, with the grant’s permissions. Only a grant that opens Anywhere has one.
  • Embed shows the code for your website: a few lines of HTML, or a component for React, Vue, Svelte or Angular.

Under its name, a line says what the grant allows, then its views and the day you made it. Views count each pass the viewer gets, so someone who keeps it open counts again about every 10 minutes.

In code#

Your server can make and change grants too, with an API key that has Grants on. A grant gives only what the key itself may do inside documents: with Read, grants that read, download and copy text, and with Write, any grant.

import { permissions } from '@/lib/permissions';
 
const { grant } = await cloudpdf.grants.create({
  tenantId,
  docId: 'doc_20b05b13f613f795ffd14e57',
  name: 'Website',
  scope: permissions.read,
});

grant.id is what the embed code opens: src = { grant: 'grt_…' }. A grant made in code appears in the dashboard too, and the other way round.

CallWhat it does
grants.create({ tenantId, docId, … })Makes a grant
grants.list({ tenantId, docId })A document’s grants
grants.update({ tenantId, grantId, … })Changes any setting
grants.update({ …, disabled: true })Pauses it
grants.delete({ tenantId, grantId })Deletes one with no visitors
grants.archive({ tenantId, grantId })Ends one, and keeps what its visitors made

Every setting is in the API reference: Create a grant.