Response body is optional and can be returned.
**_13.2.1. PUT Services MAY enable PUT requests for entity creation.
PUT https://api.contoso.com/v1.0/databases/db1 In this scenario the databases segment is processing the PUT operation.
HTTP/1.1 202 Accepted Operation-Location: https://api.contoso.com/v1.0/operations/123 For services that need to return a 201 Created here, use the hybrid flow described below.
The 202 Accepted should return no body. The 201 Created case should return the body of the target resource._**
Please find additional notes that body is optional:
According to the HTTP/1.1 specification (RFC 7231), the 202 Accepted status code is optional when it comes to including a response body. The decision to include a response body depends on the specific use case and the API design.
When you choose to include a response body with a 202 Accepted response, it is typically used to provide additional information about the ongoing process or to give details on how to track the progress of the operation. This might include a status message or a reference to a resource that provides the current status of the operation.
If you decide to include a response body, it is important to ensure that the response is properly documented in your API documentation so that clients know what to expect and how to handle the response.