# POST /forms/submissions/:id/render-pdf

**Resource:** [Forms](./forms.md)  
**Scopes:** `forms:write`  
**Write operation:** yes

Render a completed form submission to PDF and archive it in the Documents library. The PDF is auto-attached to the linked opportunity, contact, or account. Submission must have status "completed". Costs 1 credit per rendered page (typical intake form = 1-3 pages). All override params fall back to the form template settings, then platform defaults.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `id` | path | uuid | yes | Submission ID (must be a completed submission) |
| `folder` | body | string | no | Documents library folder for the PDF. Overrides the template submissionFolder setting. Default: "Client Forms". |
| `document_type` | body | string | no | document_type tag on the resulting Documents row. Common values: "Other", "Invoice", "Proposal", "Agreement", "Report". Default: template submissionDocumentType setting, then "Other". |
| `name` | body | string | no | Filename base for the PDF (without .pdf extension). A timestamp suffix is appended automatically. Default: "<recipient_name> - <template_name>". |
| `description` | body | string | no | Description on the Documents row. Default: "Archived form submission - completed <date>". |

## Request example

```bash
{}
```

## Response example

```json
{
  "data": {
    "file_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "name": "John Smith - Client Intake Form_1748000000000.pdf",
    "storage_path": "company-uuid/documents/random-uuid.pdf",
    "file_size": 42560,
    "mime_type": "application/pdf",
    "folder": "Client Forms",
    "document_type": "Other",
    "pages": 2,
    "credits_charged": 2,
    "attached_to": {
      "table": "crm_deals",
      "id": "deal-uuid"
    },
    "attach_warning": null
  },
  "meta": {
    "credits_remaining": 9488
  }
}
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`