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

# Capture an NPS score (company-level or tool-specific)



## OpenAPI

````yaml /openapi-v1.json post /v1/nps
openapi: 3.0.0
info:
  title: Woku Client API v1
  description: >-
    Public REST API for programmatic management of woku Voice-of-Customer
    programs: trackers, VoC instruments (NPS, woku, CES, CSAT), action plans,
    support tickets, multi-channel sending and response capture. Requests are
    company-scoped by the API key; never send a company id.
  version: 1.0.0
  contact:
    name: Woku
    url: https://woku.app
    email: team@woku.app
servers:
  - url: https://clientapi.woku.app
    description: Production
security: []
tags: []
paths:
  /v1/nps:
    post:
      tags:
        - v1 - nps
      summary: Capture an NPS score (company-level or tool-specific)
      operationId: V1NpsController_createNps
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V1CreateNpsBodyDto'
      responses:
        '201':
          description: NPS created
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponseDto'
        '403':
          description: Tool does not belong to caller
      security:
        - bearer: []
components:
  schemas:
    V1CreateNpsBodyDto:
      type: object
      properties:
        score:
          type: number
          description: NPS score 0-10 (0-6 detractor, 7-8 passive, 9-10 promoter)
          minimum: 0
          maximum: 10
          example: 9
        npsToolId:
          type: string
          description: >-
            Optional NPS tool id. With it the capture is tool-specific; without
            it, company-level.
          format: ObjectId
        clientEmail:
          type: string
          description: Respondent email. Omit for an anonymous capture.
          format: email
        clientPhone:
          type: string
          description: Respondent phone when email is not supplied.
        anonymous:
          type: boolean
          description: Whether the submission is anonymous (no client email stored).
        responseChannel:
          type: string
          description: >-
            Inbound response channel. Defaults to 'api'; a value provided here
            REPLACES 'api' (user-defined channel). Stored on the NPS.
          example: my-crm
          maxLength: 48
        dispatchToken:
          type: string
          description: >-
            Opaque invitation dispatch token echoed from the link (?dtoken=).
            Consumed to mark the outbound invitation responded; never persisted.
          example: a1b2c3d4-...
          maxLength: 64
      required:
        - score
    ValidationErrorResponseDto:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 400
        message:
          description: Array of validation error messages
          example:
            - email must be a valid email
            - password must be at least 8 characters
          type: array
          items:
            type: string
        error:
          type: string
          description: Error type
          example: Bad Request
      required:
        - statusCode
        - message
        - error
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: Company secret API key.

````