# How to send a admin message in group channel using chat.js or via API

**URL:** <https://community.sendbird.com/t/how-to-send-a-admin-message-in-group-channel-using-chat-js-or-via-api/1343>\
**Category:** Miscellaneous\
**Tags:** group-channel, admin-invitation, chatsdk, js\
**Created:** [December 1, 2020, 10:56am UTC](https://community.sendbird.com/t/how-to-send-a-admin-message-in-group-channel-using-chat-js-or-via-api/1343 "2020-12-01T10:56:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajeev\_Bhaskaran](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/rajeev_bhaskaran/32/512_2.png) [@Rajeev\_Bhaskaran](https://community.sendbird.com/u/Rajeev_Bhaskaran)\
**Post date:** [December 1, 2020, 10:56am UTC](https://community.sendbird.com/t/how-to-send-a-admin-message-in-group-channel-using-chat-js-or-via-api/1343/1 "2020-12-01T10:56:39Z")

</div>

where can i see the documentation to send admin message in group channel.

How can i do it chat.js or via API call.?

---

<div class="post-metadata">

**Author:** ![walter.rodriguez](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/walter.rodriguez/32/546_2.png) [@walter.rodriguez](https://community.sendbird.com/u/walter.rodriguez)\
**Post date:** [December 1, 2020, 11:28am UTC](https://community.sendbird.com/t/how-to-send-a-admin-message-in-group-channel-using-chat-js-or-via-api/1343/2 "2020-12-01T11:28:25Z")

</div>

I guess this can help:

> **[Messages | Chat Platform API | Sendbird Docs](https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-send-a-message)**
>
> Learn about the three types of messages: text, file or admin messages.

When you send a message you can specify **message\_type**

 ![Screenshot 2020-12-01 at 11.24.11](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/1X/b202115d5673bfe47df9628dc7c8c49e0b575f86.png)

Something like:

```auto
POST /v3/group_channels/test-channel/messages

```

Body:

```auto
{
    "message_type": "ADMM",
    "message": "message from Admin"
}

```

Don’t forget you Api-Token in your headers.

---

<div class="post-metadata">

**Author:** ![Rajeev\_Bhaskaran](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/rajeev_bhaskaran/32/512_2.png) [@Rajeev\_Bhaskaran](https://community.sendbird.com/u/Rajeev_Bhaskaran)\
**Post date:** [December 1, 2020, 12:03pm UTC](https://community.sendbird.com/t/how-to-send-a-admin-message-in-group-channel-using-chat-js-or-via-api/1343/3 "2020-12-01T12:03:40Z")

</div>

Hi,

Thanks for the help. i was able to post the admin message.

i have one more question. In the admin message i dont see the timestamp. is it possiblt to add the timestamp in the admin message?

what are the various custom\_type in admin message?

Thanks

---

<div class="post-metadata">

**Author:** ![walter.rodriguez](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/walter.rodriguez/32/546_2.png) [@walter.rodriguez](https://community.sendbird.com/u/walter.rodriguez)\
**Post date:** [December 1, 2020, 12:37pm UTC](https://community.sendbird.com/t/how-to-send-a-admin-message-in-group-channel-using-chat-js-or-via-api/1343/4 "2020-12-01T12:37:35Z")

</div>

The only parameter I can help pointing out is: **created\_at**

Specifies the time that the message was sent, in [Unix milliseconds](https://sendbird.com/docs/chat/v3/platform-api/guides/miscellaneous#2-timestamps) format. This property can be used when migrating the messages of other system to Sendbird server. If specified, the server sets the time of message creation as the property value.

```auto
const d = new Date('2020-11-30');
var millisecs = d.getTime(); // This will result in something like: 1606694400000

```

You body would be:

```auto
{
    "message_type": "ADMM",
    "message": "message from Admin on 2020-11-30",
    "created_at": 1606694400000
}

```

In your message list you will see this message listed according to this date.

Then, **custom\_type** is a field you can populate with any value you need. The length is limited to 128 characters.

---

<div class="post-metadata">

**Author:** ![Rajeev\_Bhaskaran](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/rajeev_bhaskaran/32/512_2.png) [@Rajeev\_Bhaskaran](https://community.sendbird.com/u/Rajeev_Bhaskaran)\
**Post date:** [December 2, 2020, 4:56am UTC](https://community.sendbird.com/t/how-to-send-a-admin-message-in-group-channel-using-chat-js-or-via-api/1343/5 "2020-12-02T04:56:09Z")

</div>

Hi,

after posting the admin message, i could see that message, but after some time it got disappeared. any reason?

Thanks

---

<div class="post-metadata">

**Author:** ![janna-sendbird](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/janna-sendbird/32/963_2.png) [@janna-sendbird](https://community.sendbird.com/u/janna-sendbird)\
**Post date:** [December 11, 2020, 9:42pm UTC](https://community.sendbird.com/t/how-to-send-a-admin-message-in-group-channel-using-chat-js-or-via-api/1343/6 "2020-12-11T21:42:32Z")

</div>

@Rajeev_Bhaskaran Thanks again for filing a support ticket with our team to help us find a solution together! 😀

For any community members interested in this post and struggling to see admin messages in chat, please consider the message querying options ( the [createPreviousMessageListQuery()](https://sendbird.com/docs/chat/v3/javascript/guides/group-channel#2-load-previous-messages) or the [getPreviousMessagesByTimestamp()](https://sendbird.com/docs/chat/v3/javascript/guides/group-channel#2-load-messages-by-timestamp-or-message-id) methods) or message rendering options (render handling of user message vs. file message vs. admm message) in the client application.

If you’re a Sendbird customer and would like to explore your case with us further, please don’t hesitate to contact support through the Sendbird Dashboard as well!
