Skip to main content
POST
/
api
/
v1
/
write-pdf-metadata
Write PDF metadata
curl --request POST \
  --url https://app.dumplingai.com/api/v1/write-pdf-metadata \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "inputMethod": "url",
  "files": [
    "https://example.com/report.pdf"
  ],
  "metadata": {
    "Title": "2025 Strategy Overview",
    "Author": "DumplingAI"
  }
}'
{
  "url": "<string>"
}

Description

This endpoint writes metadata to PDF files.

Endpoint

POST /api/v1/write-pdf-metadata

Headers

  • Content-Type: application/json
  • Authorization: Bearer <API_KEY> (required)

Request Body

{
  "inputMethod": "string", // Required. Either "url" or "base64"
  "files": ["string"], // Required. Array of URLs or base64-encoded PDF contents
  "metadata": {
    "Title": "string",
    "Author": "string",
    "Subject": "string",
    "Keywords": "string",
    "Creator": "string",
    "Producer": "string"
  }
}

Responses

Success (200)

Returns the URL to the modified PDF.
{
  "url": "string" // URL to the modified PDF file or ZIP file
}

Notes

  • Credit usage: 5 credits per 100MB of output PDF size
  • Multiple files can be processed in a single request
  • Returns a ZIP file if multiple PDFs are processed
  • Supports standard PDF metadata fields
  • Files are temporarily stored (24-hour retention)
  • Not all metadata are writable. Consider taking a look at https://exiftool.org/TagNames/XMP.html#pdf for an (exhaustive?) list of available metadata.
  • Caution: Writing metadata may compromise PDF/A compliance.

Rate Limiting

Rate limit headers are included in the response.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
inputMethod
enum<string>
required

Indicates whether binary content is supplied via URL or base64-encoded string.

Available options:
url,
base64
files
string[]
required

Array of PDF URLs or base64-encoded PDF contents to update.

Minimum length: 1
metadata
object
required

Key-value metadata pairs to write into the PDF.

Response

PDF metadata updated.

url
string<uri>
required

Temporary download URL for the updated PDF (or ZIP when multiple files are provided).

I