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

# Get Interview Analysis PDF

> Returns the Base64-encoded PDF report of the candidate analysis for a specific interview. The interview must have a completed analysis for the PDF to be available.

Returns the Base64-encoded PDF report of the candidate analysis for a specific interview.

## Overview

This endpoint provides the analysis PDF as a Base64-encoded string, separated from the main interview resource to keep the `GET /interviews/:id` response lightweight. Use this endpoint when you need the formatted PDF report for download, forwarding, or archival.

## Use Cases

* **Download PDF Report**: Retrieve the formatted analysis report for a candidate
* **Forward to Stakeholders**: Get the PDF to email or share with hiring managers
* **Archival**: Store the PDF report alongside your internal records

## Prerequisites

The interview must have a **completed analysis** for the PDF to be available. If the interview is still in progress or has no analysis, the endpoint returns a `404` error.

## Response

```json theme={null}
{
  "analysisPdfBase64": "JVBERi0xLjQKMSAwIG9iai..."
}
```

The `analysisPdfBase64` field contains the full PDF document encoded as a Base64 string. To reconstruct the PDF file, decode the Base64 string into binary data.

## Example Usage

```javascript theme={null}
async function downloadAnalysisPdf(interviewId) {
  const response = await fetch(
    `https://api.instaview.sk/interviews/${interviewId}/analysis-pdf`,
    { headers: { Authorization: `Bearer ${apiKey}` } },
  );

  const { data } = await response.json();

  // Decode Base64 to binary
  const binaryString = atob(data.analysisPdfBase64);
  const bytes = new Uint8Array(binaryString.length);
  for (let i = 0; i < binaryString.length; i++) {
    bytes[i] = binaryString.charCodeAt(i);
  }

  // Create downloadable file
  const blob = new Blob([bytes], { type: "application/pdf" });
  const url = URL.createObjectURL(blob);
  // Use `url` to trigger download or embed in an iframe
}
```

## Error Scenarios

* **404 Not Found**: Interview doesn't exist, has been deleted, or analysis is not yet available
* **403 Forbidden**: Interview belongs to a different company

<Info>
  The analysis PDF is also included in the `analysis.completed` [webhook
  payload](/guides/webhooks#analysis-events-payload) as the `analysisPdfBase64`
  field, so you may not need this endpoint if you are already consuming
  webhooks.
</Info>

## Related Resources

<CardGroup cols={2}>
  <Card title="Get Interview" icon="microphone" href="/api-reference/interviews/get-interview">
    Get full interview details including analysis data
  </Card>

  <Card title="Webhooks Guide" icon="webhook" href="/guides/webhooks">
    Receive analysis PDF automatically via webhooks
  </Card>
</CardGroup>


## OpenAPI

````yaml GET /interviews/{id}/analysis-pdf
openapi: 3.0.0
info:
  title: InstaView API
  description: |-
    InstaView API Documentation

    ## Authentication

    All endpoints require API key authentication using Bearer token:
    ```
    Authorization: Bearer sk_your_api_key_here
    ```

    ## API Key Management

    The API Key module provides comprehensive key management for:
    - **Direct Client Keys**: Company-scoped keys for your applications
    - **ATS Partner Keys**: Resource-scoped keys for ATS integrations

    ### Key Features
    - HMAC-SHA256 hashing for API key storage
    - Configurable rate limiting
    - Comprehensive audit logging
    - Company-level isolation
    - Resource scoping for ATS partners
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.instaview.sk
    description: Production API Gateway
security: []
tags: []
paths:
  /interviews/{id}/analysis-pdf:
    get:
      tags:
        - Interviews
      summary: Get interview analysis PDF
      description: >-
        Returns the Base64-encoded PDF report of the candidate analysis for a
        specific interview. The interview must have a completed analysis for the
        PDF to be available.
      operationId: PublicInterviewsController_getInterviewAnalysisPdf_v1
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
            format: uuid
        - name: companyId
          required: false
          in: query
          description: >-
            Required for ATS API keys to specify which company to access.
            Ignored for standard company API keys.
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicInterviewAnalysisPdfDto'
      security:
        - bearer: []
components:
  schemas:
    PublicInterviewAnalysisPdfDto:
      type: object
      properties:
        analysisPdfBase64:
          type: string
          description: Base64-encoded PDF report of the candidate analysis
          example: JVBERi0xLjQKMSAwIG9iai...
      required:
        - analysisPdfBase64
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: API key for authentication using Bearer scheme

````