TagMangoTagMango Docs
Community

Delete a message in one of your community chat rooms

DELETE
/api/v1/external/community/chatrooms/{roomId}/messages/{messageId}

Permanently delete a message you, the creator, own the room for — a root message or a reply, in a channel-linked or direct-message room. Unlike editing, you can delete ANY message in your own room, not just ones you personally sent, matching the dashboard's own creator-bypass rule.

This is a hard delete: the message is permanently removed, not just marked deleted. Deleting a root message that has replies also permanently deletes every one of those replies — there is no way to delete a thread root while keeping its replies around.

If the deleted message was pinned, it's automatically unpinned. If it was the room's most recent message, the room's preview automatically falls back to the next most recent one (or clears entirely if none remain). If the deleted message was a reply, its thread's reply count and related bookkeeping on the root message update accordingly.

Everything attached to the deleted message is cleaned up too, for every message removed (the target itself, and every reply cascaded with it if it was a thread root). If it had a poll, the poll and everyone's votes on it are deleted. Reactions on it are removed. Its attachments are deleted from storage — except a photo or video that's also attached to a different message you still have, which is left alone so that other message keeps its attachment.

Fails with a 400 if the Community feature is not enabled for this creator. Fails with a 404 (errorCode: CHAT_MESSAGE_SEND_ROOM_NOT_FOUND) if roomId does not exist or is not yours, or (errorCode: CHAT_MESSAGE_SEND_MESSAGE_NOT_FOUND) if messageId doesn't exist or belongs to a different room.

External access policy

An API key and an authorized white-label host are required. Both tier and plan requirements are enforced.

These requirements apply to the white-label creator for backend-to-backend access. TagMango platform access is not supported.

  • Plans: Unrestricted.

  • Tiers: Unrestricted.

AuthorizationBearer <token>

In: header

Path Parameters

roomId*string

Id of the community chat room the message belongs to

messageId*string

Id of the message to delete

Header Parameters

x-whitelabel-host*string

Host name of the dashboard, ex: mydomain.tagmango.com

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://api-prod-new.tagmango.com/api/v1/external/community/chatrooms/61e97c146cf2b4d8c68f3a40/messages/61e97c146cf2b4d8c68f3a4a" \  -H "x-whitelabel-host: string"
Empty
{
  "code": 400,
  "type": "Bad Request",
  "statusMessage": "BAD_REQUEST",
  "success": false,
  "message": "Invalid request",
  "result": "Invalid request"
}
{
  "code": 401,
  "type": "Unauthorized",
  "statusMessage": "UNAUTHORIZED",
  "message": "Invalid token",
  "result": "Invalid token",
  "success": false
}
{
  "code": 403,
  "type": "Forbidden",
  "statusMessage": "FORBIDDEN",
  "errorCode": "WORKSHOP_MANGO_FORBIDDEN",
  "message": "You can not access this api with a TagMango account, only available for whitelabel hosts",
  "result": "You can not access this api with a TagMango account, only available for whitelabel hosts",
  "success": false
}
{
  "code": 429,
  "type": "Too Many Requests",
  "statusMessage": "TOO_MANY_REQUESTS",
  "message": "Request limit exceeded. try after 10 seconds",
  "result": "Request limit exceeded. try after 10 seconds",
  "success": false
}