--- title: V1 Authoring description: Embed V1 document and template creation directly in your application. --- import { Callout } from 'fumadocs-ui/components/callout'; V1 authoring components allow your users to create and edit documents and templates using the V1 Documents and Templates API without leaving your application. Embedded authoring is included with [Enterprise](https://documen.so/enterprise-cta) plans. It is also available as a paid add-on for the [Platform Plan](https://documen.so/platform-cta-pricing). Contact sales for access. ## Components The SDK provides four V1 authoring components: | Component | Purpose | | ----------------------- | ----------------------- | | `EmbedCreateDocumentV1` | Create new documents | | `EmbedCreateTemplateV1` | Create new templates | | `EmbedUpdateDocumentV1` | Edit existing documents | | `EmbedUpdateTemplateV1` | Edit existing templates | --- ## Presign Tokens All authoring components require a **presign token** for authentication. See the [Authoring overview](/docs/developers/embedding/authoring) for details on obtaining presign tokens. A presigned token is NOT an API token --- ## Creating Documents ```jsx import { EmbedCreateDocumentV1 } from '@documenso/embed-react'; const DocumentCreator = ({ presignToken }) => { return (
{ console.log('Document created:', data.documentId); console.log('External ID:', data.externalId); }} />
); }; ``` --- ## Creating Templates ```jsx import { EmbedCreateTemplateV1 } from '@documenso/embed-react'; const TemplateCreator = ({ presignToken }) => { return (
{ console.log('Template created:', data.templateId); }} />
); }; ``` --- ## Editing Documents ```jsx import { EmbedUpdateDocumentV1 } from '@documenso/embed-react'; const DocumentEditor = ({ presignToken, documentId }) => { return (
{ console.log('Document updated:', data.documentId); }} />
); }; ``` --- ## Editing Templates ```jsx import { EmbedUpdateTemplateV1 } from '@documenso/embed-react'; const TemplateEditor = ({ presignToken, templateId }) => { return (
{ console.log('Template updated:', data.templateId); }} />
); }; ``` --- ## Props ### All Authoring Components | Prop | Type | Required | Description | | ------------------ | --------- | -------- | -------------------------------------------------------- | | `presignToken` | `string` | Yes | Authentication token from your backend | | `externalId` | `string` | No | Your reference ID to link with the document or template | | `host` | `string` | No | Custom host URL. Defaults to `https://app.documenso.com` | | `css` | `string` | No | Custom CSS string (Platform Plan) | | `cssVars` | `object` | No | [CSS variable](/docs/developers/embedding/css-variables) overrides (Platform Plan) | | `darkModeDisabled` | `boolean` | No | Disable dark mode (Platform Plan) | | `language` | `string` | No | Set the UI language. See [Supported Languages](https://github.com/documenso/documenso/tree/main/packages/lib/constants/locales.ts) | | `className` | `string` | No | CSS class for the iframe | | `features` | `object` | No | Feature toggles for the authoring experience | ### Update Components Only | Prop | Type | Required | Description | | ---------------- | --------- | -------- | ---------------------------------------------------------- | | `documentId` | `number` | Yes | The document ID to edit (for document update component) | | `templateId` | `number` | Yes | The template ID to edit (for template update component) | | `onlyEditFields` | `boolean` | No | Restrict editing to fields only, skipping recipient config | --- ## Feature Toggles Customize what options are available in the authoring experience: ```jsx ``` --- ## Event Callbacks All creation callbacks receive: | Field | Type | Description | | ---------------------------- | -------- | --------------------------------------- | | `documentId` or `templateId` | `number` | The ID of the created or updated item | | `externalId` | `string` | Your external reference ID, if provided | --- ## Field-Only Editing Restrict users to editing fields only, skipping recipient configuration: ```jsx { console.log('Fields updated:', data.documentId); }} /> ``` --- ## Complete Integration Example This example shows a full workflow where users create a document and then edit it: ```tsx import { useState } from 'react'; import { EmbedCreateDocumentV1, EmbedUpdateDocumentV1 } from '@documenso/embed-react'; const DocumentManager = ({ presignToken }) => { const [documentId, setDocumentId] = useState(null); const [mode, setMode] = useState('create'); if (mode === 'success') { return (

Document updated successfully

); } if (mode === 'edit' && documentId) { return (
{ console.log('Document updated:', data.documentId); setMode('success'); }} />
); } return (
{ console.log('Document created:', data.documentId); setDocumentId(data.documentId); setMode('edit'); }} />
); }; ``` --- ## Additional Props Pass extra props to the iframe for testing experimental features: ```jsx ``` Presign tokens expire after 1 hour by default. You can customize this duration based on your security requirements. Generate fresh tokens for each session and avoid caching them on the client side. --- ## See Also - [Embedding Overview](/docs/developers/embedding) - Signing embed concepts and props - [V2 Authoring](/docs/developers/embedding/authoring/v2) - V2 envelope authoring - [CSS Variables](/docs/developers/embedding/css-variables) - Customize appearance - [Documents API](/docs/developers/api/documents) - Create documents via API - [Templates API](/docs/developers/api/templates) - Create templates via API