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"
}
}
'import requests
url = "https://app.dumplingai.com/api/v1/write-pdf-metadata"
payload = {
"inputMethod": "url",
"files": ["https://example.com/report.pdf"],
"metadata": {
"Title": "2025 Strategy Overview",
"Author": "DumplingAI"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
inputMethod: 'url',
files: ['https://example.com/report.pdf'],
metadata: {Title: '2025 Strategy Overview', Author: 'DumplingAI'}
})
};
fetch('https://app.dumplingai.com/api/v1/write-pdf-metadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.dumplingai.com/api/v1/write-pdf-metadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'inputMethod' => 'url',
'files' => [
'https://example.com/report.pdf'
],
'metadata' => [
'Title' => '2025 Strategy Overview',
'Author' => 'DumplingAI'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.dumplingai.com/api/v1/write-pdf-metadata"
payload := strings.NewReader("{\n \"inputMethod\": \"url\",\n \"files\": [\n \"https://example.com/report.pdf\"\n ],\n \"metadata\": {\n \"Title\": \"2025 Strategy Overview\",\n \"Author\": \"DumplingAI\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.dumplingai.com/api/v1/write-pdf-metadata")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inputMethod\": \"url\",\n \"files\": [\n \"https://example.com/report.pdf\"\n ],\n \"metadata\": {\n \"Title\": \"2025 Strategy Overview\",\n \"Author\": \"DumplingAI\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dumplingai.com/api/v1/write-pdf-metadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inputMethod\": \"url\",\n \"files\": [\n \"https://example.com/report.pdf\"\n ],\n \"metadata\": {\n \"Title\": \"2025 Strategy Overview\",\n \"Author\": \"DumplingAI\"\n }\n}"
response = http.request(request)
puts response.read_body{
"url": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Document Processing
Write PDF Metadata
Update metadata fields embedded in a PDF document.
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"
}
}
'import requests
url = "https://app.dumplingai.com/api/v1/write-pdf-metadata"
payload = {
"inputMethod": "url",
"files": ["https://example.com/report.pdf"],
"metadata": {
"Title": "2025 Strategy Overview",
"Author": "DumplingAI"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
inputMethod: 'url',
files: ['https://example.com/report.pdf'],
metadata: {Title: '2025 Strategy Overview', Author: 'DumplingAI'}
})
};
fetch('https://app.dumplingai.com/api/v1/write-pdf-metadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.dumplingai.com/api/v1/write-pdf-metadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'inputMethod' => 'url',
'files' => [
'https://example.com/report.pdf'
],
'metadata' => [
'Title' => '2025 Strategy Overview',
'Author' => 'DumplingAI'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.dumplingai.com/api/v1/write-pdf-metadata"
payload := strings.NewReader("{\n \"inputMethod\": \"url\",\n \"files\": [\n \"https://example.com/report.pdf\"\n ],\n \"metadata\": {\n \"Title\": \"2025 Strategy Overview\",\n \"Author\": \"DumplingAI\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.dumplingai.com/api/v1/write-pdf-metadata")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inputMethod\": \"url\",\n \"files\": [\n \"https://example.com/report.pdf\"\n ],\n \"metadata\": {\n \"Title\": \"2025 Strategy Overview\",\n \"Author\": \"DumplingAI\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dumplingai.com/api/v1/write-pdf-metadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inputMethod\": \"url\",\n \"files\": [\n \"https://example.com/report.pdf\"\n ],\n \"metadata\": {\n \"Title\": \"2025 Strategy Overview\",\n \"Author\": \"DumplingAI\"\n }\n}"
response = http.request(request)
puts response.read_body{
"url": "<string>"
}{
"error": "<string>"
}{
"error": "<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: 50 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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Indicates whether binary content is supplied via URL or base64-encoded string.
Available options:
url, base64 Array of PDF URLs or base64-encoded PDF contents to update.
Minimum array length:
1Key-value metadata pairs to write into the PDF.
Response
PDF metadata updated.
Temporary download URL for the updated PDF (or ZIP when multiple files are provided).