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

# Close conversation

> Close the conversation for the contact. Further contact messages are
rejected with `conversation_closed` until it is reopened.



## OpenAPI

````yaml https://api.gleap.io/api-docs.json post /s2s/conversations/{conversationId}/close
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /s2s/conversations/{conversationId}/close:
    post:
      tags:
        - S2S Conversations
      summary: Close conversation
      description: |-
        Close the conversation for the contact. Further contact messages are
        rejected with `conversation_closed` until it is reopened.
      operationId: Close
      parameters:
        - in: path
          name: conversationId
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/S2SConversation'
      security:
        - s2s: []
components:
  schemas:
    S2SConversation:
      properties:
        id:
          type: string
        number:
          type: number
          format: double
        title:
          type: string
        type:
          type: string
        status:
          type: string
        closed:
          type: boolean
        archived:
          type: boolean
        unread:
          type: boolean
        workflowActive:
          type: boolean
        workflowId:
          type: string
        assignee:
          allOf:
            - $ref: '#/components/schemas/S2SAuthor'
          nullable: true
        attributes:
          $ref: '#/components/schemas/Record_string.unknown_'
        contact:
          properties:
            userId:
              type: string
          type: object
        latestMessage:
          $ref: '#/components/schemas/S2SMessage'
        createdAt:
          type: string
          format: date-time
        lastActivityAt:
          type: string
          format: date-time
      required:
        - id
        - closed
        - archived
        - unread
        - workflowActive
      type: object
      additionalProperties: false
    S2SAuthor:
      properties:
        type:
          type: string
          enum:
            - contact
            - agent
            - bot
            - system
        id:
          type: string
        name:
          type: string
        avatar:
          type: string
      required:
        - type
      type: object
      additionalProperties: false
    Record_string.unknown_:
      properties: {}
      type: object
      description: Construct a type with a set of properties K of type T
    S2SMessage:
      properties:
        id:
          type: string
        conversationId:
          type: string
        text:
          type: string
        author:
          $ref: '#/components/schemas/S2SAuthor'
        attachments:
          items:
            $ref: '#/components/schemas/S2SAttachment'
          type: array
        replyToMessageId:
          type: string
        rating:
          type: string
        unread:
          type: boolean
        createdAt:
          type: string
          format: date-time
      required:
        - id
        - conversationId
        - author
        - attachments
        - unread
        - createdAt
      type: object
      additionalProperties: false
    S2SAttachment:
      properties:
        url:
          type: string
        name:
          type: string
        contentType:
          type: string
      required:
        - url
      type: object
      additionalProperties: false
  securitySchemes:
    s2s:
      type: http
      scheme: bearer
      bearerFormat: Service account token (JWT)

````