The difference in this use case from the earlier ones is that in this case, we already have a message that is in the correct format, but doesn't have the structure we need. For example, when we need to add information before sending the message to the backend, or when the response of the backend is similar to the response we need to reply to the client.
For modifying the content of the message, we can use Enrich mediator, Script mediator, XSLT mediator, FASTXSLT mediator, XQuery mediator, or Smooks mediator.