> ## 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.

# Enrich an analysis

> Idempotently generates the missing core export sections for a COMPLETED run. Optionally starts deep-only modules via body.modules (one successful generation per module per report). founderFit requires founderProfile and runs inline; the other modules run async - poll get. Partial failures return HTTP 207 with a success-shaped body.




## OpenAPI

````yaml /api-reference/openapi.yaml post /api/agent/analyses/{id}/enrich
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}/enrich:
    post:
      tags:
        - Analyses
      summary: Enrich an analysis
      description: >
        Idempotently generates the missing core export sections for a COMPLETED
        run. Optionally starts deep-only modules via body.modules (one
        successful generation per module per report). founderFit requires
        founderProfile and runs inline; the other modules run async - poll get.
        Partial failures return HTTP 207 with a success-shaped body.
      operationId: enrichAnalysis
      parameters:
        - $ref: '#/components/parameters/AnalysisId'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnrichRequest'
      responses:
        '200':
          description: Enrichment (and any inline module) completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnrichResponse'
        '207':
          description: >-
            Partial success - some sections or modules failed; inspect failures
            and modules.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnrichResponse'
        '400':
          description: >-
            Invalid modules or founderProfile (INVALID_MODULES,
            INVALID_FOUNDER_PROFILE).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: Modules requested on a non-deep report (MODULES_REQUIRE_DEEP).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: Analysis not complete yet (ANALYSIS_NOT_COMPLETE).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    AnalysisId:
      name: id
      in: path
      required: true
      description: Run id (returned by create) or report id.
      schema:
        type: string
        format: uuid
  schemas:
    EnrichRequest:
      type: object
      properties:
        modules:
          type: array
          description: Deep-only modules to generate. Omit for core enrichment only.
          items:
            type: string
            enum:
              - proofOfDemand
              - founderFit
              - playbook
              - trends
        founderProfile:
          $ref: '#/components/schemas/FounderProfile'
      example:
        modules:
          - founderFit
          - playbook
        founderProfile:
          hoursPerWeek: 20
          runwayMonths: 6
          domainYears: 3
          shippedBefore: side_project
          audienceSize: under_1k
          teamStatus: solo
    EnrichResponse:
      type: object
      properties:
        analysis:
          $ref: '#/components/schemas/AnalysisRun'
        enrichment:
          $ref: '#/components/schemas/EnrichmentState'
        failures:
          type: array
          description: Core sections that failed this pass. Retry by calling enrich again.
          items:
            type: object
        modules:
          type: object
          nullable: true
          description: Per-module results for the modules requested in this call.
          additionalProperties:
            $ref: '#/components/schemas/ModuleResult'
    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, ...).
    FounderProfile:
      type: object
      required:
        - hoursPerWeek
        - runwayMonths
        - domainYears
        - shippedBefore
        - audienceSize
        - teamStatus
      properties:
        hoursPerWeek:
          type: number
          minimum: 1
          maximum: 168
        runwayMonths:
          type: number
          minimum: 0
          maximum: 120
        domainYears:
          type: number
          minimum: 0
          maximum: 60
        shippedBefore:
          type: string
          enum:
            - never
            - side_project
            - launched
        audienceSize:
          type: string
          enum:
            - none
            - under_1k
            - 1k_10k
            - over_10k
        teamStatus:
          type: string
          enum:
            - solo
            - cofounded_friends
            - cofounded_colleagues
            - team_with_hires
        twelveMonthGoal:
          type: string
          enum:
            - replace_income
            - side_income
            - vc_scale
        sabotagePattern:
          type: string
          maxLength: 280
    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
    ModuleResult:
      type: object
      properties:
        ok:
          type: boolean
        status:
          type: integer
          description: >-
            Per-module HTTP-style status (200 inline success, 202 accepted, 409
            cap, ...).
        code:
          type: string
          nullable: true
        state:
          type: string
          enum:
            - not_generated
            - generating
            - failed
            - completed
        alreadyStarted:
          type: boolean
          description: True when a generation started elsewhere was already in flight.
    ModuleStatus:
      type: object
      properties:
        status:
          type: string
          enum:
            - not_generated
            - generating
            - failed
            - completed
  responses:
    RateLimited:
      description: Rate limited (RATE_LIMITED or DAILY_LIMIT_REACHED).
      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.

````