Skip to main content
POST
Replace placeholders in DOCX/ODT

Authorizations

X-API-Key
string
header
required

API Key (starts with ak_...)

Body

application/json
fileId
string
required

File ID of the DOCX or ODT file with placeholders

Example:

"550e8400-e29b-41d4-a716-446655440000"

variables
object
required

Map of placeholder names to values. Use string for text, or an object with type for images/lists/tables. Placeholders in the document use {{name}} or ${name} syntax.

Example:
outputFormat
enum<string>

Output format. Default: same as input format. Use "pdf" to get a PDF output.

Available options:
pdf,
docx,
odt
Example:

"pdf"

webhook
object

Optional webhook configuration

Response

201 - application/json

Placeholder replacement job created

id
string
required

Job ID

Example:

"550e8400-e29b-41d4-a716-446655440000"

action
string
required

Action that was performed

Example:

"pdf.merge"

status
enum<string>
required

Current job status

Available options:
PENDING,
PROCESSING,
COMPLETED,
FAILED
Example:

"PENDING"

inputFileIds
string[]
required

Input file IDs used for this job

Example:
outputFileId
object | null
required

Output file ID (available when COMPLETED)

Example:

null

error
object | null
required

Error message (available when FAILED)

Example:

null

createdAt
string<date-time>
required

Job creation timestamp

startedAt
object | null
required

Job start timestamp

completedAt
object | null
required

Job completion timestamp

result
object

Structured job result data (e.g. OCR markdown/JSON, generated filename, PDF metadata, form fields). Available when the job produces a direct result instead of an output file.

metadata
object
deprecated

Deprecated — use result instead. Additional metadata, duplicated from result for backward compatibility.