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

# Open session

> Reopens a closed session, assigning it to the requesting operator and
notifying connected clients over the realtime socket.



## OpenAPI

````yaml /api/services-api.yaml patch /v1/tenants/{tenantID}/sessions/{sessionID}/open
openapi: 3.0.3
info:
  description: >-
    Talqui is an omnichannel customer service platform that unifies
    conversations from WhatsApp, Instagram, Telegram, and many other channels
    into a single attendant panel, alongside a broader ecosystem of plugins and
    integrations. This API gives developers programmatic access to Talqui's
    services layer, exposing the operations needed to read and manage tenants,
    conversations, plugins, and related resources that power that platform.


    Authentication is available on behalf of an Operator (the default for this
    API), a Plugin Connection, or a Plugin — see the [Talqui authentication
    guide](https://docs.talqui.chat/guides/introduction/authentication/) for how
    each token is obtained and when to use it.


    Need help or have questions not covered here? Reach out to
    support@talqui.com.
  license:
    name: ISC
    url: https://opensource.org/license/isc-license-txt
  title: Talqui - Services API
  version: 0.65.0
servers:
  - description: Production
    url: https://services-api.talqui.chat
security: []
tags:
  - name: Tenants
  - name: Settings
  - name: Analytics
  - name: Campaigns
  - name: Campaigns models
  - name: Contacts
  - name: Handoff links
  - name: Inboxes
  - name: Messages
  - name: Notifications
  - name: Sessions
  - name: Operators
  - name: Plugins
  - name: Setup
  - name: Uploads
paths:
  /v1/tenants/{tenantID}/sessions/{sessionID}/open:
    patch:
      tags:
        - Sessions
      summary: Open session
      description: |-
        Reopens a closed session, assigning it to the requesting operator and
        notifying connected clients over the realtime socket.
      operationId: OpenSessionController
      parameters:
        - in: path
          name: tenantID
          required: true
          schema:
            description: The tenant the session belongs to.
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            type: string
        - in: path
          name: sessionID
          required: true
          schema:
            description: The session to reopen.
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  session:
                    additionalProperties: false
                    description: The reopened session.
                    properties:
                      closeMotive:
                        description: Reason this session was closed, if recorded.
                        type: string
                      closedAt:
                        description: When this session was closed, if applicable.
                        format: date-time
                        type: string
                      contactID:
                        description: The contact this session is with.
                        type: string
                      createdAt:
                        description: When this session was created.
                        format: date-time
                        type: string
                      deletedAt:
                        description: When this session was soft-deleted, if applicable.
                        format: date-time
                        type: string
                      inboxID:
                        description: The inbox this session is routed to, if any.
                        nullable: true
                        type: string
                      manualAt:
                        description: >-
                          When this session was manually assigned, if
                          applicable.
                        format: date-time
                        type: string
                      operatorID:
                        description: >-
                          The operator currently assigned to this session, if
                          any.
                        nullable: true
                        type: string
                      organizationID:
                        description: The Talqui organization this session belongs to.
                        type: string
                      pluginConnectionID:
                        description: The plugin connection this session was opened through.
                        type: string
                      queuedAt:
                        description: When this session entered the queue, if applicable.
                        format: date-time
                        type: string
                      sessionActive:
                        description: Whether this session is currently open.
                        type: boolean
                      sessionChannel:
                        description: The channel this session is happening on.
                        type: string
                      sessionCloseComments:
                        description: >-
                          Free-text comments left when closing this session, if
                          any.
                        nullable: true
                        type: string
                      sessionID:
                        description: Unique identifier for this session.
                        type: string
                      sessionInactivityAt:
                        description: >-
                          When this session will be considered inactive if no
                          activity occurs.
                        format: date-time
                        type: string
                      sessionInitiator:
                        description: Who started this session.
                        enum:
                          - contact
                          - tenant
                        type: string
                      sessionKind:
                        description: >-
                          Whether this session is transactional or a marketing
                          outreach.
                        enum:
                          - transactional
                          - marketing
                        type: string
                      sessionLastMessageID:
                        description: >-
                          Identifier of the most recent message in this session,
                          if any.
                        nullable: true
                        type: string
                      sessionLastSmartID:
                        description: >-
                          Identifier of the most recent automation/smart-reply
                          applied, if any.
                        nullable: true
                        type: string
                      sessionLastTag:
                        description: Most recently applied tag, if any.
                        nullable: true
                        type: string
                      sessionMeta:
                        additionalProperties: {}
                        description: Arbitrary metadata attached to the session.
                        type: object
                      sessionRating:
                        additionalProperties: false
                        description: Rating left by the contact for this session, if any.
                        properties:
                          comment:
                            description: >-
                              Free-text comment left alongside the rating, if
                              any.
                            nullable: true
                            type: string
                          createdAt:
                            description: When the rating was submitted.
                            format: date-time
                            type: string
                          stars:
                            description: Rating given by the contact, typically 1-5.
                            type: number
                        required:
                          - stars
                          - comment
                        type: object
                      sessionStatus:
                        description: Numeric status code for this session.
                        type: number
                      sessionSubProcess:
                        description: >-
                          Current sub-process/flow step this session is in, if
                          any.
                        nullable: true
                        type: string
                      sessionSummary:
                        additionalProperties: {}
                        description: AI-generated summary of this session, if available.
                        type: object
                      sessionTags:
                        description: Tags used for organizing/filtering sessions.
                        items:
                          type: string
                        type: array
                      sessionType:
                        description: How this session was assigned to an operator.
                        enum:
                          - auto
                          - queued
                          - manual
                        type: string
                      tenantID:
                        description: The tenant this session belongs to.
                        type: string
                      updatedAt:
                        description: When this session was last updated.
                        format: date-time
                        type: string
                    required:
                      - sessionID
                      - contactID
                      - organizationID
                      - tenantID
                      - pluginConnectionID
                      - operatorID
                      - sessionChannel
                      - sessionTags
                      - sessionLastTag
                      - sessionSummary
                      - sessionActive
                      - sessionKind
                      - sessionInitiator
                      - sessionType
                      - sessionStatus
                      - sessionMeta
                      - sessionLastMessageID
                      - sessionLastSmartID
                      - sessionSubProcess
                      - sessionRating
                      - sessionCloseComments
                      - sessionInactivityAt
                      - createdAt
                      - updatedAt
                    type: object
                required:
                  - session
                type: object
          description: Response for status 200.
        '400':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      oneOf:
                        - $ref: '#/components/schemas/MissingTenantIDError'
                        - $ref: '#/components/schemas/MissingSessionIDError'
                        - $ref: '#/components/schemas/RequestValidationError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            MissingTenantIDError (error_code 1001): tenantID absent from the
            URL. | MissingSessionIDError (error_code 1061): sessionID absent
            from the URL. | RequestValidationError (error_code 1002): params
            fail UUID format validation.
        '401':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/UnauthorizedError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: 'UnauthorizedError (error_code 1003): missing/invalid operator token.'
        '403':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/ForbiddenError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: 'ForbiddenError (error_code 1004): operator token rejected upstream.'
        '404':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/SessionNotFoundError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            SessionNotFoundError (error_code 1060): sessionID does not exist for
            this tenant.
        '500':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      $ref: '#/components/schemas/UnknownError'
                    maxItems: 1
                    minItems: 1
                    type: array
                required:
                  - errors
                type: object
          description: >-
            UnknownError (error_code 5999): Unexpected internal error not
            otherwise documented for this endpoint.
      security:
        - operatorAuth: []
components:
  schemas:
    MissingTenantIDError:
      additionalProperties: false
      properties:
        error:
          enum:
            - MissingTenantIDError
          type: string
        error_code:
          enum:
            - 1001
          type: number
        message:
          example: tenantID is required.
          type: string
        statusCode:
          enum:
            - 400
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    MissingSessionIDError:
      additionalProperties: false
      properties:
        error:
          enum:
            - MissingSessionIDError
          type: string
        error_code:
          enum:
            - 1061
          type: number
        message:
          example: sessionID is required.
          type: string
        statusCode:
          enum:
            - 400
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    RequestValidationError:
      additionalProperties: false
      properties:
        error:
          enum:
            - RequestValidationError
          type: string
        error_code:
          enum:
            - 1002
          type: number
        fields:
          items:
            additionalProperties: false
            properties:
              allowed:
                type: string
              field:
                type: string
              received:
                type: string
            required:
              - field
              - received
              - allowed
            type: object
          type: array
        message:
          example: Invalid request data.
          type: string
        statusCode:
          enum:
            - 400
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
        - fields
      type: object
    UnauthorizedError:
      additionalProperties: false
      properties:
        error:
          enum:
            - UnauthorizedError
          type: string
        error_code:
          enum:
            - 1003
          type: number
        message:
          example: You are not authorized to perform this request.
          type: string
        statusCode:
          enum:
            - 401
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    ForbiddenError:
      additionalProperties: false
      properties:
        error:
          enum:
            - ForbiddenError
          type: string
        error_code:
          enum:
            - 1004
          type: number
        message:
          example: You do not have access to this resource.
          type: string
        statusCode:
          enum:
            - 403
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    SessionNotFoundError:
      additionalProperties: false
      properties:
        error:
          enum:
            - SessionNotFoundError
          type: string
        error_code:
          enum:
            - 1060
          type: number
        message:
          example: Session not found.
          type: string
        statusCode:
          enum:
            - 404
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
    UnknownError:
      additionalProperties: false
      properties:
        error:
          enum:
            - UnknownError
          type: string
        error_code:
          enum:
            - 5999
          type: number
        message:
          example: For some unknown reason your request has not succeeded.
          type: string
        statusCode:
          enum:
            - 500
          type: number
      required:
        - statusCode
        - error
        - error_code
        - message
      type: object
  securitySchemes:
    operatorAuth:
      bearerFormat: JWT
      description: >-
        Behalf of an Operator (default). A JWT issued by Talqui Core when an
        operator signs in, scoped to every tenant that operator belongs to. Send
        as `Authorization: Bearer <jwt-token>`.
      scheme: bearer
      type: http

````

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