Create a document

Create a document. It is created with an empty draft (version 1.0) and is not used in production until it has been published. The template content (sections) is designed on the Root dashboard.

Documents are shared by your sandbox and production environments, so changing one with an API key requires a production API key. A sandbox API key can read documents but gets 403 here.

Documents are opt-in per organization: unless the org_documents feature flag is enabled for your organization this endpoint returns 404.

Body Params
string
required

Unique key for the document within your organization, e.g. policy_schedule. Letters, digits and underscores only; it is stored in lowercase. Notification templates and product module code refer to the document by this key, and it cannot be changed later.

string
required

The display name of the document.

string

An optional description.

string

Optional product module key to associate the document with, for filtering.

boolean
Defaults to true

Whether the document is rendered. A disabled document produces skipped renders.

string
enum
Defaults to policy

The kind of record a document is rendered for. Merge variables in the template resolve against this entity, and the policy it belongs to.

Responses

400

Validation error, for example a key containing spaces or hyphens.

403

The request used a sandbox API key, or the caller is missing the communications:create permission.

404

Documents are not enabled for the organization.

409

A document with this key already exists in the organization.

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json