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

# Get a document PDF embed

> Returns embeddable HTML for a document's PDF viewer. Requires a `document_slug` to identify the document.



## OpenAPI

````yaml GET /api/v1/embed/document-pdfs/
openapi: 3.0.3
info:
  title: Sacra API
  version: 1.0.0
  description: >-
    The Sacra API currently supports querying News, Documents, Companies and
    Categories that enable you to use Sacra research within your own
    application.


    ## **Getting started guide**


    To start using the APIs, you need to:


    - Only available to **Platforms** and **Funds** tier members. (See
    [here](https://sacra.com/pricing/))
        
    - You must use a valid API Key to send requests to the API endpoints. You
    can generate your API key in the Api Keys section of your [Organization
    Settings](https://sacra.com/orgs/settings/general/).
        
    - The API returns request responses in JSON format. When an API request
    returns an error, it is sent in the JSON response as an error key.
        

    ## Authentication


    The Sacra API uses Tokens for authentication.


    You can generate a Sacra API Key/Token in the Api Keys section of your
    [Organization Settings](https://sacra.com/orgs/settings/general/).


    You must include an API Key/Token in each request to the Sacra API with the
    **Authorization** request header.


    ### Authentication error response


    If a Token is missing, malformed, or invalid, you will receive an HTTP 401
    Unauthorized response code.


    ### **Need some help?**


    In case you have questions, we will eventually provide tutorials and a FAQ
    page. But for now you can check out the
    [#developers](https://discord.gg/mTswyV8gg3) channel in our community
    [Discord](https://discord.gg/mTswyV8gg3), there’s a good chance our
    community has an answer for you.


    ## Authorization


    | **Key** | **Value** |

    | --- | --- |

    | Authorization | Token {{API_KEY}} |
servers:
  - url: https://sacra.com
    description: Production
security: []
tags:
  - name: Companies
  - name: Categories
  - name: Events
  - name: News
  - name: Documents
  - name: Filings
  - name: Embeds
  - name: Metrics
  - name: Funding (Legacy)
paths:
  /api/v1/embed/document-pdfs/:
    get:
      tags:
        - Embeds
      summary: Get a document PDF embed
      description: >-
        Returns embeddable HTML for a document's PDF viewer. Requires a
        `document_slug` to identify the document.
      operationId: embed_document_pdfs_retrieve
      parameters:
        - in: query
          name: document_slug
          schema:
            type: string
          description: Slug of the document to embed.
          required: true
        - in: query
          name: height
          schema:
            type: integer
          description: 'Height of the embed iframe in pixels. Default: 500.'
        - in: query
          name: width
          schema:
            type: integer
          description: 'Width of the embed iframe in pixels. Default: 560.'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentPDFEmbedSuccessResponse'
              examples:
                DocumentPdfEmbed:
                  value:
                    status: success
                    data:
                      embed_html: >
                        <iframe frameborder="0" height="500"
                        src="https://sacra.com/embed/3056d651-fabe-43ef-81a9-d9c454975581/document/openai?height=500&amp;width=500"
                        title="Sacra Document PDF Embed" width="500">

                        </iframe>
          description: Embed HTML for the document PDF viewer.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentPDFEmbedBadRequestResponse'
              examples:
                ParseError:
                  value:
                    status: failed
                    message: Could not parse the request body.
          description: Could not parse request parameters.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentPDFEmbedNotFoundResponse'
              examples:
                DocumentNotFound:
                  value:
                    status: failed
                    message: Document not found
          description: Document not found for the given slug.
      security:
        - tokenAuth: []
components:
  schemas:
    DocumentPDFEmbedSuccessResponse:
      type: object
      properties:
        status:
          type: string
        data:
          $ref: '#/components/schemas/DocumentPDFEmbedData'
      required:
        - data
        - status
    DocumentPDFEmbedBadRequestResponse:
      type: object
      properties:
        status:
          type: string
        message:
          type: string
      required:
        - message
        - status
    DocumentPDFEmbedNotFoundResponse:
      type: object
      properties:
        status:
          type: string
        message:
          type: string
      required:
        - message
        - status
    DocumentPDFEmbedData:
      type: object
      properties:
        embed_html:
          type: string
      required:
        - embed_html
  securitySchemes:
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"

````