---
title: "Read or write PDF metadata"
method: POST
path: "/pdf-metadata"
tags: ["PDF"]
---

# Read or write PDF metadata

`POST /pdf-metadata`

## Request

- Base URL: `https://api.cofferdock.com`
- URL: `https://api.cofferdock.com/pdf-metadata`
- Auth: API key in header `x-api-key`

With no metadata fields it READS title, author, subject, keywords, creator, producer and dates. With any field given it WRITES them and returns the PDF.

Costs 1 credit per call.

## Request body

- object
  - `file` string, byte, required: The PDF, base64-encoded.
  - `title` string: Document title to write into the PDF.
  - `author` string: Author name.
  - `subject` string: Document subject.
  - `keywords` string[]: List of keywords (strings).
  - `creator` string: Application that created the original document.
  - `producer` string: Application that produced the PDF.
  - `creation_date` string, date-time: Creation date in ISO 8601 format, e.g. "2026-09-26T10:00:00Z".
  - `modification_date` string, date-time: Last modification date in ISO 8601 format, e.g. "2026-09-26T10:00:00Z".
  - `output` 'json' | 'binary' | 'url' | 'pdf': How to return the PDF: "json" (base64 in the JSON response), "binary" (the PDF itself, ready for n8n/Make/Zapier) or "url" (a temporary download link, valid 15 minutes). Default: json when the request is JSON, binary when the input was sent raw.

## Response `200`

The metadata (read mode) or the updated PDF (write mode).

- union
  - object
    - `success` boolean
    - `mode` 'read'
    - `metadata` object
      - `title` string
      - `author` string
      - `subject` string
      - `keywords` string[]
      - `creator` string
      - `producer` string
      - `creation_date` string
      - `modification_date` string
      - `page_count` integer
    - `meta` object
      - `used` integer: Credits used this month, after this call.
      - `remaining` integer, nullable: Credits left this month (null = unlimited).
      - `unlimited` boolean
  - object
    - `success` boolean
    - `mode` 'write'
    - `pdf` string, byte
    - `mime_type` string
    - `meta` object
      - `size_bytes` integer
      - `used` integer: Credits used this month, after this call.
      - `remaining` integer, nullable: Credits left this month (null = unlimited).
      - `unlimited` boolean
  - object: Returned when output=url: a temporary download link (valid 15 minutes).
    - `success` boolean
    - `url` string, uri: Temporary download link. Expires in 15 minutes.
    - `expires_at` string, date-time
    - `mime_type` string
    - `size_bytes` integer
    - `meta` object
      - `used` integer: Credits used this month, after this call.
      - `remaining` integer, nullable: Credits left this month (null = unlimited).
      - `unlimited` boolean

## Other responses

- `400`: Invalid input (nothing is charged).
- `401`: Missing or invalid API key.
- `403`: Email not verified.
- `429`: Monthly credit limit reached, or too many requests per minute for this key (see Retry-After).
- `503`: Server busy (queue full). Retry after the seconds in the Retry-After header.

---

[API](https://skmtc.dev/cofferdock/apis/cofferdock-api.md) · [All operations](https://skmtc.dev/cofferdock/apis/cofferdock-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cofferdock/apis/cofferdock-api/revisions/b57aa000d33a?raw)
