Get PDF
Fetch metadata and a secure download URL for a specific PDF by its ID.
cURL
curl "https://api.forkpdf.com/v1/pdfs/xxxxxxxx-2a51-7551-af33-b0af9cefe1e7" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-project-id: YOUR_PROJECT_ID"
Example Response
{
"success": true,
"data": {
"id": "xxxxxxxx-2a51-7551-af33-b0af9cefe1e7",
"generationType": "payload",
"templateId": null,
"status": "completed",
"createdAt": "2026-10-27T11:32:03.793Z",
"updatedAt": "2026-10-27T11:32:14.623Z",
"expiresAt": "2026-10-28T11:32:03.793Z",
"testResults": {}
}
}
SDK
const pdfData = await client.get('xxxxxxxx-2a51-7551-af33-b0af9cefe1e7');
console.log(pdfData);
/*
{
success: true,
data: {
id: 'xxxxxxxx-2a51-7551-af33-b0af9cefe1e7',
generationType: 'payload',
templateId: null,
status: 'completed',
createdAt: '20xx-xx-03T11:32:03.793Z',
updatedAt: '20xx-xx-03T11:32:14.623Z',
expiresAt: '20xx-xx-04T11:32:03.793Z',
testResults: {}
}
}
*/