# Delete a message

`POST /chat.delete`

## Description

Delete a previously posted bot message. The bot must own the message being deleted (matched by address ID). Personal access tokens always send as their bot persona and may only delete messages that personal bot posted.

Deleting an already-deleted message is idempotent and returns success.

**Access:** Organization and Personal.

**Required scope:** `chat:send_message` or `chat:write`

---

**OpenAPI Spec:** [chat-v1.json](https://developer.ro.am/chat-v1.json)

## Authentication

```
Authorization: Bearer YOUR_API_KEY
```

## Request Body

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `chatId` | string | Yes | ID of the chat containing the message. |
| `timestamp` | integer | Yes | Timestamp of the message to delete. |
| `threadTimestamp` | integer | No | Thread timestamp, if the message is in a thread. |

## Responses

### 200 - Message deleted successfully

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `chatId` | string | No | ID of the chat. |
| `timestamp` | integer | No | Timestamp of the deleted message. |
| `threadTimestamp` | integer | No | Thread timestamp, if the message was in a thread. |


#### Example Response

```json
{
  "chatId": "757dfe66-37b4-4772-baa5-8c86ec68c176",
  "timestamp": 1765602474760032
}
```

### 400 - Bad request. Common causes:
- Invalid chat ID
- Invalid or missing `timestamp`
- A `sender` field was provided — the sender is derived from the original message (see [Sender Profiles](/docs/guides/sender-profiles))
- Bot does not own the message


### 401 - Presented invalid authentication credentials.

### 403 - Forbidden. The bot lacks access to the target chat.


### 405 - An unsupported method was requested.

### 500 - An internal error occurred.

---

*Machine-readable API documentation.*
*Full documentation: https://developer.ro.am/docs/api/chat-delete*
