Documentation

API URL


POST /api/v1/pdf-generation/from-url

Headers
Code
Content-Type: application/json
Body Parameters


Example Request

Code
POST https://datpaq.com/api/v1/pdf-generation/from-url?api_key=your-api-key

Successful Response

Status
HTML
200 OK
Body
Code
{
  "success": true,
  "pdfBase64": "JVBERi0xLjQK...",
  "metadata": {
    "source": "url",
    "url": "https://example.com",
    "format": "A4",
    "byteLength": 12345,
    "timingMs": 4200,
    "landscape": true,
    "pageRanges": "1",
    "displayHeaderFooter": true
  },
  "correlationId": "req_abc123"
}

Error Response

Example
Code
400 ValidationError - Invalid request body malformed options blocked destination or blocked redirect: Request rejected before successful render
401 AuthenticationError - Gateway rejects missing or invalid API key: Authentication failure before business handler
404 NotFound - Unknown endpoint path: No matching route for requested path
429 RateLimitError - Rate limiter threshold exceeded: Too many requests in active window
503 PoolSaturated - Browser pool at concurrency capacity: Service busy and unable to open new page
504 TimeoutError - Chromium navigation or rendering timed out: Rendering exceeded timeout threshold
500 GenerationError - Unexpected failure during rendering pipeline: Unhandled PDF generation failure

Last Updated:  May 4, 2026