--- title: Direct Links description: Share a URL or embed an iframe to let users sign documents without email invitations. --- import { Callout } from 'fumadocs-ui/components/callout'; import { Step, Steps } from 'fumadocs-ui/components/steps'; import { Tab, Tabs } from 'fumadocs-ui/components/tabs'; ## What Are Direct Links? Direct links are unique URLs tied to a template that allow anyone to: {/* prettier-ignore */} View and sign a document without receiving an email invitation Enter their own name and email address Complete signature fields and submit the document When someone uses a direct link, Documenso creates a new document from the template with that person as the signer. ### When to Use Direct Links - Collecting signatures from unknown recipients (forms, waivers, petitions) - Embedding signing in your website or application - Self-service contracts where customers initiate signing - Public-facing agreements that anyone can sign ### Limitations - Only work with templates, not individual documents - Each link is tied to one recipient role in the template - Recipients enter their own information (you cannot prefill recipient details) ## Creating Direct Link Templates Before embedding, you need a template with direct links enabled. ### Via the Dashboard {/* prettier-ignore */} Go to **Templates** and create or select a template ![Team templates](/embedding/team-templates.png) Click the three-dot menu and select **Direct link** Click **Enable direct link signing** Choose which recipient in your template will use the direct link ![Enable direct link](/embedding/enable-direct-link.png) Copy the generated URL ### Via the API Create a direct link for an existing template: ```bash # Create direct link for template curl -X POST "https://app.documenso.com/api/v2/template/direct/create" \ -H "Authorization: api_xxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{ "templateId": 123, "directRecipientId": 1 }' ``` ```typescript const API_TOKEN = process.env.DOCUMENSO_API_TOKEN; const BASE_URL = 'https://app.documenso.com/api/v2'; const response = await fetch(`${BASE_URL}/template/direct/create`, { method: 'POST', headers: { Authorization: API_TOKEN, 'Content-Type': 'application/json', }, body: JSON.stringify({ templateId: 123, directRecipientId: 1, // Optional: specific recipient to use }), }); const directLink = await response.json(); console.log('Direct link token:', directLink.token); // URL: https://app.documenso.com/d/{token} ```` ### Response ```json { "id": 456, "token": "abc123xyz", "templateId": 123, "directTemplateRecipientId": 1, "enabled": true, "createdAt": "2025-01-15T10:00:00.000Z" } ```` The direct link URL format is: ``` https://app.documenso.com/d/{token} ``` ![Copy recipient token](/embedding/copy-recipient-token.png) --- ## Embedding in an iframe Embed the signing experience directly in your application using an iframe. ### Basic iframe Embedding ```html ``` ### Responsive iframe ```html
``` ### React Component Example ```tsx function DocumentSigner({ token }: { token: string }) { return (