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

# List AI-generated opportunities for a project

> Returns the AI-generated opportunities Audity identified during audit analysis. Each opportunity includes impact/effort scores (1-10), ROI potential, implementation timeline, and execution metadata. Filter by `?category=` (`quick_wins`, `big_swings`, `nice_to_haves`, `deprioritize`).

Response is wrapped in `{ opportunities: [...] }`.



## OpenAPI

````yaml /api-reference/openapi.json get /api/projects/{id}/opportunities
openapi: 3.1.0
info:
  title: Audity Agent API
  version: 1.0.0
  summary: >-
    The agent-facing surface of Audity AI: projects, leads, Nucleus, and
    account.
  description: >-
    Audity is a B2B SaaS for consultants who run automated business audits. This
    API is the agent-facing slice: a deliberately small set of task-shaped
    endpoints that lets external AI agents (Claude, ChatGPT, Cursor, n8n) act on
    a consultant's Audity workspace on their behalf.


    **Authentication:** Bearer token (`aky_...`) issued from
    `https://app.auditynow.com/dashboard/settings/api-tokens`. The middleware
    resolves the token to a Clerk user identity; tier and Row-Level Security
    gates apply automatically.


    **Rate limits:** reads 100/min, writes 20/min, async job polling 120/min;
    some expensive or high-volume endpoints have stricter caps. 429 responses
    include `Retry-After`.


    **Tier gating:** public plan names can change faster than API enum names.
    Use `GET /api/user/tier` and any `requiredTier` field in 403 responses as
    the source of truth for a specific account. Read-only or
    lead-generation-focused plans can read available data; audit-capable paid
    plans unlock writes, subject to token scope and credits.
  contact:
    name: Audity Support
    email: support@auditynow.com
    url: https://app.auditynow.com
  license:
    name: Proprietary
    identifier: LicenseRef-Audity-Proprietary
  termsOfService: https://auditynow.com/terms
servers:
  - url: https://app.auditynow.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Projects
    description: >-
      Audit project lifecycle, create, list, fetch, trigger analysis, get
      deliverables.
  - name: Leads
    description: ReadyLink-sourced leads, list, fetch, convert into projects.
  - name: Nucleus
    description: >-
      Nucleus is Audity's persistent memory + insight layer. Search memories,
      capture notes, read proactive insights, manage contacts.
  - name: Account
    description: Identity, tier, credits, usually called once per session for context.
  - name: ReadyLinks
    description: >-
      Manage ReadyLinks, the survey distribution links that generate leads. CRUD
      operations for links, customization, lead tracking.
  - name: Assessment Configs
    description: >-
      Manage assessment configurations that define survey questions, order,
      scoring, and customization.
  - name: Jobs
    description: >-
      Monitor async job status for long-running operations like audit analysis
      synthesis.
paths:
  /api/projects/{id}/opportunities:
    parameters:
      - $ref: '#/components/parameters/ProjectId'
    get:
      tags:
        - Projects
      summary: List AI-generated opportunities for a project
      description: >-
        Returns the AI-generated opportunities Audity identified during audit
        analysis. Each opportunity includes impact/effort scores (1-10), ROI
        potential, implementation timeline, and execution metadata. Filter by
        `?category=` (`quick_wins`, `big_swings`, `nice_to_haves`,
        `deprioritize`).


        Response is wrapped in `{ opportunities: [...] }`.
      operationId: listOpportunities
      parameters:
        - name: category
          in: query
          required: false
          description: Filter by opportunity category.
          schema:
            type: string
            enum:
              - quick_wins
              - big_swings
              - nice_to_haves
              - deprioritize
      responses:
        '200':
          description: Opportunities
          content:
            application/json:
              schema:
                type: object
                properties:
                  opportunities:
                    type: array
                    items:
                      $ref: '#/components/schemas/CanonicalOpportunity'
                required:
                  - opportunities
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    ProjectId:
      name: id
      in: path
      required: true
      description: The project's UUID.
      schema:
        type: string
        format: uuid
  schemas:
    CanonicalOpportunity:
      type: object
      description: >-
        An AI-generated opportunity from a completed audit analysis. Mirrors the
        ai_opportunities table.
      properties:
        id:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
        title:
          type: string
        description:
          type: string
        category:
          type: string
          enum:
            - quick_wins
            - big_swings
            - nice_to_haves
            - deprioritize
        impactScore:
          type: number
          minimum: 0
          maximum: 10
          description: 1-10 impact rating from the AI synthesis.
        effortScore:
          type: number
          minimum: 0
          maximum: 10
          description: 1-10 effort rating from the AI synthesis.
        roiPotential:
          type:
            - string
            - 'null'
          description: Free-text ROI estimate (e.g., '$200K annually').
        implementationTimeline:
          type:
            - string
            - 'null'
          description: Free-text timeline estimate (e.g., '3 months').
        parallelExecution:
          type:
            - boolean
            - 'null'
        resourceRequirements:
          type:
            - string
            - 'null'
        implementationStrategy:
          type:
            - string
            - 'null'
        dependencies:
          type:
            - array
            - 'null'
          items:
            type: string
        riskMitigation:
          type:
            - string
            - 'null'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - projectId
        - title
        - category
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
        details:
          type: string
          description: Additional context (development only).
      required:
        - error
  responses:
    Unauthorized:
      description: Missing or invalid token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
    NotFound:
      description: Resource not found, or you don't have access (RLS).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Audity Personal Access Token (aky_...)
      description: >-
        A Personal Access Token issued from
        https://app.auditynow.com/dashboard/settings/api-tokens. Format:
        `aky_<32 random chars>`.

````