> ## 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 event preview

> Sends an event that isn't saved in the chat. Use this method when you're preparing a longer response and want to send a partial update before sending the final message with Send Event.

Only the `message` type is supported. Visibility must be set to `all` or skipped. The user must be added to the chat before they can send an event.

**Required scopes:** <Tooltip tip="To send an event to a chat taking place in any group.">`chats--all:rw`</Tooltip> or <Tooltip tip="To send an event 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.6/openapi.json post /action/send_event_preview
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.6'
servers:
  - url: https://api.livechatinc.com/v3.6/agent
    description: Production server
security: []
paths:
  /action/send_event_preview:
    post:
      tags:
        - Events
      summary: Send event preview
      description: >-
        Sends an event that isn't saved in the chat. Use this method when you're
        preparing a longer response and want to send a partial update before
        sending the final message with Send Event.


        Only the `message` type is supported. Visibility must be set to `all` or
        skipped. The user must be added to the chat before they can send an
        event.
      operationId: send-event-preview
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendEventPreviewRequest'
            example:
              chat_id: PW94SJTGW6
              event:
                type: message
                text: Preview of a longer response...
                visibility: all
                custom_id: 31-0C-1C-07-DB-16
      responses:
        '200':
          description: Event preview sent.
      security:
        - PersonalAccessToken: []
        - OAuth2BearerToken:
            - chats--all:rw
components:
  schemas:
    SendEventPreviewRequest:
      type: object
      required:
        - chat_id
        - event
      properties:
        chat_id:
          type: string
          description: The ID of the chat to send the preview to.
        event:
          type: object
          description: >-
            An event object. Only the `message` type is supported. For field
            details, see the [Agent Chat API data structures
            reference](/api/agent-chat/v3.6/data-structures).
          properties:
            type:
              type: string
              enum:
                - message
            text:
              type: string
              description: The message text.
  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

````