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

# Delete Message

Deletes a specific message from a thread.

<Warning>
  Deleting messages may affect conversation context for future agent responses.
</Warning>

<ParamField path="threadId" type="string" required>
  The unique thread identifier (UUID)
</ParamField>

<ParamField path="messageId" type="string" required>
  The unique message identifier
</ParamField>

<ResponseField name="success" type="boolean" required>
  Whether the deletion was successful
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE https://your-worker.workers.dev/api/threads/550e8400-e29b-41d4-a716-446655440000/messages/msg_001
  ```

  ```typescript JavaScript theme={null}
  const response = await fetch(
    'https://your-worker.workers.dev/api/threads/550e8400-e29b-41d4-a716-446655440000/messages/msg_001',
    { method: 'DELETE' }
  );
  const result = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true
  }
  ```

  ```json 404 theme={null}
  {
    "error": "Message not found"
  }
  ```
</ResponseExample>
