---
title: "Message deleted"
method: POST
path: "chat.message.deleted"
tags: ["Webhook Events"]
---

# Message deleted

`POST chat.message.deleted` (webhook)

A message was deleted. Its content is gone; the id stays as a tombstone.

## Headers

- `webhook-id` string, required
- `webhook-timestamp` string, required
- `webhook-signature` string, required

## Payload

- ChatMessageDeletedWebhookEvent: A message was deleted. Its content is gone; the id stays as a tombstone.
  - `id` string, required: Event id; the `webhook-id` header. The same on every retry: dedupe on it.
  - `type` 'chat.message.deleted', required
  - `timestamp` string, date-time, required: When the change happened
  - `organizationId` string, required
  - `actor` WebhookActor, required: Who caused the event: a member (`user`), an API key (`apiKeyId`), a creator, or viral.app itself (`system`); `surface` says where the change entered. Skip events your own API key caused to avoid loops.
    - `type` 'user' | 'api_key' | 'creator' | 'system', required
    - `surface` 'ui' | 'api' | 'copilot' | 'system', required
    - `userId` string, nullable, required
    - `apiKeyId` string, nullable, required
    - `impersonated` boolean, required
  - `data` object, required
    - `messageId` string, required
    - `chatId` string, required
    - `deletedAt` string, date-time, required
    - `thread` WebhookChatThread, required
      - `id` string, required
      - `kind` 'direct' | 'group', required
      - `creatorUserId` string, nullable, required
      - `orgCreatorId` string, nullable, required
      - `groupKind` 'manual' | 'campaign' | 'all', nullable, required
      - `title` string, nullable, required
      - `publicTitle` string, nullable, required
      - `campaignId` string, nullable, required

## Acknowledgement `200`

Any 2xx within 15 seconds acknowledges the event. Anything else, a timeout or a redirect is retried (10 attempts over about 3 days); 410 disables the endpoint.

---

[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)
