Get the current PDF export
Returns the export in progress, or the most recent one when nothing is running. Poll this after starting an export: progress counts pages as they render, and downloadUrl appears once the PDF is ready.
An export started from the dashboard is returned here too, so exportId can change between polls if someone starts a new export while yours is running.
curl -X GET "https://api.documentationai.app/api/v1/exports/pdf" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
import json
url = "https://api.documentationai.app/api/v1/exports/pdf"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://api.documentationai.app/api/v1/exports/pdf", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.documentationai.app/api/v1/exports/pdf", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.documentationai.app/api/v1/exports/pdf')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
response = http.request(request)
puts response.body
{
"exportId": "6fa5a52d-d8b7-4b24-ac92-a55378f5eec4",
"status": "completed",
"progress": {
"completed": 130,
"total": 130
},
"fileSize": 38580135,
"downloadUrl": "https://exports.r2.cloudflarestorage.com/exports/org-.../documentation-export.pdf?X-Amz-Signature=...",
"downloadUrlExpiresAt": "2026-09-17T14:06:15.000Z",
"deploymentId": "64e41663-5ac8-422e-a941-00aff79963ed",
"source": "api",
"errorMessage": "example_string",
"createdAt": "2026-09-17T13:04:12.000Z",
"completedAt": "2026-09-17T13:06:15.000Z"
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Not Found",
"message": "The requested resource was not found",
"code": 404
}
{
"error": "Too Many Requests",
"message": "Rate limit exceeded. Please try again later",
"code": 429,
"retryAfter": 3600
}
/exports/pdf
Target server for requests. Edit to use your own host.
API key generated from the Documentation.AI dashboard (Settings → API Keys). Pass as Authorization: Bearer dai_...
Authorization: Bearer dai_...Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. API key generated from the Documentation.AI dashboard (Settings → API Keys). Pass as Authorization: Bearer dai_...
Responses
Identifies this export. Reads go through GET /exports/pdf, which always returns the current one.
pending and processing are in progress; completed, failed and cancelled are final.
pendingprocessingcompletedfailedcancelledSize of the PDF in bytes. Null until the export completes.
Temporary link for downloading the PDF directly from storage, with no API key. Null while the export runs, after it fails, and once a newer export replaces the file.
When downloadUrl stops working. Read the export again for a fresh link.
The live deployment this export rendered
Where the export was started
dashboardapiWhy the export failed. Null unless status is failed.
Null until the export completes