Skip to content

Write bookmarks

POST
/v1/pdf/bookmarks/write
curl -H "X-Api-Key: $KEY" -F files=@a.pdf -F 'bookmarks=<bookmarks.json' \
http://localhost:9027/v1/pdf/bookmarks/write -o marked.pdf

Replaces the outline.

Media typemultipart/form-data
object
bookmarks
required

JSON array of {title, page, children}, sent as text.

string

Example

[{"title": "Summary", "page": 1}]
files
required
string format: binary
outputFilename
string | null

The PDF with its outline replaced

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'"
}