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

# Export a batch (ideas-json)

> Structured export for a batch. Includes only completed, export-ready items; every skipped item is listed in omittedItems with a reason. A single exportedAt is pinned per export so the same batch state always serializes identically.




## OpenAPI

````yaml /api-reference/openapi.yaml get /api/agent/analysis-batches/{batchId}/export
openapi: 3.1.0
info:
  title: Preuve Agent API
  version: '2.0'
  description: >
    HMAC-signed API for programmatic startup idea validation. Every request
    carries x-preuve-key, x-preuve-timestamp, x-preuve-nonce, and
    x-preuve-signature headers (HMAC-SHA256 over a canonical string - see the
    Authentication guide). The interactive playground cannot compute signatures;
    use it for shapes only.
servers:
  - url: https://preuve.ai
security:
  - preuveKey: []
paths:
  /api/agent/analysis-batches/{batchId}/export:
    get:
      tags:
        - Batches
      summary: Export a batch (ideas-json)
      description: >
        Structured export for a batch. Includes only completed, export-ready
        items; every skipped item is listed in omittedItems with a reason. A
        single exportedAt is pinned per export so the same batch state always
        serializes identically.
      operationId: exportBatch
      parameters:
        - $ref: '#/components/parameters/BatchId'
        - name: format
          in: query
          required: false
          schema:
            type: string
            enum:
              - ideas-json
            default: ideas-json
      responses:
        '200':
          description: The batch export payload.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchExport'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    BatchId:
      name: batchId
      in: path
      required: true
      description: Batch id returned by create.
      schema:
        type: string
        format: uuid
  schemas:
    BatchExport:
      type: object
      properties:
        schemaVersion:
          type: integer
          const: 2
        exportType:
          type: string
          enum:
            - batch
        exportedAt:
          type: string
          format: date-time
        counts:
          type: object
          properties:
            exported:
              type: integer
            omitted:
              type: integer
        ideas:
          type: array
          items:
            type: object
        omittedItems:
          type: array
          description: Every incomplete item with the reason it was skipped.
          items:
            type: object
            properties:
              id:
                type: string
              clientRunId:
                type: string
              reportId:
                type: string
                nullable: true
              status:
                type: string
              reason:
                type: string
    ApiError:
      type: object
      required:
        - error
        - code
      properties:
        error:
          type: string
          description: Human-readable message.
        code:
          type: string
          description: Stable machine-readable code. Branch on this.
        details:
          description: Optional context (validation errors, limits, ...).
  responses:
    NotFound:
      description: >-
        Unknown id, or the resource belongs to another account
        (ANALYSIS_NOT_FOUND).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    preuveKey:
      type: apiKey
      in: header
      name: x-preuve-key
      description: >
        API key id. Requests are additionally signed with x-preuve-timestamp,
        x-preuve-nonce, and x-preuve-signature (HMAC-SHA256) - see the
        Authentication guide.

````