Update Messages and List Scheduled Messages

Learn to use Slack API calls to update messages and list scheduled messages.

Overview

There are instances where we may have to update a message already sent on the channel. For instance, we might want to update previous messages regarding the weather forecast with better, updated, and more accurate predictions. To update such messages, we’ll use the chat.update endpoint. We could also run a script with chat.scheduledMessages.list to update some already scheduled messages we might have set.

Let’s look at the following endpoints in this lesson:

  1. chat.update: This endpoint updates a message.
  2. chat.scheduledMessages.list: This endpoint returns a list of scheduled messages.

Update a message

To update a message, we’ll access the https://slack.com/api/chat.update endpoint. To update a message, we specify a previously sent message using its timestamp. There are multiple ways to obtain a message’s timestamp. However, for now, we’ll use the timestamp which is sent back to us as a response to posting a message using the chat.postMessage endpoint.

Some important query parameters for the chat.update endpoint are the following:

Get hands-on with 1200+ tech skills courses.