A JSON-based array of structured attachments, presented as a URL-encoded string. This field is required when not presenting text. If you don't include this field, the message's previous attachments will be retained. To remove previous attachments, include an empty array for this field.
A JSON-based array of structured blocks, presented as a URL-encoded string. If you don't include this field, the message's previous blocks will be retained. To remove previous blocks, include an empty array for this field.
Change how messages are treated. Defaults to client, unlike chat.postMessage. Accepts either none or full. If you do not specify a value for this field, the original value set for the message will be overwritten with the default, client.
This method supports application/json via HTTP POST. Present your token in your request's Authorization header. Learn more.
Valid message types
Only messages posted by the authenticated user are able to be updated using this method. This includes regular chat messages, as well as messages containing the me_message subtype. Bot users may also update the messages they post.
Attempting to update other message types will return a cant_update_message error.
To use chat.update with a bot user token, you'll need to think of your bot user as a user, and pass as_user set to true while editing a message created by that same bot user.
Typical success response
"text": "Updated text you carefully authored",
"text": "Updated text you carefully authored",
Typical error response
The response includes the text, channel and timestamp properties of the
updated message so clients can keep their local copies of the message in sync.
Updating interactive messages
If you're posting an interactive message, you may use chat.update to continue updating ongoing state changes around a message. Provide the ts field the message you're updating and follow the bot user instructions above to update message text, and remove or add blocks.
This table lists the expected errors that this method could return. However, other errors can be returned in the case where the service is down or other unexpected factors affect processing. Callers should always check the value of the ok params in the response.
No message exists with the requested timestamp.
Authenticated user does not have permission to update this message.
Internal update failure.
Value passed for channel was invalid.
Team associated with the message and channel could not be found.
The message cannot be edited due to the team message edit settings
Message text is too long
Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message.
No message text provided
The as_user parameter does not function with workspace apps.
The message cannot be edited within a frozen, archived or deleted channel.
The blocks were invalid for the requesting user.
The attachments were invalid.
The channel is in the process of migrating and so the message cannot be updated at this time.
No authentication token provided.
Some aspect of authentication cannot be validated. Either the provided token is invalid or the request originates from an IP address disallowed from making the request.
Authentication token is for a deleted user or workspace.
Authentication token is for a deleted user or workspace or the app has been removed.
The workspace token used in this request does not have the permissions necessary to complete the request. Make sure your app is a member of the conversation it's attempting to post a message to.
The workspace is undergoing an enterprise migration and will not be available until migration is complete.
Administrators have suspended the ability to post a message.
The token used is not granted the specific scope permissions required to complete this request.
The method was called with invalid arguments.
The method was passed an argument whose name falls outside the bounds of accepted or expected values. This includes very long names and names with non-alphanumeric characters other than _. If you get this error, it is typically an indication that you have made a very malformed API call.
The method was called via a POST request, but the charset specified in the Content-Type header was invalid. Valid charset names are: utf-8iso-8859-1.
The method was called via a POST request with Content-Typeapplication/x-www-form-urlencoded or multipart/form-data, but the form data was either missing or syntactically invalid.
The method was called via a POST request, but the specified Content-Type was invalid. Valid types are: application/jsonapplication/x-www-form-urlencodedmultipart/form-datatext/plain.
The method was called via a POST request and included a data payload, but the request did not include a Content-Type header.
The workspace associated with your request is currently undergoing migration to an Enterprise Organization. Web API and other platform operations will be intermittently unavailable until the transition is complete.
The method was called via a POST request, but the POST data was either missing or truncated.
The server could not complete your operation(s) without encountering a catastrophic error. It's possible some aspect of the operation succeeded before the error was raised.
The server could not complete your operation(s) without encountering an error, likely due to a transient issue on our end. It's possible some aspect of the operation succeeded before the error was raised.
This table lists the expected warnings that this method will return. However, other warnings can be returned in the case where the service is experiencing unexpected trouble.
The method was called via a POST request, and recommended practice for the specified Content-Type is to include a charset parameter. However, no charset was present. Specifically, non-form-data content types (e.g. text/plain) are the ones for which charset is recommended.
The method was called via a POST request, and the specified Content-Type is not defined to understand the charset parameter. However, charset was in fact present. Specifically, form-data content types (e.g. multipart/form-data) are the ones for which charset is superfluous.