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

# Disable webchat auto-conversion

> Stops a webchat session from automatically converting into a lead. Use it once your own team has taken the visitor over, for example after a [webchat transfer](/webhooks/webchat/call-transferred), so Apten doesn't follow up by SMS or call.

If the session has already converted, nothing changes and the response returns the lead's ID as `leadId`. Use [Turn off a lead](/api-reference/leads/turn-off) to stop Apten for that lead instead.

A visitor can still ask to be contacted from the chat itself; this only stops the automatic conversion after inactivity.




## OpenAPI

````yaml post /webchat/sessions/{sessionId}/disableAutoConversion
openapi: 3.0.1
info:
  title: AttentPublicAPI
  version: '2024-05-17T21:09:13Z'
servers:
  - url: https://api.attent.app/v1
security: []
paths:
  /webchat/sessions/{sessionId}/disableAutoConversion:
    post:
      description: >
        Stops a webchat session from automatically converting into a lead. Use
        it once your own team has taken the visitor over, for example after a
        [webchat transfer](/webhooks/webchat/call-transferred), so Apten doesn't
        follow up by SMS or call.


        If the session has already converted, nothing changes and the response
        returns the lead's ID as `leadId`. Use [Turn off a
        lead](/api-reference/leads/turn-off) to stop Apten for that lead
        instead.


        A visitor can still ask to be contacted from the chat itself; this only
        stops the automatic conversion after inactivity.
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
          description: >-
            The ID of the webchat session, as sent in webchat webhook events
            (`data.sessionId`).
      responses:
        '200':
          description: Auto-conversion is disabled, or the session had already converted.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  converted:
                    type: boolean
                    description: >-
                      `true` if the session had already converted into a lead,
                      in which case nothing was changed.
                  leadId:
                    type: string
                    nullable: true
                    description: >-
                      The ID of the lead the session converted into, or `null`
                      if it has not converted.
              examples:
                disabled:
                  summary: Auto-conversion disabled
                  value:
                    message: Auto-conversion disabled.
                    converted: false
                    leadId: null
                alreadyConverted:
                  summary: Session had already converted
                  value:
                    message: Webchat session has already converted.
                    converted: true
                    leadId: d8f5f5c2-3c1e-4c3b-9f43-2a7e1b6f0c11
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                example:
                  message: 'Missing field: sessionId'
        '403':
          $ref: '#/components/responses/403'
        '404':
          description: Webchat session not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                example:
                  message: 'Resource not found: Webchat session'
        '500':
          $ref: '#/components/responses/500'
      security:
        - api_key: []
components:
  responses:
    '403':
      description: Forbidden API key
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
            example:
              message: Forbidden
    '500':
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
            example:
              message: Internal Server Error
  securitySchemes:
    api_key:
      type: apiKey
      name: x-api-key
      in: header

````

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