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

# Add WABA Message Comment

> Add a comment to a WABA message.



## OpenAPI

````yaml post /waba/messages/{message_uid}/comments
openapi: 3.0.3
info:
  title: Timelines Public API
  description: >
    # Timelines Public API


    _Some API calls may utilize message sending quota or be subject to message
    sending rate limits as described below._


    ### Credit Utilization 
      - Sending a message via API consumes 1 credit from message sending quota.
      - Sending a message with non-empty text and attachment consumes 2 credits from message sending quota.
      - If a message cannot be sent (invalid or not connected to WhatsApp number, WhatsApp server error), message sending quota will be restored (usually within a couple of hours).
    ### Message sending rate
      - Messages will be sent with random delay of about 2 seconds between each two messages (to avoid WhatsApp spam detection mechanisms). Contact support@timelines.ai if you want to modify delay for your workspace (available on Business plan only).
      - If you exceed message sending frequency, messages be queued and sent out with delay. Each queued message will consume a message sending credit, so the number of queued messages cannot exceed the available quota.
      
    ### Authorization:
      - Copy API token from [Public API page](https://app.timelines.ai/integrations/api/) in your TimelinesAI account.
      - Put the token in *Authorization* header of request as follows:
      ```
      Authorization: Bearer 4d2d0239-e28c-4f4a-8a4d-3a3ca40056b8
      ```
            
    ### Message formatting:
      - use "\n" for line breaks

    ### Input strings:
      - String fields must not contain the NUL character (U+0000).
  version: 1.3.0
servers:
  - url: https://app.timelines.ai/integrations/api
    description: Public API root URL
security:
  - bearerAuth: []
paths:
  /waba/messages/{message_uid}/comments:
    post:
      summary: Add a comment to a WABA message.
      description: >-
        Adds a comment that shows on the message in the app. `text` is cleaned
        the way the app cleans a typed comment. A `br` becomes a new line
        followed by a space. A plain line break in `text` is removed; send
        `<br>` to start a new line. A `span` is kept only as a mention, with a
        numeric `user-id` or an email in `user-email`; its other attributes are
        dropped. Other tags are removed and their text stays. The text is
        HTML-escaped, so `&`, `<`, `>` and quotes come back as entities. A bare
        `http` or `https` URL becomes a link that opens in a new tab. A user
        token records that user as the author. A workspace token records the
        workspace owner. Mentions do not send email.
      parameters:
        - $ref: '#/components/parameters/message_uid'
      requestBody:
        description: A JSON with the comment text.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MessageCommentRequest'
      responses:
        '200':
          description: Success. The comment is created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageCommentResponse'
        '400':
          description: '`text` is missing or blank'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: error
                message: text is required
                error_code: validation_error
                errors:
                  - fields:
                      - text
                    msg: text is required
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/AccessDenied'
        '404':
          description: No such message in this workspace, or the token cannot open its chat
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: error
                message: Message not found.
                error_code: not_found
        '405':
          description: The message is a regular WhatsApp message. Nothing is changed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: error
                message: >-
                  This is a regular WhatsApp message. Use
                  /messages/{message_uid}/comments.
                error_code: not_supported
components:
  parameters:
    message_uid:
      in: path
      name: message_uid
      schema:
        type: string
      required: true
      description: >-
        a UID of a message, that is unique for TimelinesAI workspace. Can be
        used to lookup a message or its sending status.
      example: a5bbb005-37f2-402c-96fa-e479a2e09b02
  schemas:
    MessageCommentRequest:
      type: object
      required:
        - text
      properties:
        text:
          type: string
          description: comment text. Must not be blank
          example: Called the client
    MessageCommentResponse:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: string
          description: Result status
          example: ok
          enum:
            - ok
            - error
        data:
          description: the created or changed comment
          allOf:
            - $ref: '#/components/schemas/MessageComment'
    ErrorResponse:
      required:
        - message
        - status
      type: object
      properties:
        message:
          type: string
        status:
          type: string
          example: error
          enum:
            - ok
            - error
        error_code:
          type: string
          description: >-
            Stable, machine-readable error code. Use this for branching in
            client integrations.
          example: validation_error
          enum:
            - missing_credentials
            - invalid_token
            - member_not_found
            - permission_denied
            - insufficient_scope
            - plan_feature_unavailable
            - quota_exceeded
            - rate_limit_exceeded
            - validation_error
            - not_found
            - account_inactive
            - template_not_approved
            - template_wrong_waba
            - template_variables_mismatch
            - service_window_closed
            - not_supported
            - internal_error
            - account_already_connected
            - member_has_connected_account
            - member_has_phone_link_in_progress
            - number_pairing_in_progress
            - member_has_qr_connection_in_progress
            - connected_accounts_limit_reached
            - user_id_required
            - number_not_allowed
        errors:
          type: array
          description: >-
            Per-field validation diagnostics for request-schema (body/params)
            validation failures. Present only when the request failed schema
            validation; absent on business-rule `validation_error` rejections
            (which carry `message` and `error_code` only) and on
            auth/authorization/quota errors.
          items:
            $ref: '#/components/schemas/ValidationError'
    MessageComment:
      type: object
      required:
        - id
        - text
        - created_at
        - updated_at
        - user_id
        - display_name
        - email
      properties:
        id:
          type: integer
          description: id of the comment
          example: 501
        text:
          type: string
          description: >-
            comment text as stored. May hold `span` tags and links that open in
            a new tab
          example: Called the client
        created_at:
          type: string
          description: when the comment was written, in the workspace timezone
          example: 2023-06-18 15:19:23 +0300
        updated_at:
          type: string
          description: >-
            when the comment text last changed, in the workspace timezone.
            Equals `created_at` for a comment that was never changed
          example: 2023-06-18 15:19:23 +0300
        user_id:
          type: integer
          nullable: true
          description: id of the author. `null` when the author no longer exists
          example: 42
        display_name:
          type: string
          nullable: true
          description: >-
            author's name, or the email when the name is empty. `null` when the
            author no longer exists
          example: John Doe
        email:
          type: string
          nullable: true
          description: author's email. `null` when the author no longer exists
          example: john.doe@acme.com
    ValidationError:
      type: object
      required:
        - fields
        - msg
      properties:
        fields:
          type: array
          items:
            type: string
          description: >-
            Path of the offending field, as a list of keys/indexes from the
            request root.
          example:
            - url
        msg:
          type: string
          description: Validator message for that field.
          example: must be a valid http(s) URL
  responses:
    UnauthorizedError:
      description: Access token is missing or invalid
    AccessDenied:
      description: Access denied
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.