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

# Get a generation

> Returns a single generation by ID.



## OpenAPI

````yaml GET /generations/{generationId}
openapi: 3.1.0
info:
  title: Platendoc API
  version: 1.0.0
  description: Generate PDFs from templates via the Platendoc REST API.
servers:
  - url: https://api.platendoc.com/v1
    description: Production
security: []
paths:
  /generations/{generationId}:
    get:
      summary: Get a generation
      description: Returns a single generation by ID.
      parameters:
        - schema:
            type: string
            example: gen_abc123
          required: true
          name: generationId
          in: path
      responses:
        '200':
          description: The generation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Generation'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: UNAUTHORIZED
                      message:
                        type: string
                        example: Invalid or missing API key.
                    required:
                      - code
                      - message
                required:
                  - error
        '404':
          description: Generation not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: UNAUTHORIZED
                      message:
                        type: string
                        example: Invalid or missing API key.
                    required:
                      - code
                      - message
                required:
                  - error
      security:
        - bearerAuth: []
components:
  schemas:
    Generation:
      type: object
      properties:
        id:
          type: string
          example: gen_abc123
        workspaceId:
          type: string
          example: ws_xyz
        templateId:
          type: string
          example: tpl_abc
        templateName:
          type: string
          example: Invoice
        format:
          type: string
          enum:
            - PDF
        status:
          type: string
          enum:
            - PENDING
            - PROCESSING
            - COMPLETED
            - FAILED
        data:
          type: object
          additionalProperties: {}
          example:
            customerName: Acme Corp
        outputUrl:
          type:
            - string
            - 'null'
          format: uri
          example: https://cdn.platendoc.com/gen_abc123.pdf
        error:
          type:
            - string
            - 'null'
        createdAt:
          type: string
          format: date-time
          example: '2026-05-07T10:00:00.000Z'
        updatedAt:
          type: string
          format: date-time
          example: '2026-05-07T10:00:05.000Z'
      required:
        - id
        - workspaceId
        - templateId
        - templateName
        - format
        - status
        - data
        - outputUrl
        - error
        - createdAt
        - updatedAt
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key with pdc_live_ prefix. Pass as: Authorization: Bearer
        pdc_live_xxx

````