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

# Update FB comment automation

> Changes an existing automation's trigger or reply settings. Call `fbComments.get` to inspect current values first.



## OpenAPI

````yaml /api-reference/platform-api.json put /v1/fb-comments/{id}
openapi: 3.1.1
info:
  title: ChatbotX
  version: 0.0.1
servers:
  - url: https://app.chatbotx.io/api
security:
  - bearerAuth: []
  - developerAccessToken: []
  - tokenInSearchParams: []
paths:
  /v1/fb-comments/{id}:
    put:
      tags:
        - FB Comments
      summary: Update FB comment automation
      description: >-
        Changes an existing automation's trigger or reply settings. Call
        `fbComments.get` to inspect current values first.
      operationId: fbComments.update
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            pattern: ^\d+$
            description: FB comment automation id. Get it from `fbComments.list`.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: Automation name.
                type:
                  const: messenger
                  default: messenger
                  description: Automation channel type.
                folderId:
                  anyOf:
                    - type: string
                      pattern: ^\d+$
                    - type: 'null'
                  description: Folder to place the automation in, or null for root-level.
                post:
                  type: object
                  properties:
                    type:
                      enum:
                        - published
                        - ads
                        - reels
                        - postIds
                        - all
                      type: string
                    value:
                      type: array
                      items:
                        type: string
                  required:
                    - type
                    - value
                  description: >-
                    Facebook post to watch for comments. Get it from
                    `fbComments.listPosts`.
                privateReply:
                  type: object
                  properties:
                    type:
                      enum:
                        - AIAgent
                        - text
                        - flow
                        - none
                      type: string
                    value:
                      anyOf:
                        - type: string
                        - type: 'null'
                    values:
                      type: array
                      maxItems: 10
                      items:
                        type: object
                        properties:
                          value:
                            type: string
                        required:
                          - value
                  required:
                    - type
                    - value
                  description: Private message reply sent to the commenter, if any.
                publicReply:
                  type: object
                  properties:
                    type:
                      enum:
                        - AIAgent
                        - text
                        - flow
                        - none
                      type: string
                    value:
                      anyOf:
                        - type: string
                        - type: 'null'
                    values:
                      type: array
                      maxItems: 10
                      items:
                        type: object
                        properties:
                          value:
                            type: string
                        required:
                          - value
                  required:
                    - type
                    - value
                  description: Public comment reply posted under the comment, if any.
                includeKeywords:
                  type: object
                  properties:
                    type:
                      enum:
                        - all
                        - equal
                        - contain
                      type: string
                    value:
                      type: array
                      items:
                        type: string
                  required:
                    - type
                    - value
                  description: Only trigger when the comment matches these keywords.
                excludeKeywords:
                  type: array
                  items:
                    type: string
                  description: Never trigger when the comment matches these keywords.
                options:
                  type: object
                  properties:
                    replyToNewContactsOnly:
                      type: boolean
                    replyOncePerUserPerPost:
                      type: boolean
                    likeUserComment:
                      type: boolean
                    replyToUsersWhoCommentedOnOtherPosts:
                      type: boolean
                    ignoreCommentReplies:
                      type: boolean
                    trackUserTags:
                      type: boolean
                  required:
                    - replyToNewContactsOnly
                    - replyOncePerUserPerPost
                    - likeUserComment
                    - replyToUsersWhoCommentedOnOtherPosts
                    - ignoreCommentReplies
                    - trackUserTags
                  description: Matching and trigger behavior options.
                hideComments:
                  type: object
                  properties:
                    all:
                      type: boolean
                    hasPhoneNumber:
                      type: boolean
                    hasImage:
                      type: boolean
                    hasVideo:
                      type: boolean
                    hasLink:
                      type: boolean
                    hasKeywords:
                      type: boolean
                    keywords:
                      type: array
                      items:
                        type: string
                    showCommentsAfter:
                      enum:
                        - none
                        - 6h
                        - 12h
                        - 1d
                        - 2d
                        - 3d
                        - 4d
                        - 5d
                        - 6d
                        - 7d
                        - 8d
                        - 9d
                        - 10d
                      type: string
                  required:
                    - all
                    - hasPhoneNumber
                    - hasImage
                    - hasVideo
                    - hasLink
                    - hasKeywords
                    - keywords
                    - showCommentsAfter
                  description: Whether to hide matching comments after replying.
                replyAfter:
                  type: object
                  properties:
                    type:
                      enum:
                        - immediately
                        - seconds
                        - minutes
                        - hours
                        - randomWithin3Minutes
                        - randomWithin5Minutes
                        - randomWithin10Minutes
                        - randomWithin20Minutes
                        - randomWithin30Minutes
                        - randomWithin60Minutes
                      type: string
                    value:
                      type: number
                  required:
                    - type
                    - value
                  description: Delay before sending the reply.
                isActive:
                  type: boolean
                  description: Whether the automation is enabled.
                startTime:
                  anyOf:
                    - type: string
                    - type: 'null'
                  description: >-
                    When the automation starts being active, or null for
                    immediately.
                endTime:
                  anyOf:
                    - type: string
                    - type: 'null'
                  description: When the automation stops being active, or null for never.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  createdAt:
                    type: string
                    format: date-time
                    x-native-type: date
                  updatedAt:
                    type: string
                    format: date-time
                    x-native-type: date
                  name:
                    type: string
                  folderId:
                    anyOf:
                      - type: string
                      - type: 'null'
                  type:
                    enum:
                      - messenger
                      - instagram
                      - instagramFacebook
                      - threads
                    type: string
                  isActive:
                    type: boolean
                  startTime:
                    anyOf:
                      - type: string
                      - type: 'null'
                  endTime:
                    anyOf:
                      - type: string
                      - type: 'null'
                  repliesCount:
                    type: integer
                    minimum: -2147483648
                    maximum: 2147483647
                  sentCount:
                    type: integer
                    minimum: -2147483648
                    maximum: 2147483647
                  deliveredCount:
                    type: integer
                    minimum: -2147483648
                    maximum: 2147483647
                  seenCount:
                    type: integer
                    minimum: -2147483648
                    maximum: 2147483647
                  clickedCount:
                    type: integer
                    minimum: -2147483648
                    maximum: 2147483647
                  failedCount:
                    type: integer
                    minimum: -2147483648
                    maximum: 2147483647
                  missedCount:
                    type: integer
                    minimum: -2147483648
                    maximum: 2147483647
                  post:
                    type: object
                    properties:
                      type:
                        enum:
                          - published
                          - ads
                          - reels
                          - postIds
                          - all
                        type: string
                      value:
                        type: array
                        items:
                          type: string
                    required:
                      - type
                      - value
                  privateReply:
                    type: object
                    properties:
                      type:
                        enum:
                          - AIAgent
                          - text
                          - flow
                          - none
                        type: string
                      value:
                        anyOf:
                          - type: string
                          - type: 'null'
                      values:
                        type: array
                        maxItems: 10
                        items:
                          type: object
                          properties:
                            value:
                              type: string
                          required:
                            - value
                    required:
                      - type
                      - value
                  publicReply:
                    type: object
                    properties:
                      type:
                        enum:
                          - AIAgent
                          - text
                          - flow
                          - none
                        type: string
                      value:
                        anyOf:
                          - type: string
                          - type: 'null'
                      values:
                        type: array
                        maxItems: 10
                        items:
                          type: object
                          properties:
                            value:
                              type: string
                          required:
                            - value
                    required:
                      - type
                      - value
                  includeKeywords:
                    type: object
                    properties:
                      type:
                        enum:
                          - all
                          - equal
                          - contain
                        type: string
                      value:
                        type: array
                        items:
                          type: string
                    required:
                      - type
                      - value
                  excludeKeywords:
                    type: array
                    items:
                      type: string
                  options:
                    type: object
                    properties:
                      replyToNewContactsOnly:
                        type: boolean
                      replyOncePerUserPerPost:
                        type: boolean
                      likeUserComment:
                        type: boolean
                      replyToUsersWhoCommentedOnOtherPosts:
                        type: boolean
                      ignoreCommentReplies:
                        type: boolean
                      trackUserTags:
                        type: boolean
                    required:
                      - replyToNewContactsOnly
                      - replyOncePerUserPerPost
                      - likeUserComment
                      - replyToUsersWhoCommentedOnOtherPosts
                      - ignoreCommentReplies
                      - trackUserTags
                  hideComments:
                    type: object
                    properties:
                      all:
                        type: boolean
                      hasPhoneNumber:
                        type: boolean
                      hasImage:
                        type: boolean
                      hasVideo:
                        type: boolean
                      hasLink:
                        type: boolean
                      hasKeywords:
                        type: boolean
                      keywords:
                        type: array
                        items:
                          type: string
                      showCommentsAfter:
                        enum:
                          - none
                          - 6h
                          - 12h
                          - 1d
                          - 2d
                          - 3d
                          - 4d
                          - 5d
                          - 6d
                          - 7d
                          - 8d
                          - 9d
                          - 10d
                        type: string
                    required:
                      - all
                      - hasPhoneNumber
                      - hasImage
                      - hasVideo
                      - hasLink
                      - hasKeywords
                      - keywords
                      - showCommentsAfter
                  replyAfter:
                    type: object
                    properties:
                      type:
                        enum:
                          - immediately
                          - seconds
                          - minutes
                          - hours
                          - randomWithin3Minutes
                          - randomWithin5Minutes
                          - randomWithin10Minutes
                          - randomWithin20Minutes
                          - randomWithin30Minutes
                          - randomWithin60Minutes
                        type: string
                      value:
                        type: number
                    required:
                      - type
                      - value
                required:
                  - id
                  - createdAt
                  - updatedAt
                  - name
                  - type
                  - isActive
                  - startTime
                  - endTime
                  - repliesCount
                  - sentCount
                  - deliveredCount
                  - seenCount
                  - clickedCount
                  - failedCount
                  - missedCount
                  - post
                  - privateReply
                  - publicReply
                  - includeKeywords
                  - excludeKeywords
                  - options
                  - hideComments
                  - replyAfter
        '400':
          description: '400'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: businessError
                      status:
                        const: 400
                      message:
                        type: string
                        default: An error occurred while processing your request
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
        '401':
          description: '401'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: UNAUTHORIZED
                      status:
                        const: 401
                      message:
                        type: string
                        default: Authentication required
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: INVALID_CHATBOT_TOKEN
                      status:
                        const: 401
                      message:
                        type: string
                        default: Invalid or missing workspace API token
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
        '403':
          description: '403'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: FORBIDDEN
                      status:
                        const: 403
                      message:
                        type: string
                        default: You do not have permission to perform this action
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: trialExpired
                      status:
                        const: 403
                      message:
                        type: string
                        default: Trial expired
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: macLimitReached
                      status:
                        const: 403
                      message:
                        type: string
                        default: Monthly active contact limit reached
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
        '404':
          description: '404'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: notFound
                      status:
                        const: 404
                      message:
                        type: string
                        default: Resource not found
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
        '422':
          description: '422'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: invalidRequestData
                      status:
                        const: 422
                      message:
                        type: string
                        default: Input validation failed
                      data:
                        type: object
                        properties:
                          issues:
                            type: array
                            items:
                              type: object
                              properties:
                                message:
                                  type: string
                                path:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: number
                                      - type: object
                                        properties:
                                          key:
                                            anyOf:
                                              - type: string
                                              - type: number
                                        required:
                                          - key
                                        additionalProperties: {}
                              required:
                                - message
                              additionalProperties: {}
                        required:
                          - issues
                        additionalProperties: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                      - data
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: validation
                      status:
                        const: 422
                      message:
                        type: string
                        default: Validation error
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
        '429':
          description: '429'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: tooManyRequests
                      status:
                        const: 429
                      message:
                        type: string
                        default: Too many requests
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
        '500':
          description: '500'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: INTERNAL_SERVER_ERROR
                      status:
                        const: 500
                      message:
                        type: string
                        default: An unexpected error occurred
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
components:
  schemas:
    UndefinedError:
      type: object
      properties:
        defined:
          const: false
        code:
          type: string
        status:
          type: number
        message:
          type: string
        data: {}
      required:
        - defined
        - code
        - status
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    developerAccessToken:
      type: http
      scheme: bearer
    tokenInSearchParams:
      type: apiKey
      in: query
      name: token

````