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

# Get one action plan

> Returns the full plan, including the frozen evidence snapshot, generation trace and delivery state.



## OpenAPI

````yaml /openapi-v1.json get /v1/action-plans/{id}
openapi: 3.0.3
info:
  title: Woku Client API v1
  description: >-
    Public Woku Client API. Switch the version selector at the top to view the
    v0 reference.


    This spec covers:

    - **Wokus** — create wokus, fetch review data, submit text/voice reviews,
    share by email.

    - **Companies** — `GET /companies/me` returns the caller company.

    - **Reports** — company-wide and per-tool NPS reports.

    - **External Trackers** — tag your Wokus with identifiers from third-party
    systems (CRM transaction id, ERP order id, etc.) and look them up later.

    - **Ticket Destinations** — configure the SAC platforms (Zendesk,
    Salesforce, Slack), custom HTTP service or email addresses that receive
    AI-triaged support tickets, and the tracker conditions that route a ticket
    to one.

    - **Action Plan Groups** — define which VoC feedback (tracker conditions)
    drafts an improvement plan and who is responsible.

    - **Action Plans** — read AI-drafted plans and drive their lifecycle
    (approve, send to an external tool or work them in woku's managed kanban).


    ## Authentication


    All endpoints require a Bearer token in the `Authorization` header. Obtain
    your company API key from the Woku dashboard.


    ```

    Authorization: Bearer your_api_key_here

    ```


    ## Base URL


    Production: `https://clientapi.woku.app`


    ## Model (External Trackers)


    - **Tracker definition** (`ExternalTracker`): a per-company catalog entry
    like `{ name: 'trr', system: 'crm interno', description: '...' }`. Defined
    by an admin in the Woku dashboard.

    - **Tracker value** (`WokuExternalTrackerValue`): a string value bound to a
    (Woku, Tracker) pair. Multiple Wokus may share the same value.


    ## Model (routing / group conditions)


    `TicketRoutingCondition` (Ticket Destinations) and
    `ActionPlanGroupCondition` (Action Plan Groups) share the same shape: a
    boolean expression of rows over `ExternalTracker` values, AND binding
    tighter than OR. Each row matches when the feedback carries `trackerId` with
    a value that, for operator `equals`, equals `value`, or, for operator `any`,
    is any value at all (the whole tracker; `value` is then omitted).
    `relationToPrevious` joins a row to the previous one (`AND` same group, `OR`
    starts a new group); the first row omits it.
  version: 1.0.0
  contact:
    name: Woku Support
    url: https://woku.app
    email: team@woku.app
servers:
  - url: https://clientapi.woku.app
    description: Production server
security: []
tags:
  - name: Wokus
    description: >-
      Create wokus, fetch review data, submit text and voice reviews, share
      review links by email.
  - name: Companies
    description: Caller-company endpoint.
  - name: Reports
    description: NPS reports for the caller company and individual NPS tools.
  - name: NPS
    description: >-
      Capture NPS scores (company-level or per NPS tool) and fetch NPS tool
      definitions.
  - name: CSAT
    description: >-
      Capture CSAT (1-5 satisfaction) scores company-level or per CSAT tool,
      fetch tool definitions and responses, and submit text and voice feedback.
  - name: CES
    description: >-
      Capture CES (effort) scores company-level or per CES tool, fetch tool
      definitions and responses, and submit text and voice feedback.
  - name: External Trackers
    description: >-
      Tag Wokus with identifiers from external systems and look them up by name
      + value.
  - name: Quarantines
    description: >-
      Check whether a respondent is currently quarantined before prompting for
      feedback.
  - name: Invitations
    description: >-
      Survey distribution: send NPS surveys, forms and woku review invitations
      by email or WhatsApp.
  - name: Forms
    description: Fetch form definitions and submit responses from your own UI.
  - name: Flows
    description: Render flow journeys (ordered wokus with an optional NPS) in your own app.
  - name: Captures
    description: Mobile SDK capture ingestion
  - name: Ticket Destinations
    description: >-
      Configure where AI-triaged support tickets are delivered (Zendesk,
      Salesforce, Slack, a custom HTTP service, or plain email) and the
      tracker-based routing that picks a destination.
  - name: Action Plan Groups
    description: >-
      Define which VoC feedback (tracker conditions) drafts an action plan and
      who the responsibles are.
  - name: Action Plans
    description: >-
      Read AI-drafted improvement plans and drive their lifecycle: approve, send
      to Jira/monday.com/ClickUp/Notion or work them inside woku's managed
      kanban.
paths:
  /v1/action-plans/{id}:
    get:
      tags:
        - Action Plans
      summary: Get one action plan
      description: >-
        Returns the full plan, including the frozen evidence snapshot,
        generation trace and delivery state.
      operationId: getActionPlan
      parameters:
        - $ref: '#/components/parameters/ActionPlanIdPath'
      responses:
        '200':
          description: Plan
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionPlan'
        '403':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: Plan not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
        - BearerAuth: []
components:
  parameters:
    ActionPlanIdPath:
      name: id
      in: path
      required: true
      description: MongoDB ObjectId of the action plan.
      schema:
        type: string
        pattern: ^[0-9a-fA-F]{24}$
      example: 507f1f77bcf86cd799439041
  schemas:
    ActionPlan:
      type: object
      properties:
        _id:
          type: string
          example: 507f1f77bcf86cd799439041
        companyId:
          type: string
        groupId:
          type: string
        title:
          type: string
          maxLength: 200
        summary:
          type: string
          description: What the customers said (narrative synthesis, no invented numbers).
        objective:
          type: string
        expectedImpact:
          type: string
        theme:
          type: string
          description: Detected theme the plan addresses (e.g. "Demoras en despacho").
        tasks:
          type: array
          items:
            $ref: '#/components/schemas/ActionPlanTask'
        patterns:
          type: array
          items:
            $ref: '#/components/schemas/ActionPlanPattern'
        sources:
          type: array
          items:
            type: string
            enum:
              - woku
              - nps
              - csat
              - ces
          description: VoC sources with evidence in the frozen scope.
        status:
          type: string
          enum:
            - draft
            - approved
            - sent
            - canceled
            - delivery_error
            - in_progress
            - completed
          description: >-
            `in_progress`/`completed` are the managed (in-house) lifecycle; the
            rest apply to plans sent to an external tool or awaiting approval.
        priority:
          type: string
          enum:
            - high
            - medium
            - low
          description: Deterministic (engine-computed) priority; never set by the LLM.
        evidence:
          $ref: '#/components/schemas/ActionPlanEvidence'
        generation:
          $ref: '#/components/schemas/ActionPlanGeneration'
        delivery:
          $ref: '#/components/schemas/ActionPlanDelivery'
        approvedBy:
          type: string
        approvedAt:
          type: string
          format: date-time
        canceledBy:
          type: string
        canceledAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
          description: Stamped when a managed plan is closed (status `completed`).
        aiGenerated:
          type: boolean
          default: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    ForbiddenError:
      type: object
      properties:
        statusCode:
          type: integer
          example: 403
        message:
          type: string
          example: Authentication required
        error:
          type: string
          example: Forbidden
    NotFoundError:
      type: object
      properties:
        statusCode:
          type: integer
          example: 404
        message:
          type: string
          example: External tracker not found
        error:
          type: string
          example: Not Found
    ActionPlanTask:
      type: object
      description: >-
        One task of the plan. In a managed plan (status `in_progress`) it also
        carries a kanban `status` and an optional `assigneeId`.
      properties:
        _id:
          type: string
          example: 507f1f77bcf86cd799439051
        text:
          type: string
          maxLength: 160
        order:
          type: integer
        status:
          type: string
          enum:
            - todo
            - in_progress
            - done
          default: todo
        assigneeId:
          type: string
          description: Group member responsible for the task (managed plans).
        completedAt:
          type: string
          format: date-time
          description: Stamped when the task moves to `done`, cleared when it moves back.
    ActionPlanPattern:
      type: object
      properties:
        key:
          type: string
          description: Stable cluster key from the review-intelligence engine.
        label:
          type: string
        mentions:
          type: integer
          description: Real mention count over the whole commented population.
    ActionPlanEvidence:
      type: object
      description: >-
        Frozen evidence snapshot: the exact analytical scope at generation time
        plus deterministic counts. Never recomputed after generation.
      properties:
        windowFrom:
          type: string
          format: date-time
        windowTo:
          type: string
          format: date-time
          description: Exclusive upper bound of the window.
        conditionsSnapshot:
          type: array
          items:
            $ref: '#/components/schemas/ActionPlanGroupCondition'
          description: Copy of the group's tracker conditions at generation time.
        negatives:
          type: integer
          description: Commented improvement items in scope.
        positives:
          type: integer
          description: Commented recognition items in scope.
        total:
          type: integer
          description: Commented items in scope (score-only items never count as evidence).
        quotes:
          type: array
          items:
            $ref: '#/components/schemas/ActionPlanQuote'
    ActionPlanGeneration:
      type: object
      description: Traceability of the LLM run that drafted the plan.
      properties:
        model:
          type: string
        promptVersion:
          type: string
        generatedAt:
          type: string
          format: date-time
    ActionPlanDelivery:
      type: object
      description: >-
        Delivery-to-integration state, filled by the send phase. `provider` is
        `internal` for a managed plan.
      properties:
        provider:
          type: string
          enum:
            - jira
            - monday
            - clickup
            - notion
            - internal
        resourceLabel:
          type: string
          description: Human label of the destination resource (project/board/list/page).
        externalUrl:
          type: string
        externalId:
          type: string
        tasksCreated:
          type: integer
        lastError:
          type: string
          description: Connector failure reason of the last attempt.
        sentAt:
          type: string
          format: date-time
        sentBy:
          type: string
    ActionPlanGroupCondition:
      type: object
      description: >-
        One condition row: feedback must carry `trackerId` with a value that
        matches per `operator`. Rows form a boolean expression (AND binds
        tighter than OR) via `relationToPrevious`; the group counts a feedback
        item when ANY OR-group of its rows fully matches.
      required:
        - trackerId
      properties:
        relationToPrevious:
          type: string
          enum:
            - AND
            - OR
          description: Joins this row to the previous one. Omitted on the first row.
        trackerId:
          type: string
          description: ExternalTracker id (the company's tracker catalog).
          example: 507f1f77bcf86cd799439011
        operator:
          type: string
          enum:
            - equals
            - any
          default: equals
          description: >-
            `equals` matches the tracker value against `value`. `any` matches
            any value of the tracker (the whole tracker; `value` is omitted).
        value:
          type: string
          maxLength: 200
          description: The value the tracker must equal. Required unless operator is "any".
    ActionPlanQuote:
      type: object
      description: A verbatim customer quote frozen into the evidence snapshot.
      properties:
        text:
          type: string
        source:
          type: string
          enum:
            - woku
            - nps
            - csat
            - ces
        contextLabel:
          type: string
          description: Human label of where the quote comes from (tool/operation).
        occurredAt:
          type: string
          format: date-time
        score:
          type: number
          description: Raw score on the source's own scale.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Company API key. Obtain this from your Woku dashboard under Settings >
        API Keys. The same key used for the v0 endpoints.

````