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

# Generate a document



## OpenAPI

````yaml POST /generate
openapi: 3.0.1
info:
  title: API Example
  version: 1.0.0
servers:
  - url: https://generate.transactional.dev
security: []
paths:
  /generate:
    post:
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                templateId:
                  type: string
                  example: 656788bce14ab2ba4b81a267
                variables:
                  type: object
                  additionalProperties:
                    type: string
                  example:
                    userInput: Custom data
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  requestId:
                    type: string
                  path:
                    type: string
                    format: uri
              example:
                requestId: 66297c195baebf9e737a4419
                path: >-
                  https://d2t3dpwh2k1aak.cloudfront.net/documents/66294dc26ae199b93bd30ba9/1713994777143-c1acc0d6c424734342b5.pdf
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                invalidApiKey:
                  value:
                    error: invalid_api_key
                templateNotFound:
                  value:
                    error: template_not_found

````