You can only replace the complete message, not just a part.
There are two options to update the original message:
-
Respond to the Slack request with
{"replace_original": true}
-
Use
chat.update
If your original message was not of type ephemeral
you will get a copy of the original message as part of the payload from Slack in the original_message
property, which can be helpful to update the exchange the original message.
See this page in the Slack documentation as reference.