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

# Upload a document

> 2p per page (minimum 10p, maximum 500 pages), debited before ingestion. Ingestion runs in the background — poll GET /documents/{id} until the status is ready. A failed ingestion is refunded automatically.



## OpenAPI

````yaml api/openapi.json POST /documents
openapi: 3.1.0
info:
  title: Amoreg Regulatory Knowledge API
  version: 1.0.0
  description: >-
    Hybrid semantic + keyword search over Amoreg's regulatory knowledge base,
    scoped to the jurisdictions enabled for your organisation. Prepaid credits
    in GBP: 2p per search, 2p per screening keyword.
servers:
  - url: https://app.amoreg.com/api/v1
security:
  - apiKey: []
paths:
  /documents:
    post:
      summary: Upload a policy PDF into the knowledge base
      description: >-
        2p per page (minimum 10p, maximum 500 pages), debited before ingestion.
        Ingestion runs in the background — poll GET /documents/{id} until the
        status is ready. A failed ingestion is refunded automatically.
      operationId: uploadDocument
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: The PDF file.
                jurisdictionSlugs:
                  type: string
                  description: Optional JSON array of jurisdiction slugs, e.g. ["fca"].
              required:
                - file
      responses:
        '202':
          description: Accepted — ingestion started
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  status:
                    type: string
                  filename:
                    type: string
                  pages:
                    type: integer
                  creditsChargedPence:
                    type: integer
                  availablePence:
                    type: integer
        '400':
          description: Not a valid PDF / too many pages / bad jurisdictions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Insufficient credit
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        details:
          type: string
      required:
        - error
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        Organisation API key created in the dashboard (format: amrg_live_…).
        Sent as `Authorization: Bearer amrg_live_…`.

````