> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hookpdf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Report

Check the status of a specific render job. Once completed, the response will contain a pre-signed `output_url` to download the generated PDF, along with credit usage details.

## Response Fields

<ResponseField name="id" type="string (uuid)">
  Unique identifier of the render job.
</ResponseField>

<ResponseField name="user_id" type="string (uuid)">
  The user who owns this render job.
</ResponseField>

<ResponseField name="template_id" type="string (uuid)">
  The template that was used for this render.
</ResponseField>

<ResponseField name="status" type="string" required>
  Current status of the job. Possible values: `queued`, `processing`, `completed`, `failed`.
</ResponseField>

<ResponseField name="output_url" type="string | null">
  Pre-signed S3 URL to download the generated PDF. Only available when status is `completed`. The URL expires after **24 hours**.
</ResponseField>

<ResponseField name="error_code" type="string | null">
  Machine-readable error code if the job failed. `null` on success.
</ResponseField>

<ResponseField name="error_message" type="string | null">
  Human-readable error description if the job failed. `null` on success.
</ResponseField>

<ResponseField name="created_at" type="string (datetime)">
  Timestamp when the job was created.
</ResponseField>

<ResponseField name="completed_at" type="string (datetime) | null">
  Timestamp when the job finished processing. `null` if still in progress.
</ResponseField>

<ResponseField name="retry_count" type="integer">
  Number of times this job has been retried.
</ResponseField>

<ResponseField name="is_preview" type="boolean">
  `true` if this is a preview render (watermarked, short TTL), `false` for production.
</ResponseField>

<ResponseField name="updated_at" type="string (datetime)">
  Timestamp of the last status update.
</ResponseField>

<ResponseField name="page_count" type="integer | null">
  Number of pages in the generated PDF. `null` until job completes.
</ResponseField>

<ResponseField name="total_bytes" type="integer | null">
  Total file size of the generated PDF in bytes. `null` until job completes.
</ResponseField>

<ResponseField name="base_credits" type="integer | null">
  Base credit cost calculated from page count (1 credit per page). `null` until job completes.
</ResponseField>

<ResponseField name="size_extra" type="integer">
  Extra credits charged for files exceeding the size threshold.
</ResponseField>

<ResponseField name="credits_used" type="integer | null">
  Total credits consumed for this render (`base_credits + size_extra`). `null` until job completes.
</ResponseField>

<ResponseField name="credits_remaining" type="integer | null">
  Your remaining credit balance after this render. `null` until job completes.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.hookpdf.com/reports/7cdb01f7-3530-4862-8523-93e5d38fc1b9" \
    -H "Authorization: Bearer <YOUR_API_KEY>"
  ```

  ```javascript Node.js theme={null}
  const jobId = '7cdb01f7-3530-4862-8523-93e5d38fc1b9';
  const response = await fetch(`https://api.hookpdf.com/reports/${jobId}`, {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer <YOUR_API_KEY>'
    }
  });

  const job = await response.json();
  if (job.status === 'completed') {
    console.log("Download URL:", job.output_url);
    console.log("Pages:", job.page_count);
    console.log("Credits used:", job.credits_used);
  } else {
    console.log("Current status:", job.status);
  }
  ```

  ```python Python theme={null}
  import requests

  job_id = "7cdb01f7-3530-4862-8523-93e5d38fc1b9"
  url = f"https://api.hookpdf.com/reports/{job_id}"
  headers = {"Authorization": "Bearer <YOUR_API_KEY>"}

  response = requests.get(url, headers=headers)
  job = response.json()

  if job.get("status") == "completed":
      print("Download URL:", job.get("output_url"))
      print("Pages:", job.get("page_count"))
      print("Credits used:", job.get("credits_used"))
  else:
      print("Current status:", job.get("status"))
  ```

  ```php PHP theme={null}
  $jobId = "7cdb01f7-3530-4862-8523-93e5d38fc1b9";
  $url = "https://api.hookpdf.com/reports/" . $jobId;

  $ch = curl_init($url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      "Authorization: Bearer <YOUR_API_KEY>"
  ]);

  $response = curl_exec($ch);
  curl_close($ch);

  $job = json_decode($response, true);
  if ($job["status"] === "completed") {
      echo "Download URL: " . $job["output_url"];
      echo "Pages: " . $job["page_count"];
      echo "Credits used: " . $job["credits_used"];
  } else {
      echo "Current status: " . $job["status"];
  }
  ```

  ```csharp C# theme={null}
  using var client = new HttpClient();
  client.DefaultRequestHeaders.Add("Authorization", "Bearer <YOUR_API_KEY>");

  var jobId = "7cdb01f7-3530-4862-8523-93e5d38fc1b9";
  var response = await client.GetAsync($"https://api.hookpdf.com/reports/{jobId}");
  var json = await response.Content.ReadAsStringAsync();

  var job = System.Text.Json.JsonDocument.Parse(json).RootElement;
  var status = job.GetProperty("status").GetString();

  if (status == "completed")
  {
      Console.WriteLine($"Download URL: {job.GetProperty("output_url")}");
      Console.WriteLine($"Pages: {job.GetProperty("page_count")}");
      Console.WriteLine($"Credits used: {job.GetProperty("credits_used")}");
  }
  else
  {
      Console.WriteLine($"Current status: {status}");
  }
  ```

  ```powershell PowerShell theme={null}
  $headers = @{
      "Authorization" = "Bearer <YOUR_API_KEY>"
  }

  $jobId = "7cdb01f7-3530-4862-8523-93e5d38fc1b9"
  $response = Invoke-RestMethod -Uri "https://api.hookpdf.com/reports/$jobId" `
      -Method GET -Headers $headers

  if ($response.status -eq "completed") {
      Write-Output "Download URL: $($response.output_url)"
      Write-Output "Pages: $($response.page_count)"
      Write-Output "Credits used: $($response.credits_used)"
  } else {
      Write-Output "Current status: $($response.status)"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 — Completed Job theme={null}
  {
    "id": "7cdb01f7-3530-4862-8523-93e5d38fc1b9",
    "user_id": "93ab7f4d-54b7-4bf6-85a8-2c3be96f506f",
    "template_id": "1c24f959-8e1a-4a14-acc4-cf57b4e60e99",
    "status": "completed",
    "output_url": "https://hookpdf-render-prod.s3.eu-central-1.amazonaws.com/reports/7cdb01f7.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&...",
    "error_code": null,
    "error_message": null,
    "created_at": "2026-02-28T15:09:17.006604+00:00",
    "completed_at": "2026-02-28T15:09:20.84+00:00",
    "retry_count": 0,
    "is_preview": false,
    "updated_at": "2026-02-28T15:09:20.941571+00:00",
    "page_count": 3,
    "total_bytes": 68699,
    "base_credits": 3,
    "size_extra": 0,
    "credits_used": 3,
    "credits_remaining": 15501
  }
  ```

  ```json 200 — Processing Job theme={null}
  {
    "id": "7cdb01f7-3530-4862-8523-93e5d38fc1b9",
    "user_id": "93ab7f4d-54b7-4bf6-85a8-2c3be96f506f",
    "template_id": "1c24f959-8e1a-4a14-acc4-cf57b4e60e99",
    "status": "processing",
    "output_url": null,
    "error_code": null,
    "error_message": null,
    "created_at": "2026-02-28T15:09:17.006604+00:00",
    "completed_at": null,
    "retry_count": 0,
    "is_preview": false,
    "updated_at": "2026-02-28T15:09:17.006604+00:00",
    "page_count": null,
    "total_bytes": null,
    "base_credits": null,
    "size_extra": 0,
    "credits_used": null,
    "credits_remaining": null
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /reports/{job_id}
openapi: 3.0.3
info:
  title: HOOKPDF API
  version: 1.0.0
  description: HOOKPDF render and control-plane API (MVP)
servers:
  - url: https://api.hookpdf.com
security: []
paths:
  /reports/{job_id}:
    get:
      tags:
        - reports
      summary: Get job status and signed URL
      parameters:
        - in: path
          name: job_id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Job details with download URL (when completed)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportJob'
              example:
                id: 7cdb01f7-3530-4862-8523-93e5d38fc1b9
                user_id: 93ab7f4d-54b7-4bf6-85a8-2c3be96f506f
                template_id: 1c24f959-8e1a-4a14-acc4-cf57b4e60e99
                status: completed
                output_url: >-
                  https://hookpdf-render-prod.s3.eu-central-1.amazonaws.com/reports/7cdb01f7.pdf?X-Amz-Algorithm=...
                error_code: null
                error_message: null
                created_at: '2026-02-28T15:09:17.006604+00:00'
                completed_at: '2026-02-28T15:09:20.84+00:00'
                retry_count: 0
                is_preview: false
                updated_at: '2026-02-28T15:09:20.941571+00:00'
                page_count: 3
                total_bytes: 68699
                base_credits: 3
                size_extra: 0
                credits_used: 3
                credits_remaining: 15501
        '404':
          description: Not found
      security:
        - apiKey: []
components:
  schemas:
    ReportJob:
      type: object
      description: Full details of a render job, including credit usage and download URL.
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the render job.
        user_id:
          type: string
          format: uuid
          description: The user who owns this render job.
        template_id:
          type: string
          format: uuid
          description: The template that was used for this render.
        status:
          type: string
          enum:
            - queued
            - processing
            - completed
            - failed
          description: Current status. `completed` means the PDF is ready to download.
        output_url:
          type: string
          nullable: true
          description: >-
            Pre-signed S3 URL to download the generated PDF. Only available when
            status is `completed`. The URL expires after 24 hours.
        error_code:
          type: string
          nullable: true
          description: Machine-readable error code if the job `failed`. `null` on success.
        error_message:
          type: string
          nullable: true
          description: >-
            Human-readable error description if the job `failed`. `null` on
            success.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the job was created.
        completed_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            Timestamp when the job finished processing. `null` if still in
            progress.
        retry_count:
          type: integer
          description: Number of times this job has been retried.
        is_preview:
          type: boolean
          description: '`true` if this is a preview render, `false` for production.'
        updated_at:
          type: string
          format: date-time
          description: Timestamp of the last status update.
        page_count:
          type: integer
          nullable: true
          description: Number of pages in the generated PDF. `null` until job completes.
        total_bytes:
          type: integer
          nullable: true
          description: >-
            Total file size of the generated PDF in bytes. `null` until job
            completes.
        base_credits:
          type: integer
          nullable: true
          description: >-
            Base credit cost calculated from page count (1 credit per page).
            `null` until job completes.
        size_extra:
          type: integer
          description: >-
            Extra credits charged for files exceeding the size threshold.
            Usually 0.
        credits_used:
          type: integer
          nullable: true
          description: >-
            Total credits consumed for this render (`base_credits +
            size_extra`). `null` until job completes.
        credits_remaining:
          type: integer
          nullable: true
          description: >-
            Your remaining credit balance after this render. `null` until job
            completes.
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: Enter your API key

````