you can use the default http response header or else you can create a header of your own and hook in the total response of the Request and you can send
You can find the documentation on https://docs.mendix.com/refguide/published-rest-operation
“To set the status code, reason phrase, and headers, add an HttpResponse object parameter and set the attributes of that object, or return an HttpResponse.“