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

# Update an NPS tool definition (only if it has no responses)



## OpenAPI

````yaml /openapi-v1.json patch /v1/nps-tools/{id}
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-tools/{id}:
    patch:
      tags:
        - v1 - nps-tools
      summary: Update an NPS tool definition (only if it has no responses)
      operationId: V1NpsToolsController_updateNpsTool
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
            format: ObjectId
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateNpsToolBodyDTO'
      responses:
        '200':
          description: NPS tool updated
        '400':
          description: Validation error, or the tool already has responses
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponseDto'
        '404':
          description: NPS tool not found
      security:
        - bearer: []
components:
  schemas:
    UpdateNpsToolBodyDTO:
      type: object
      properties:
        name:
          type: string
          maxLength: 140
        npsMessage:
          type: string
          description: >-
            Recommended company/product/service fragment (e.g. "our company"),
            NOT the full question.
          example: our company
          minLength: 3
          maxLength: 140
        audienceType:
          type: string
          description: Audience fragment (e.g. "partners"), NOT the full question.
          example: a friend or colleague
          maxLength: 140
        availableLocales:
          example:
            - es
            - en
          type: array
          items:
            type: string
        defaultLocale:
          type: string
          enum:
            - es
            - en
        localizedContent:
          type: array
          items:
            $ref: '#/components/schemas/NpsToolLocalizedContentBodyDTO'
    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
    NpsToolLocalizedContentBodyDTO:
      type: object
      properties:
        locale:
          type: string
          enum:
            - es
            - en
          example: en
        npsMessage:
          type: string
          description: >-
            Recommended company/product/service fragment for this locale (e.g.
            "our company"), NOT the full question.
          example: our company
          minLength: 3
          maxLength: 140
        audienceType:
          type: string
          description: Audience fragment for this locale, NOT the full question.
          example: a friend or colleague
          maxLength: 140
      required:
        - locale
        - npsMessage
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: Company secret API key.

````