{
  "info": {
    "_postman_id": "8b1f0c25-7f4d-4b7c-b29e-airpdf-render-v1",
    "name": "Airpdf Render API",
    "description": "Generate PDFs from JSON-tree templates. Visit https://airpdf.app/docs for guides.\n\nSet the `api_key` collection variable to your Airpdf key (`airpdf_live_…` or `airpdf_test_…`).",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [{ "key": "token", "value": "{{api_key}}", "type": "string" }]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://airpdf.app/api/v1",
      "type": "string"
    },
    { "key": "api_key", "value": "airpdf_test_replace_me", "type": "string" }
  ],
  "item": [
    {
      "name": "Render — sync (binary)",
      "request": {
        "method": "POST",
        "header": [{ "key": "Content-Type", "value": "application/json" }],
        "url": {
          "raw": "{{base_url}}/render",
          "host": ["{{base_url}}"],
          "path": ["render"]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"template\": \"invoice\",\n  \"data\": {\n    \"customer\": { \"name\": \"Acme Inc.\" },\n    \"items\": [{ \"label\": \"Pro plan\", \"amount\": 99 }]\n  },\n  \"response\": \"binary\"\n}"
        },
        "description": "Returns the PDF directly (`Content-Type: application/pdf`)."
      }
    },
    {
      "name": "Render — sync (presigned URL)",
      "request": {
        "method": "POST",
        "header": [{ "key": "Content-Type", "value": "application/json" }],
        "url": {
          "raw": "{{base_url}}/render",
          "host": ["{{base_url}}"],
          "path": ["render"]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"template\": \"invoice\",\n  \"data\": { \"customer\": { \"name\": \"Acme Inc.\" } },\n  \"response\": \"url\"\n}"
        }
      }
    },
    {
      "name": "Render — async (webhook)",
      "request": {
        "method": "POST",
        "header": [{ "key": "Content-Type", "value": "application/json" }],
        "url": {
          "raw": "{{base_url}}/render",
          "host": ["{{base_url}}"],
          "path": ["render"]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"template\": \"monthly-report\",\n  \"data\": { \"period\": \"2026-04\" },\n  \"async\": true,\n  \"webhook_url\": \"https://example.com/airpdf/webhooks\"\n}"
        },
        "description": "Returns 202 with `id` + `poll_url`. Final result delivered to your webhook (HMAC-SHA256 signed)."
      }
    },
    {
      "name": "Get render status",
      "request": {
        "method": "GET",
        "url": {
          "raw": "{{base_url}}/render/{{render_id}}",
          "host": ["{{base_url}}"],
          "path": ["render", "{{render_id}}"]
        },
        "description": "Poll for an async render."
      }
    },
    {
      "name": "List templates",
      "request": {
        "method": "GET",
        "url": {
          "raw": "{{base_url}}/templates",
          "host": ["{{base_url}}"],
          "path": ["templates"]
        }
      }
    },
    {
      "name": "Get template + variables schema",
      "request": {
        "method": "GET",
        "url": {
          "raw": "{{base_url}}/templates/invoice",
          "host": ["{{base_url}}"],
          "path": ["templates", "invoice"]
        }
      }
    }
  ]
}
