Skip to main content
POST
/
api
/
v1
/
dev
/
tools
/
pdf
/
fill-form
Fill PDF form fields
curl --request POST \
  --url https://api.autype.com/api/v1/dev/tools/pdf/fill-form \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "fileId": "550e8400-e29b-41d4-a716-446655440000",
  "fields": {
    "name": "John Doe",
    "agree": true,
    "country": "DE"
  },
  "flatten": false,
  "webhook": {
    "webhookUrl": "https://example.com/webhook",
    "webhookAuth": {
      "headerName": "X-API-Key",
      "headerValue": "my-secret-key",
      "basicAuthUsername": "user",
      "basicAuthPassword": "pass"
    }
  }
}
'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "action": "pdf.merge",
  "status": "PENDING",
  "inputFileIds": [
    "file-id-1",
    "file-id-2"
  ],
  "outputFileId": null,
  "error": null,
  "createdAt": "2023-11-07T05:31:56Z",
  "startedAt": {},
  "completedAt": {},
  "metadata": {}
}

Authorizations

X-API-Key
string
header
required

API Key (starts with ak_...)

Body

application/json
fileId
string
required

File ID of the PDF with form fields

Example:

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

fields
object
required

Map of field names to values. Use string for text/dropdown/radio fields, boolean for checkboxes.

Example:
{
"name": "John Doe",
"agree": true,
"country": "DE"
}
flatten
boolean

Whether to flatten form fields after filling (makes them non-editable). Default: false.

Example:

false

webhook
object

Optional webhook configuration

Response

201 - application/json

Fill form 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

Example:
["file-id-1", "file-id-2"]
outputFileId
object
required

Output file ID (available when COMPLETED)

Example:

null

error
object
required

Error message (available when FAILED)

Example:

null

createdAt
string<date-time>
required

Job creation timestamp

startedAt
object
required

Job start timestamp

completedAt
object
required

Job completion timestamp

metadata
object

Additional metadata (e.g. PDF metadata result)