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

# Delete

> Delete a CometChat bot by UID with the REST API and confirm the removal from the response.

Deleting a bot removes the bot and its webhook configuration. **The underlying user is not deleted** — the UID stays in your app as an ordinary [User](https://www.cometchat.com/docs/rest-api/users.md), and its messages remain. To remove the user as well, call the [Delete User API](https://www.cometchat.com/docs/rest-api/users/delete.md) afterwards.

A later [Get Bot](https://www.cometchat.com/docs/rest-api/bots/get.md) call for the same UID returns `ERR_BOT_NOT_FOUND`.

To stop a bot temporarily without deleting it, set `enabled` to `false` with the [Update Bot API](https://www.cometchat.com/docs/rest-api/bots/update.md).

For the complete error reference, see [Error Guide](https://www.cometchat.com/docs/articles/error-guide.md).


## OpenAPI

````yaml delete /bots/{uid}
openapi: 3.0.0
info:
  title: Chat APIs
  description: Manage messages, users, groups for a particular app using our Chat API.
  version: '3.0'
servers:
  - url: https://{appId}.api-{region}.cometchat.io/v3
    variables:
      appId:
        default: appId
        description: (Required) App ID
      region:
        enum:
          - us
          - eu
          - in
        default: us
        description: Select Region
security: []
tags:
  - name: API Keys
    description: The API keys are used to authorise the APIs
  - name: Roles
    description: The roles are used to give user access rights
  - name: Users
    description: The REST collection for users.
  - name: Bots
    description: The bots relay messages from your app to a webhook.
  - name: Auth Tokens
    description: The auth tokens are used to login end users using client SDKs.
  - name: Blocked Users
    description: The REST collections for blocked users.
  - name: Friends
    description: List,add and remove friends by passing UID in path variables
  - name: Groups
    description: The REST collections for groups.
  - name: Banned Users
    description: Ban and Unban user by passing other UID in path variables.
  - name: Group Members
    description: The REST collections for group members.
  - name: Messages
    description: The REST collections for messages.
  - name: Conversations
    description: The REST collections for conversations.
  - name: Restrict Features
    description: Allows Restricting Features
  - name: Metrics
    description: Allows accessing Data Metrics
  - name: Triggers
    description: Allows adding triggers to a webhook.
  - name: Webhooks
    description: Allows accessing Webhooks.
  - name: Notifications
    description: Allows configuring Notifications core.
  - name: Moderation
    description: The REST collections for Moderations.
paths:
  /bots/{uid}:
    delete:
      tags:
        - Bots
      summary: Delete
      description: Deletes a bot for the specified UID
      operationId: delete-bot
      parameters:
        - name: uid
          in: path
          description: An UID of a bot.
          required: true
          schema:
            type: string
          examples:
            string:
              summary: UID
              value: ''
      responses:
        '200':
          description: Deleted Bot
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: object
                type: object
              example:
                data:
                  success: true
                  message: A bot with uid support-bot has been removed successfully.
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      description: API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).
      name: apikey
      in: header

````

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