In WSO2, a mediator is a piece of code that has a logical behavior and a final purpose for using it, having an XML structure. By default, we have a list of mediators that we can use Out of the Box, but we can also develop a custom mediator to extend the default functionality.
When we have a set of mediators that perform an action together, it's called sequences: We can use it in Proxies and APIs.