> ## 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 client report

> Structured JSON for one COMPLETED client report. Starter and refunded reports keep their normal content restrictions, named under locked.




## OpenAPI

````yaml /api-reference/openapi.yaml get /api/agent/agency/reports/{id}/export
openapi: 3.1.0
info:
  title: Preuve Agent API
  version: '2.0'
  description: >
    API for programmatic startup idea validation. Every request carries a single
    x-preuve-key header holding the whole API key - no signing, no bearer token.
    See the Authentication guide.
servers:
  - url: https://preuve.ai
security:
  - preuveKey: []
paths:
  /api/agent/agency/reports/{id}/export:
    get:
      tags:
        - Agency
      summary: Export a client report
      description: >
        Structured JSON for one COMPLETED client report. Starter and refunded
        reports keep their normal content restrictions, named under locked.
      operationId: exportAgencyReport
      parameters:
        - $ref: '#/components/parameters/AgencyReportId'
        - name: verbosity
          in: query
          required: false
          description: >
            "full" is the whole payload. "summary" drops section prose and the
            Google Trends data points and keeps every scored field; what it left
            out is listed under the report's details.omitted.
          schema:
            type: string
            enum:
              - full
              - summary
            default: full
      responses:
        '200':
          description: The export payload.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgencyReportExport'
        '400':
          description: verbosity must be full or summary (INVALID_VERBOSITY).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          $ref: '#/components/responses/AgencyInsufficientScope'
        '404':
          description: >
            Unknown report, or it belongs to another workspace (REPORT_NOT_FOUND
            / AGENCY_NOT_FOUND).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: Report is not complete yet (REPORT_NOT_READY).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    AgencyReportId:
      name: id
      in: path
      required: true
      description: Client report id, scoped to the caller's Agency workspace.
      schema:
        type: string
        format: uuid
  schemas:
    AgencyReportExport:
      type: object
      properties:
        schemaVersion:
          type: integer
        exportType:
          type: string
          enum:
            - agency-report
        dataAsOf:
          type: string
          format: date-time
        exportedAt:
          type: string
          format: date-time
        report:
          type: object
          description: >
            The report payload, same item shape as the ideas-json export. On
            verbosity=summary its details.omitted names what was dropped.
        ownerExclusions:
          type: array
          description: Competitor cards the workspace hid from the client view.
          items:
            type: object
            properties:
              name:
                type: string
              reasonCode:
                type: string
                nullable: true
              hiddenAt:
                type: string
                format: date-time
                nullable: true
        locked:
          $ref: '#/components/schemas/ExportLocks'
    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, ...).
    ExportLocks:
      type: object
      description: >
        Which fields this export left null, and why. Present only when the
        caller's tier withheld something, and absent entirely when the payload
        is complete. Read it before concluding a field is absent: a null under
        one of these paths is locked, not missing and not a failed analysis. It
        ships to every tier, paid included, and carries no price and no URL. On
        a batch export there is ONE object for the whole batch, the union of
        every exported item's withheld fields, deduplicated by path.
      properties:
        reason:
          type: string
          description: Why the fields were withheld. "starter_scan" today.
        unlockedBy:
          type: string
          description: What lifts the lock. "founder_report" today.
        fields:
          type: array
          description: One entry per withheld field.
          items:
            type: object
            properties:
              path:
                type: string
                description: >
                  Dotted path into the export, e.g. "details.pivots". A path may
                  name several keys of one object with a pipe, e.g.
                  "details.risks[].explanation|mitigation".
              label:
                type: string
                description: >
                  What that path holds, in plain language. Some labels also say
                  the field needs an enrich call once the report is deep.
        note:
          type: string
          description: >
            One sentence restating that the nulls are a tier boundary rather
            than missing data.
  responses:
    AgencyInsufficientScope:
      description: >
        The key is valid but does not carry the one Agency scope the route it
        called requires (INSUFFICIENT_SCOPE). The two are enforced per route and
        neither implies the other: POST /api/agent/agency/analyses requires
        agency:write, and every other Agency route - the workspace context, the
        report list, the report poll and the export - requires agency:read, so
        there is no separate export scope on this surface and a key carrying
        only the other Agency scope is refused here too. Note that every key
        created before 2026-09-09 hits this: these routes previously accepted
        the personal analysis:read / export:read scopes, and scopes are fixed at
        creation rather than backfilled, so an older key needs a new grant.
        Neither route to one is unconditional. Reconnecting the client works on
        any plan, free included, but /authorize only ever intersects the scopes
        the client requests, so a client replaying the scope list it cached at
        registration mints another Agency-less key and revokes the working one
        on the way - check the consent screen lists the Agency permissions
        before approving. Creating a key by hand cannot silently fail, but it
        needs "Include Agency workspace access" ticked AND an account that may
        create keys by hand: a paid personal plan, or membership of a Consultant
        or Agency workspace with an active subscription.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    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: >
        Your API key (prv_...), sent as-is. It is the only credential the API
        needs - see the Authentication guide.

````