List PDFs

Fetches a paginated list of active, non-expired PDFs for your project. The maximum number of items returned per page is 100.

cURL

curl "https://api.forkpdf.com/v1/pdfs?limit=100&page=1&sort=desc" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-project-id: YOUR_PROJECT_ID"

Example Response

{
  "success": true,
  "data": [
    {
      "id": "xxxxxxxx-26d6-77bf-8d14-7937124f62ea",
      "generationType": "payload",
      "templateId": null,
      "status": "completed",
      "createdAt": "2026-10-27T12:22:17.558Z",
      "updatedAt": "2026-10-27T12:22:25.706Z",
      "expiresAt": "2026-10-28T12:22:17.558Z",
      "testResults": {}
    }
  ],
  "meta": {
    "totalItems": 1,
    "currentPage": 1,
    "itemsPerPage": 100,
    "totalPages": 1
  }
}

SDK

const pdfs = await client.list({ limit: 100, page: 1, sort: 'desc' });
console.log(pdfs);
/*
{
  success: true,
  data: [
    {
      id: 'xxxxxxxx-26d6-77bf-8d14-7937124f62ea',
      generationType: 'payload',
      templateId: null,
      status: 'completed',
      createdAt: '20xx-xx-03T12:22:17.558Z',
      updatedAt: '20xx-xx-03T12:22:25.706Z',
      expiresAt: '20xx-xx-04T12:22:17.558Z',
      testResults: {}
    },
    // ... up to 100 items maximum
  ],
  meta: { totalItems: 16, currentPage: 1, itemsPerPage: 100, totalPages: 1 }
}
*/