---
title: "Delete a chat message"
method: DELETE
path: "/chat/threads/{chatId}/messages/{messageId}"
tags: ["Chat"]
---

# Delete a chat message

`DELETE /chat/threads/{chatId}/messages/{messageId}`

## Request

- Base URL: `https://viral.app/api/v1`
- URL: `https://viral.app/api/v1/chat/threads/{chatId}/messages/{messageId}`
- Auth: API key in header `x-api-key`

Deletes a message for everyone: participants see a removed-message placeholder instead of its text and files, and a pin on it is lifted. File URLs already handed out keep working. An API key can delete only the messages that same key sent. Messages typed in the dashboard (its owner's included), messages another key sent and system messages return 400.

## Path parameters

- `chatId` string, required
- `messageId` string, required

## Response `200`

OK

- object
  - `chatId` string, required
  - `messageId` string, required
  - `deletedAt` string, date-time, required

## Other responses

- `400`: 400
- `401`: 401
- `402`: 402
- `404`: 404
- `408`: 408
- `429`: 429
- `500`: 500

---

[API](https://skmtc.dev/viral/apis/viral-app-api.md) · [All operations](https://skmtc.dev/viral/apis/viral-app-api/llms.txt) · [OpenAPI document](https://skmtc.dev/viral/apis/viral-app-api/revisions/31e97fa79ef1?raw)
