Grape’s after blocks don’t allow you to modify response text or status code [#200]. So how can you wrap an API response?
Define a Rack middleware and mount it in the API. Here’s an example of a decorator that wraps any body and resets the status code to 200.
You can see a working sample with API_v4_Decorator mounted in API_v4 in https://github.com/dblock/grape-on-rack.
This works with all kinds of Rack applications, not just Grape.