RecoupGet a Free AuditFree Audit

API REFERENCE

Delete Chat

On this page
DELETE/api/chats

Delete a chat room by ID. This operation also removes related room records (memory emails, memories) before deleting the room itself.

Authentication

See the authentication guide for API key and account access requirements.

Request

cURL
curl --request DELETE \
  --url 'https://api.recoupable.dev/api/chats' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "YOUR_ID"
}'

Request body required

Chat deletion parameters

application/json

idstringrequired

The unique identifier (UUID) of the chat room to delete.

format: uuid

Responses

200Chat deleted successfully

application/json

statusstring · enumrequired

Status of the request

Values: "success"

idstringrequired

The UUID of the deleted chat room.

format: uuid

messagestringrequired

Success message describing the deletion result.

400Bad request - invalid parameters or validation error

application/json

statusstring · enumrequired

Status of the request

Values: "error"

errorstringrequired

Error message describing what went wrong.

401Unauthorized - invalid or missing API key

application/json

errorintegerrequired

format: int32

messagestringrequired
403Forbidden - API key does not have access to this chat

application/json

errorintegerrequired

format: int32

messagestringrequired
404Not found - chat room does not exist

application/json

statusstring · enumrequired

Status of the request

Values: "error"

errorstringrequired

Error message describing what went wrong.

500Server error - failed to delete chat

application/json

statusstring · enumrequired

Status of the request

Values: "error"

errorstringrequired

Error message describing what went wrong.

Full specification

Download the OpenAPI file for complete schemas, constraints, and examples.

Download research.json
View operation source
json
{
  "description": "Delete a chat room by ID. This operation also removes related room records (memory emails, memories) before deleting the room itself.",
  "requestBody": {
    "description": "Chat deletion parameters",
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/DeleteChatRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Chat deleted successfully",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/DeleteChatResponse"
          }
        }
      }
    },
    "400": {
      "description": "Bad request - invalid parameters or validation error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/DeleteChatErrorResponse"
          }
        }
      }
    },
    "401": {
      "description": "Unauthorized - invalid or missing API key",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden - API key does not have access to this chat",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Not found - chat room does not exist",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/DeleteChatErrorResponse"
          }
        }
      }
    },
    "500": {
      "description": "Server error - failed to delete chat",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/DeleteChatErrorResponse"
          }
        }
      }
    }
  }
}