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

# Send rich message postback

> Sends a postback for a rich message event.

**Required scopes:** <Tooltip tip="To send a postback to a chat taking place in any group.">`chats--all:rw`</Tooltip> or <Tooltip tip="To send a postback to a chat taking place in groups that the requester (related to the token) is a member of. The agent groups and the chat groups must overlap — at least one group must be in common.">`chats--access:rw`</Tooltip>


## OpenAPI

````yaml /api/agent-chat/v3.5/openapi.json post /action/send_rich_message_postback
openapi: 3.0.0
info:
  title: Agent Chat API
  description: >-
    The Agent Chat API allows you to manage chats, threads, events, and agent
    state.
  version: '3.5'
servers:
  - url: https://api.livechatinc.com/v3.5/agent
    description: Production server
security: []
paths:
  /action/send_rich_message_postback:
    post:
      tags:
        - Events
      summary: Send rich message postback
      description: Sends a postback for a rich message event.
      operationId: send-rich-message-postback
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendRichMessagePostbackRequest'
            example:
              chat_id: PJ0MRSHTDG
              thread_id: K600PKZON8
              event_id: a0c22fdd-fb71-40b5-bfc6-a8a0bc3117f7
              postback:
                id: Method URL_yes
                toggled: true
      responses:
        '200':
          description: Postback sent.
      security:
        - PersonalAccessToken: []
        - OAuth2BearerToken:
            - chats--all:rw
components:
  schemas:
    SendRichMessagePostbackRequest:
      type: object
      required:
        - chat_id
        - thread_id
        - event_id
        - postback
      properties:
        chat_id:
          type: string
          description: The chat ID.
        thread_id:
          type: string
          description: The thread ID.
        event_id:
          type: string
          description: The ID of the rich message event.
        postback:
          type: object
          required:
            - id
            - toggled
          description: The postback object.
          properties:
            id:
              type: string
              description: The postback name of the button.
            toggled:
              type: boolean
              description: >-
                If `true`: the postback button is toggled on. If `false`: it is
                toggled off.
            button_type:
              type: string
              description: The button type.
            button_value:
              type: string
              description: The button value.
            ecommerce:
              type: object
              description: E-commerce postback data.
              properties:
                product_id:
                  type: string
                  description: The product ID.
                option_id:
                  type: string
                  description: The option ID.
                quantity:
                  type: integer
                  description: The quantity.
              required:
                - product_id
  securitySchemes:
    PersonalAccessToken:
      description: >-
        Use your `account ID` as the username and your personal access token
        (PAT) as the password, or pass a Base64-encoded value directly in the
        Authorization header. For more information, see the <a
        href="/authentication/personal-access-tokens">personal access tokens
        guide</a>.
      type: http
      scheme: basic
    OAuth2BearerToken:
      description: >-
        This API uses OAuth2 with the implicit grant flow. <a
        href="/authentication/oauth-authorization#implicit-grant">Learn about
        the implicit grant flow.</a>
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://accounts.livechat.com
          scopes:
            chats--all:ro: Read all chats
            chats--all:rw: Read and write all chats
            chats--access:ro: Read chats from groups the agent is a member of
            chats--access:rw: Read and write chats from groups the agent is a member of
        authorizationCode:
          authorizationUrl: https://accounts.livechat.com
          tokenUrl: https://accounts.livechat.com/token
          scopes:
            chats--all:ro: Read all chats
            chats--all:rw: Read and write all chats
            chats--access:ro: Read chats from groups the agent is a member of
            chats--access:rw: Read and write chats from groups the agent is a member of

````