Thanks for reaching out to Q&A.
Formatting/describing the request and response body can be done from Swagger. Please refer the below articles
https://swagger.io/resources/articles/documenting-apis-with-swagger/
https://swagger.io/docs/specification/2-0/describing-request-body/
Swagger API can be imported to APIM via Open API specification
I hope this helps! Feel free to reach out to me if you have any queries or concerns.
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.