Update Messages and List Scheduled Messages

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

There are instances where we may have to update a message that has already been sent on the channel. For example, we might want to update previous messages regarding the weather forecast with better, updated, and more accurate predictions. We’ll use the chat.update endpoint to edit such messages. 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. We specify a previously sent message using its timestamp to edit it. There are multiple ways to obtain a message’s timestamp. However, for now, we’ll use the timestamp that is sent back to us as a response to posting a message using the chat.postMessage endpoint.

Request parameters

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

Get hands-on with 1200+ tech skills courses.