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

# Terminate Connection

> Terminates an existing vendor-client connection.

<Note> If a termination request is made while a data sync is in pr ogr ess, the API will return an error, pr eventing deletion until the sync is complete. </Note>


## OpenAPI

````yaml POST /api/terminate_connection/
openapi: 3.0.0
info:
  title: Employee List API
  description: Retrieve a paginated list of employees from the organization.
  version: 1.0.0
servers:
  - url: https://{env}.tartanhq.com
    description: Dynamic environment-based server
    variables:
      env:
        default: dev
security: []
paths:
  /api/terminate_connection/:
    post:
      summary: Terminate Connection
      description: Terminates an existing vendor-client connection.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - client_org
              properties:
                client_org:
                  type: string
                  description: The client organization's identifier to disconnect.
      responses:
        '200':
          description: Connection terminated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Connection terminated successfully
                  data:
                    type: string
                    nullable: true
        '400':
          description: Connection termination blocked due to sync in progress
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Connection cannot be terminated while sync is in progress
                  data:
                    type: string
                    nullable: true
        '401':
          description: Unauthorized - Authentication credentials were not provided
          content:
            application/json:
              schema:
                type: object
                properties:
                  requestId:
                    type: string
                    example: 9a0fe854-d7e9-468c-86a0-e2c34ffcdb6f
                  message:
                    type: string
                    example: Authentication credentials were not provided.
                  data:
                    type: string
                    nullable: true
        '404':
          description: Not Found - No organisation found with the given client_org
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 404
                  message:
                    type: string
                    example: No organisation found with the given client_org
                  data:
                    type: string
                    nullable: true
        '409':
          description: Conflict - Connection already terminated
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 409
                  message:
                    type: string
                    example: Conflict! Connection already terminated
                  data:
                    type: string
                    nullable: true
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  requestId:
                    type: string
                    example: 56c1db80-261f-4dc4-983a-2836a2fca024
                  message:
                    type: string
                    example: Internal Server Error
                  data:
                    type: string
                    nullable: true
      security:
        - TokenAuth: []
components:
  securitySchemes:
    TokenAuth:
      type: apiKey
      in: header
      name: Authorization

````