# Delete Message

Deletes a specific message from a thread.
Deleting an assistant message also deletes its tool-result messages.
The runtime attempts to remove attachment files for all deleted messages.
Deleting a queued message cancels its delivery.
The route sends no deletion frame on the thread stream.

> **Warning:**
>
> Deleting messages may affect conversation context for future agent responses.

- threadId (string), required

  The unique thread identifier (UUID)

* messageId (string), required

  The unique message identifier

- success (boolean), required

  Whether the deletion was successful

```bash cURL
curl -X DELETE https://your-worker.workers.dev/api/threads/550e8400-e29b-41d4-a716-446655440000/messages/msg_001 \
  -H "Authorization: Bearer $STANDARD_AGENTS_API_KEY"
```

```typescript JavaScript
const response = await fetch(
  'https://your-worker.workers.dev/api/threads/550e8400-e29b-41d4-a716-446655440000/messages/msg_001',
  { method: 'DELETE', headers: { Authorization: `Bearer ${token}` } }
);
const result = await response.json();
```

```json 200
{
  "success": true
}
```

```json 404
{
  "error": {
    "code": "not_found",
    "message": "Message not found"
  },
  "requestId": "0b3c1f0e-7f0a-4a55-9c58-2f6f5a0f6f0e"
}
```
