---
title: "Grants"
description: "A grant lets anyone open a document without an account, through its link or on a website. You decide what they can do, and change it whenever you like."
source: "https://www.cloudpdf.com/docs/platform/grants"
---

# 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](https://www.cloudpdf.com/docs/platform/grants-list.png)

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:

| Setting                                                                                         | What it decides                                                                                |
| :---------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- |
| **Name**                                                                                        | What you call it, such as "Website" or "Sent to Acme". Visitors never see it                   |
| [**People can**](https://www.cloudpdf.com/docs/platform/grants/permissions.md)                  | What visitors can do: Read, Comment, Fill and sign or Edit, plus Download, Print and Copy text |
| [**Who sees changes**](https://www.cloudpdf.com/docs/platform/grants/changes.md)                | Whether visitors share one document, or each get their own copy                                |
| [**Where it opens**](https://www.cloudpdf.com/docs/platform/grants/where.md)                    | Anywhere, or only on the websites you list                                                     |
| [**More options**](https://www.cloudpdf.com/docs/platform/grants/protect.md)                    | A passphrase, an expiry date, and questions visitors answer first                              |
| [**Pages show as**](https://www.cloudpdf.com/docs/platform/grants/permissions.md#pages-show-as) | Images, or Protected with the Screenshot protection add-on                                     |

[Put a PDF on your website](https://www.cloudpdf.com/docs/platform/quick-start/website.md) 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.

```ts
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.

| Call                                      | What 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](https://www.cloudpdf.com/docs/api-reference/grants/create.md).

- [What people can do](https://www.cloudpdf.com/docs/platform/grants/permissions.md) — The four levels, and Download, Print and Copy text.
- [Grants and tokens](https://www.cloudpdf.com/docs/platform/concepts/access.md) — When a grant is right, and when your users need a token.
