Usage
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
document | object | Yes | Document source (see below) |
fields | array | Yes | Fields to populate (see below) |
output_format | string | No | Output format: docx or pdf. Default: docx |
Document object
Provide either a URL or base64-encoded content:| Property | Type | Description |
|---|---|---|
url | string | URL to the DOCX template |
base64 | string | Base64-encoded DOCX template |
Field object
| Property | Type | Required | Description |
|---|---|---|---|
id | string | One of | Target field ID (for single field) |
group | string | One of | Target field group (for multiple fields) |
type | string | Yes | Field type: text, image, date, number |
value | string/number | Yes | Value to populate |
options | object | No | Additional options (e.g., image dimensions) |
Field types
| Type | Value Format | Use Case |
|---|---|---|
text | String | Names, descriptions, addresses |
number | Number | Amounts, quantities, prices |
date | ISO date string | Contract dates, deadlines |
image | Image URL | Signatures, logos, stamps |
Response
Returns the annotated document as binary data with appropriate content type based onoutput_format.
Examples
Fill a contract template
Add signature to document
Use field groups for repeated content
When your template has multiple fields with the same tag (e.g., a header and footer both showing client name), usegroup instead of id:
Creating templates
To create a template for use with the Annotate API:- Create a DOCX document in Microsoft Word or Google Docs
- Add SuperDoc annotation fields where you want dynamic content
- Upload the template to a publicly accessible URL or your storage
- Call the Annotate API with field values
See SuperDoc’s documentation for details on adding annotation fields to your templates.

