Send a message in one of your community chat rooms
Send a root message into one chat room, as you, the creator — a channel-linked room, or a direct-message room you're personally a participant in. This always sends as you; there's no way to send on behalf of a specific member through this endpoint.
message is required and must be non-empty, even for an asset- or poll-only message — the underlying message record requires text; there is no text-free message type.
assetIds (optional, at most 10) must each already belong to you, from your own upload flow — an id you do not own fails with an error, not a silent skip. Each asset must also be at most 50MB — tighter than the general upload endpoint's own 100MB-per-file limit, matching the chat client's own cap; an oversized asset fails the whole send, not just that one attachment.
poll (optional) attaches a poll to the message. Only valid in a channel-linked room — including it for a direct-message room fails with a 400, since polls aren't supported there. pollOptions takes 2 to 5 entries (matching the dashboard's own cap), each at most 30 characters. pollEndAt must be strictly after the moment the request is received — a past or current timestamp fails with a 400.
This is root-message-send only: there's no way to reply into a thread through this endpoint.
Side effects on a successful send mirror the app: the room's own preview updates, you are marked as having seen your own message, a push notification goes to the room's other participant(s) (if push is configured for your community), and the message counts toward the channel's daily engagement stats. Sending a message never earns you gamification points — messaging in your own room never does, whether from the app or here.
Fails with a 400 if the Community feature is not enabled for this creator, if a poll is given for a direct-message room (errorCode: CHAT_MESSAGE_SEND_POLL_NOT_ALLOWED_IN_DM), if the room's other participant has stopped receiving messages from you (errorCode: CHAT_MESSAGE_SEND_RECEIVER_STOPPED_RECEIVING), if poll.pollEndAt is not strictly in the future (errorCode: CHAT_MESSAGE_SEND_POLL_END_DATE_NOT_IN_FUTURE), or if any attached asset exceeds 50MB (errorCode: TM_CLOUD_UPLOAD_FILE_SIZE_EXCEEDED). Fails with a 404 (errorCode: CHAT_MESSAGE_SEND_ROOM_NOT_FOUND) if roomId does not exist or is not yours to send into.
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.
Authorization
bearer In: header
Header Parameters
Host name of the dashboard, ex: mydomain.tagmango.com
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api-prod-new.tagmango.com/api/v1/external/community/chatrooms/{roomId}/messages" \ -H "x-whitelabel-host: string" \ -H "Content-Type: application/json" \ -d '{ "message": "Hello there!" }'{
"message": {
"_id": "6659ca9e5f2acb7abfdcd8fd",
"room": "6659ca9e5f2acb7abfdcd8fd",
"message": "Hello, how are you?",
"edited": true,
"isDeleted": true,
"lastEditedAt": "2021-08-01T00:00:00.000Z",
"isThreadRoot": true,
"threadRoot": "6659ca9e5f2acb7abfdcd8fd",
"threadRootMetadata": {
"firstFiveRepliers": [
"6659ca9e5f2acb7abfdcd8fd"
],
"totalReplies": 5,
"lastRepliedAt": "2021-08-01T00:00:00.000Z",
"lastReply": "6659ca9e5f2acb7abfdcd8fd"
},
"reactions": {
"😄": 5,
"🚀": 2,
"❤️": 10
},
"createdAt": "2021-08-01T00:00:00.000Z",
"updatedAt": "2021-08-01T00:00:00.000Z",
"poll": "6659ca9e5f2acb7abfdcd8fd",
"pollMetadata": {
"creator": "6659ca9e5f2acb7abfdcd8fd",
"question": "What is your favorite color?",
"description": "Choose your favorite color",
"pollOptions": [
{
"optionContent": "string",
"optionNumber": 0,
"optionId": "string"
}
],
"pollEndAt": "2021-08-01T00:00:00.000Z",
"pollVotesPerOption": {
"id1": 5,
"id2": 2,
"id3": 10
},
"isResultVisibleToMembers": true,
"allowVoteChange": true,
"pollStartAt": "2021-08-01T00:00:00.000Z"
},
"sender": {
"name": "John Doe",
"profilePicUrl": "https://linktoprofilepic.com/pic.jpg",
"_id": "6659ca9e5f2acb7abfdcd8fd",
"isModerator": false
},
"assets": [
{
"asset": "6659ca9e5f2acb7abfdcd8fd",
"type": "image",
"contentUrl": "https://example.com/image.jpg",
"fileName": "filename.jpg",
"fileSize": 1024,
"fileType": "jpg"
}
]
}
}{
"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
}