Search code examples
apipostmanapi-doc

Why api response body is not showing in postman app generated documentation?


I am testing apis usng postman continuously and then generating api documentation using postman app.

But problem is that documentation is not displaying api response which i am receiving in postman console. Here is the response which i am receiving for most of my apis

enter image description here

How can i get response body also in my api documentation?


Solution

  • If the request has been saved to a collection, You can use the Save as example feature, found to the top right of the response body. This will open the example builder and once saved, this response body will be shown against the request on your API documentation.

    enter image description here

    More details of how that works can be found here:

    https://learning.getpostman.com/docs/postman/collections/examples/#how-your-examples-appear-in-postman-documentation