OutSystems uses a set of built-in HTTP Status Codes in the Responses of your exposed REST API Methods.
However, there are situations where you might want to send a different HTTP Status Code. For example, when a record is successfully created, it's common to use the "201 Created" Status Code.
To set a different HTTP Status Code in the Response, do the following:
- Go to "Manage Dependencies..." and add the SetStatusCode action of the HTTPRequestHandler extension;
- Use the SetStatusCode action in your REST API Method or callback flow right before the end node;
- Set its StatusCode property to the desired status code.