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

# Create a text review

> Creates a new text review (textnote) for a woku. Includes a star rating (1-5) and text feedback. You can optionally associate a client email or phone number.



## OpenAPI

````yaml /openapi.json post /wokus/create-textnote
openapi: 3.0.3
info:
  title: Woku Client API
  description: >-
    API for integrating with Woku's feedback collection platform. This API
    allows you to create wokus (feedback collection tools), submit reviews, and
    retrieve reports.


    ## Authentication


    All endpoints require authentication using a Bearer token in the
    Authorization header. You can obtain your API key from the Woku dashboard.


    ```

    Authorization: Bearer your_api_key_here

    ```


    ## Base URL


    Production: `https://api.woku.app`
  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: Endpoints for creating and managing wokus (feedback collection tools)
  - name: Reviews
    description: Endpoints for submitting and retrieving reviews
  - name: Companies
    description: Endpoints for retrieving company data
  - name: Reports
    description: Endpoints for retrieving NPS and analytics reports
paths:
  /wokus/create-textnote:
    post:
      tags:
        - Wokus
      summary: Create a text review
      description: >-
        Creates a new text review (textnote) for a woku. Includes a star rating
        (1-5) and text feedback. You can optionally associate a client email or
        phone number.
      operationId: createTextnote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTextnoteRequest'
            examples:
              basic:
                summary: Basic text review
                value:
                  wokuId: 507f1f77bcf86cd799439011
                  qualification: 5
                  description: Excellent service! The staff was very helpful and friendly.
              withClient:
                summary: Review with client information
                value:
                  wokuId: 507f1f77bcf86cd799439011
                  qualification: 4
                  description: Great experience overall. Would recommend.
                  clientEmail: reviewer@example.com
                  clientPhone: 56988887777
              anonymous:
                summary: Anonymous review
                value:
                  wokuId: 507f1f77bcf86cd799439011
                  qualification: 3
                  description: Average experience, nothing special.
                  anonymous: true
      responses:
        '201':
          description: Textnote created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TextnoteResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '404':
          description: Woku not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
        - BearerAuth: []
components:
  schemas:
    CreateTextnoteRequest:
      type: object
      required:
        - wokuId
        - qualification
        - description
      properties:
        wokuId:
          type: string
          format: objectid
          description: MongoDB ObjectId of the woku to add the review to
          example: 507f1f77bcf86cd799439011
        qualification:
          type: integer
          minimum: 1
          maximum: 5
          description: Star rating from 1 to 5
          example: 5
        description:
          type: string
          maxLength: 3000
          description: Text content of the review (max 3000 characters)
          example: Excellent service! The staff was very helpful and friendly.
        clientEmail:
          type: string
          format: email
          description: Email address of the reviewer
          example: reviewer@example.com
        clientPhone:
          type: integer
          description: >-
            Phone number of the reviewer (including country code, no spaces or
            symbols)
          example: 56988887777
        anonymous:
          type: boolean
          description: Whether the review should be anonymous
          default: false
          example: false
    TextnoteResponse:
      type: object
      properties:
        _id:
          type: string
          format: objectid
          description: Unique identifier of the textnote
          example: 507f1f77bcf86cd799439018
        wokuId:
          type: string
          format: objectid
          description: Woku ID the textnote belongs to
          example: 507f1f77bcf86cd799439011
        qualification:
          type: object
          properties:
            qualification:
              type: integer
              example: 5
        description:
          type: string
          description: Text content of the review
          example: Excellent service!
        anonymous:
          type: boolean
          example: false
        clientId:
          type: string
          format: objectid
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    ValidationError:
      type: object
      properties:
        statusCode:
          type: integer
          example: 400
        message:
          type: array
          items:
            type: string
          example:
            - description must be a string
            - fileUrl must be a valid URL
        error:
          type: string
          example: Bad Request
    NotFoundError:
      type: object
      properties:
        statusCode:
          type: integer
          example: 404
        message:
          type: string
          example: Resource not found
        error:
          type: string
          example: Not Found
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Company API key. Obtain this from your Woku dashboard under Settings >
        API Keys.

````