> ## 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 an analysis (ideas-json)

> Structured JSON export (schemaVersion 2) for one COMPLETED, export-ready analysis. Deep runs include full sections, pivots, citations, and generated module payloads.




## OpenAPI

````yaml /api-reference/openapi.yaml get /api/agent/analyses/{id}/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/analyses/{id}/export:
    get:
      tags:
        - Analyses
      summary: Export an analysis (ideas-json)
      description: >
        Structured JSON export (schemaVersion 2) for one COMPLETED, export-ready
        analysis. Deep runs include full sections, pivots, citations, and
        generated module payloads.
      operationId: exportAnalysis
      parameters:
        - $ref: '#/components/parameters/AnalysisId'
        - name: format
          in: query
          required: false
          schema:
            type: string
            enum:
              - ideas-json
            default: ideas-json
      responses:
        '200':
          description: The export payload.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalysisExport'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: >-
            Not exportable yet (ANALYSIS_NOT_COMPLETE or
            ENRICHMENT_NOT_COMPLETE).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: The analysis failed (ANALYSIS_FAILED).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  parameters:
    AnalysisId:
      name: id
      in: path
      required: true
      description: Run id (returned by create) or report id.
      schema:
        type: string
        format: uuid
  schemas:
    AnalysisExport:
      type: object
      description: >
        ideas-json export, schemaVersion 2. Deep-only fields are null on free
        runs. See the Scans and Enrichment guide for the field-by-field
        contract.
      properties:
        schemaVersion:
          type: integer
          const: 2
        exportType:
          type: string
          enum:
            - analysis
        exportedAt:
          type: string
          format: date-time
        analysis:
          $ref: '#/components/schemas/AnalysisRun'
        idea:
          type: object
          properties:
            rank:
              type: integer
            verdict:
              type: string
            score:
              type: number
            title:
              type: string
            risk:
              type: string
            quote:
              type: string
            evidence:
              type: string
            domains:
              type: array
              items:
                type: string
            reportId:
              type: string
            reportUrl:
              type: string
            shareUrl:
              type: string
              nullable: true
            details:
              type: object
              description: >-
                Summary contract on every tier;
                sections/pivots/communityDemand/founderFit/playbook/proofOfDemand
                on deep runs.
    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, ...).
    AnalysisRun:
      type: object
      properties:
        id:
          type: string
          format: uuid
        reportId:
          type: string
          format: uuid
        clientRunId:
          type: string
        scanType:
          type: string
          enum:
            - starter
            - deep
          description: Your request type. Reliable from creation, even while PROCESSING.
        reportType:
          type: string
          enum:
            - quick
            - deep_dive
        analysisTier:
          type: string
          enum:
            - basic
            - advanced
          description: >-
            Derived from the report. Deep runs read "basic" until deep sections
            land.
        status:
          type: string
          enum:
            - PENDING
            - PROCESSING
            - COMPLETED
            - FAILED
        readyForExport:
          type: boolean
        enrichment:
          $ref: '#/components/schemas/EnrichmentState'
        modules:
          type: object
          nullable: true
          description: Per-module statuses. Deep reports only; null on free runs.
          properties:
            proofOfDemand:
              $ref: '#/components/schemas/ModuleStatus'
            founderFit:
              $ref: '#/components/schemas/ModuleStatus'
            playbook:
              $ref: '#/components/schemas/ModuleStatus'
            trends:
              $ref: '#/components/schemas/ModuleStatus'
        reportUrl:
          type: string
          format: uri
        shareUrl:
          type: string
          format: uri
          nullable: true
    EnrichmentState:
      type: object
      properties:
        mode:
          type: string
          enum:
            - core
            - none
        status:
          type: string
          enum:
            - pending
            - processing
            - completed
            - failed
        required:
          type: array
          items:
            type: string
        completed:
          type: array
          items:
            type: string
    ModuleStatus:
      type: object
      properties:
        status:
          type: string
          enum:
            - not_generated
            - generating
            - failed
            - completed
  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.

````