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

# Resume chat

> Restarts an archived chat.

Authors (except the requester) of all initial events must be listed in the `users` field. Default visibility of events and users is `all` and cannot be changed. The method updates the requester's `events_seen_up_to` as if they've seen all chat events.

**Required scopes:** <Tooltip tip="To resume a chat in any group.">`chats--all:rw`</Tooltip> or <Tooltip tip="To resume a chat in groups that the requester (related to the token) is a member of.">`chats--access:rw`</Tooltip>


## OpenAPI

````yaml /api/agent-chat/v3.7/openapi.json post /action/resume_chat
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.7'
servers:
  - url: https://api.livechatinc.com/v3.7/agent
    description: Production server
security: []
paths:
  /action/resume_chat:
    post:
      tags:
        - Chats
      summary: Resume chat
      description: >-
        Restarts an archived chat.


        Authors (except the requester) of all initial events must be listed in
        the `users` field. Default visibility of events and users is `all` and
        cannot be changed. The method updates the requester's
        `events_seen_up_to` as if they've seen all chat events.
      operationId: resume-chat
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResumeChatRequest'
            example:
              chat:
                id: PWJ8Y4THAV
      responses:
        '200':
          description: Chat resumed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResumeChatResponse'
              example:
                thread_id: Z8AGR5OUW
      security:
        - PersonalAccessToken: []
        - OAuth2BearerToken:
            - chats--all:rw
components:
  schemas:
    ResumeChatRequest:
      type: object
      required:
        - chat
      properties:
        chat:
          type: object
          required:
            - id
          description: Chat to resume.
          properties:
            id:
              type: string
              description: ID of the chat to resume.
            access:
              $ref: '#/components/schemas/Access'
            properties:
              $ref: '#/components/schemas/Properties'
            users:
              type: array
              description: >-
                Users to add to the chat. Up to 4 additional agents (other than
                the requester) and 1 customer allowed.
              items:
                type: object
                required:
                  - id
                  - type
                properties:
                  id:
                    type: string
                    description: User ID.
                  type:
                    type: string
                    enum:
                      - agent
                      - customer
                    description: User type.
            thread:
              type: object
              description: Initial thread configuration.
              properties:
                events:
                  type: array
                  items:
                    $ref: '#/components/schemas/Event'
                  description: Initial events for the thread.
                properties:
                  $ref: '#/components/schemas/Properties'
        active:
          type: boolean
          default: true
          description: 'If `false`: creates an inactive thread.'
        continuous:
          type: boolean
          description: >-
            If `true`: sets chat to continuous mode. If not set: leaves the
            current mode unchanged.
    ResumeChatResponse:
      type: object
      properties:
        thread_id:
          type: string
          description: The ID of the created thread.
        event_ids:
          type: array
          items:
            type: string
          description: >-
            IDs of user-generated events. Returned only when the chat was
            resumed with initial events. Server-side generated events are
            excluded.
    Access:
      type: object
      description: >-
        [Access object](/api/agent-chat/v3.7/data-structures#access) defining
        which groups can access the chat or thread.
      properties:
        group_ids:
          type: array
          items:
            type: integer
          description: Array of group IDs with access. `0` means all groups.
    Properties:
      type: object
      description: Custom properties organized by namespace, then property name.
      additionalProperties:
        type: object
        additionalProperties: true
    Event:
      type: object
      description: >-
        Event object. Event types include `message`, `file`, `form`,
        `filled_form`, `rich_message`, `custom`, `system_message`, and `system`.
        For full field details per type, see the [Agent Chat API data structures
        reference](/api/agent-chat/v3.7/data-structures).
      properties:
        id:
          type: string
          description: Event ID.
        type:
          type: string
          description: Event type.
        created_at:
          type: string
          format: date-time
          description: Event creation timestamp (RFC3339 with microseconds).
        author_id:
          type: string
          description: ID of the event author.
        visibility:
          type: string
          enum:
            - all
            - agents
          description: Event visibility.
        properties:
          $ref: '#/components/schemas/Properties'
  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

````