Skip to content

Write metadata

POST
/v1/pdf/metadata/write
curl -H "X-Api-Key: $KEY" -F files=@a.pdf \
-F 'metadata={"Title":"Invoice","Author":"Ada"}' \
http://localhost:9027/v1/pdf/metadata/write -o titled.pdf

Writes metadata keys; existing keys not named are kept.

Media typemultipart/form-data
object
files
required
string format: binary
metadata
required

JSON object of keys such as Title, Author, Subject, Keywords, sent as text.

string

Example

{"Title": "Invoice", "Author": "Ada"}
outputFilename
string | null

The PDF with its metadata changed

Media typeapplication/pdf

The file, as bytes.

string format: binary

The request is wrong

Media typeapplication/json

The JSON body of every error response.

object
error
required

A stable, machine-readable kind.

string
message
required

What went wrong, for a person.

string

Example

{
"error": "invalid_request",
"message": "unknown step 'teleport'"
}