Skip to main content
PATCH

Authorizations

Authorization
string
header
required

A key generated from Settings → Developers, sent as Authorization: Bearer dr_live_<12 hex chars>_<64 hex chars>. Keys carry explicit scopes — each endpoint states the one it requires. The full key is shown exactly once at generation time and cannot be retrieved again; only the keyId prefix is shown afterward. A revoked key fails auth on its very next request.

Path Parameters

id
string<uuid>
required

The document id.

Body

application/json

revision is required, and at least one other field. Any unknown field is rejected with 400 VALIDATION_ERROR.

revision
string
required

The revision of the document as last returned by GET or PATCH (the plain timestamp is the form to send; the ETag header value is accepted too, as the quoted "..." or the weak W/"..." form). A stale value is 409 REVISION_CONFLICT. Send it here, not as If-Match.

Example:

"2026-10-04T01:02:03.456Z"

status
enum<string>

live on a draft post or form publishes it, with the publishing checks; a published post or form cannot go back to draft. live and inactive pause and resume a published document. See the table on the operation for what each value does per document kind.

Available options:
live,
draft,
inactive
expiresAt
string<date-time> | null

RFC 3339 with Z or a numeric offset, stored as UTC. null removes the expiry. Omit it to leave the expiry alone.

Example:

"2026-12-31T23:59:59+09:00"

requireEmail
boolean

true asks visitors for an email, false stops asking. false is refused with 422 PROTECTION_RULE_CONFLICT for a form, a document with specific access, and a document with a lead gate. Turning it on ends the sessions visitors already unlocked.

requireEmailVerification
boolean

true makes visitors confirm their email through a link. Turning it on ends the sessions visitors already unlocked. Refused for a form (422 PROTECTION_RULE_CONFLICT).

allowedEmails
string<email>[]

The full list of allowed email addresses (it replaces the stored list). Lowercased and de-duplicated. [] empties it. Enforced only when the access mode is specific. A non-empty list is refused for a form.

Maximum array length: 10000
Example:
allowedDomains
string[]

The full list of allowed bare domains such as acme.com (it replaces the stored list). Lowercased and de-duplicated; exact match, subdomains are not included. [] empties it. Enforced only when the access mode is specific. A non-empty list is refused for a form.

Maximum array length: 10000
Example:

Response

The document after the change.

A DocumentSummary plus description, expiry, a protection summary with the two allow lists, and the revision. status is the one visitors get (the same value as in the list, including expired). This is also the body a successful PATCH /api/preview/documents/{id} returns.

id
string<uuid>
required

The document's id.

title
string
required

The document's title.

kind
enum<string>
required

What the document is made of: notion, pdf, upload (a file you uploaded), post or form.

Available options:
notion,
pdf,
upload,
post,
form
status
enum<string>
required

The status: live (visitors can open it), draft (a post or form that is not published yet), inactive (turned off, by you or automatically, for example when a Notion page can no longer be read) or expired (its expiry date has passed).

Available options:
live,
draft,
inactive,
expired
url
string<uri>
required

The public share link.

createdAt
string<date-time>
required

When the document was created (RFC 3339, UTC).

updatedAt
string<date-time>
required

When the document was last changed (RFC 3339, UTC).

expiresAt
string<date-time> | null
required

The fixed expiry date, or null when there is none. A per-viewer (relative) expiry has no single date, so it is null here; see expiry on the single-document response.

description
string | null
required

The document's subtitle, or null when none is set.

expiry
object
required

When the document expires.

protection
object
required

How the document is gated. Change the email and allow-list fields with PATCH; the password and the access mode are read-only here. Never contains the password.

revision
string
required

Identifies this version of the settings (an ISO 8601 UTC timestamp, milliseconds). Also sent as the ETag header; send it back as revision in the body of PATCH. Treat it as opaque.