Is there a way to customise REST API response for post request?

When I try to create a document through API the provide a document data as response. Is there a way to customize that response and add or remove data?