# Adding Data Models inside API Documentations

**URL:** <https://community.postman.com/t/adding-data-models-inside-api-documentations/3947>\
**Category:** Help Hub\
**Tags:** api-documentation\
**Created:** [January 30, 2019, 11:42am UTC](https://community.postman.com/t/adding-data-models-inside-api-documentations/3947 "2019-01-30T11:42:33Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![kshitizshankar](https://avatars.discourse-cdn.com/v4/letter/k/b19c9b/32.png) [@kshitizshankar](https://community.postman.com/u/kshitizshankar)\
**Post date:** [January 30, 2019, 11:42am UTC](https://community.postman.com/t/adding-data-models-inside-api-documentations/3947/1 "2019-01-30T11:42:33Z")

</div>

How do I add Data Model documentation to my APIs inside postman?

One of the examples I see for good documentation reference is [https://apidocs.imgur.com/](https://apidocs.imgur.com/) So for example, under Account, they have " **Response Model: Account**" which links back to their API docs at [https://api.imgur.com/models/account](https://api.imgur.com/models/account)

I am not really sure how to do this inside Postman or whether it can even be done?

Feels like a common use case but couldn’t find any documentation around how to do this properly in Postman.

---

<div class="post-metadata">

**Author:** ![john-paul](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/john-paul/32/919_2.png) [@john-paul](https://community.postman.com/u/john-paul)\
**Post date:** [February 1, 2019, 7:20pm UTC](https://community.postman.com/t/adding-data-models-inside-api-documentations/3947/2 "2019-02-01T19:20:42Z")

</div>

Hey KS! Everything you need to know about creating documentation using Postman can be found on our Learning Center. I recommend checking out the following two articles to get started:

- [Intro to API documentation](https://learning.getpostman.com/docs/postman/api_documentation/intro_to_api_documentation/#___gatsby)
- [How to document using Markdown](https://learning.getpostman.com/docs/postman/api_documentation/how_to_document_using_markdown)

---

<div class="post-metadata">

**Author:** ![kshitizshankar](https://avatars.discourse-cdn.com/v4/letter/k/b19c9b/32.png) [@kshitizshankar](https://community.postman.com/u/kshitizshankar)\
**Post date:** [February 1, 2019, 7:33pm UTC](https://community.postman.com/t/adding-data-models-inside-api-documentations/3947/3 "2019-02-01T19:33:55Z")

</div>

Hey @john-paul  
Thanks for the reply!

OK - So I get the part about the Markdown and being able to add rich content.

My question was regarding - [https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/anchor-id.png](https://s3.amazonaws.com/postman-static-getpostman-com/postman-docs/anchor-id.png)

In that Image - I get that I can add markdown for “Response Model: **Album** ” and add a hyperlink to it similar to Imgur. Can it be done directly inside Postman?

[Edit: Or rather - is there a “best practice” that is used to do this? Right now, I am using a folder and adding model documentation in that description. It feels like a hack so I am not sure if I missed something obvious.]

(Even the Imgur site links it to an older section of their documentation at [https://api.imgur.com/models/gallery\_image](https://api.imgur.com/models/gallery_image))

---

<div class="post-metadata">

**Author:** ![john-paul](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/john-paul/32/919_2.png) [@john-paul](https://community.postman.com/u/john-paul)\
**Post date:** [February 1, 2019, 9:55pm UTC](https://community.postman.com/t/adding-data-models-inside-api-documentations/3947/4 "2019-02-01T21:55:28Z")

</div>

No problem, @kshitizshankar. 🙂

I believe I see what you mean – yes, this can be done directly inside Postman!

There’s [another thread](https://community.postman.com/t/how-to-create-anchor-tag-markdown-in-postman/1276) which goes over this in pretty good detail. Basically, if you click on a folder or request on your docs page, then check your address bar, you’ll see the unique tag for it at the end of the URL.

_Example:_

> **[Anchor tags in Postman documentation](https://documenter.getpostman.com/view/5293839/Rztms92o#%60c892f021-30c4-4595-9e9d-c877b4423352%60)**
>
> This page provides examples of anchor tag usage in Postman documentation!
> 
> \# Section Headings
> Large section headings will show up in the left-hand nav bar, and can also be linked to using Markdown as shown below.
> 
> \`\[Large...

You can then link directly to this `id` anywhere else in the page using the following Markdown syntax:

`[Link Text](#abcdef01-2345-6789-abcd-ef0123456789)`

You can also do the same thing with the Introduction section: `[Intro Sections](#intro)`

Check out the following docs site for a ton more examples on using Markdown in Postman:

> **[Markdown in API Documentation](https://documenter.getpostman.com/view/33232/markdown-in-api-documentation/JsGc#intro)**
>
> \*\*This collection is intended to test markdown styling inside Postman or within other services that render Markdown. The descriptions in this collection contain markdown syntax and some of them have links to HTML pages of their rendered...

---

<div class="post-metadata">

**Author:** ![kshitizshankar](https://avatars.discourse-cdn.com/v4/letter/k/b19c9b/32.png) [@kshitizshankar](https://community.postman.com/u/kshitizshankar)\
**Post date:** [February 1, 2019, 10:11pm UTC](https://community.postman.com/t/adding-data-models-inside-api-documentations/3947/5 "2019-02-01T22:11:35Z")

</div>

Yeah I know how to add the hyperlink to the documentation to refer to other sections on the page. My key issue is - How to write the specs of the Data Model inside postman. It’s not exactly a part of a request so is there a way to add that??

The Imgur API Docs are using a separate site for that and then linking it back to the Postman documentation. I need a way to be able to add all this documentation around the Database Schema etc. for a resource.

Another example of it would be [https://developers.trello.com/reference/#card-object](https://developers.trello.com/reference/#card-object)

I doubt I’d be able to create well structured markdown for all this data - So - How do I do this in Postman?

---

<div class="post-metadata">

**Author:** ![john-paul](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/john-paul/32/919_2.png) [@john-paul](https://community.postman.com/u/john-paul)\
**Post date:** [February 1, 2019, 11:04pm UTC](https://community.postman.com/t/adding-data-models-inside-api-documentations/3947/6 "2019-02-01T23:04:04Z")

</div>

@kshitizshankar Gotcha. Sorry, I didn’t read your initial comment closely enough.

You can depict data models using [example responses](https://learning.getpostman.com/docs/postman/collections/examples/#what-is-an-example), or [Markdown tables](https://www.markdownguide.org/extended-syntax/#tables).

[Segment’s documentation page](https://reference.segmentapis.com/) is a fantastic example.

---

<div class="post-metadata">

**Author:** ![kshitizshankar](https://avatars.discourse-cdn.com/v4/letter/k/b19c9b/32.png) [@kshitizshankar](https://community.postman.com/u/kshitizshankar)\
**Post date:** [February 4, 2019, 3:48am UTC](https://community.postman.com/t/adding-data-models-inside-api-documentations/3947/7 "2019-02-04T03:48:57Z")

</div>

Oh perfect! That helps a LOT!

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![john-paul](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/john-paul/32/919_2.png) [@john-paul](https://community.postman.com/u/john-paul)\
**Post date:** [February 4, 2019, 4:34pm UTC](https://community.postman.com/t/adding-data-models-inside-api-documentations/3947/8 "2019-02-04T16:34:51Z")

</div>

Awesome! Glad I could help. 🙂

---

<div class="post-metadata">

**Author:** ![itheory](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/itheory/32/5575_2.png) [@itheory](https://community.postman.com/u/itheory)\
**Post date:** [September 14, 2020, 8:56pm UTC](https://community.postman.com/t/adding-data-models-inside-api-documentations/3947/9 "2020-09-14T20:56:13Z")

</div>

Since my OpenAPI doc has schemas for the responses defined for a path (e.g. in `paths.{sompath}.post.responses.200.content.application/json.schema`), is there some way to get one or more of those schemas to generate documentation for the response body? Or do I need to dupe it in a table?

---

<div class="post-metadata">

**Author:** ![maintenance-candida1](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/maintenance-candida1/32/8613_2.png) [@maintenance-candida1](https://community.postman.com/u/maintenance-candida1)\
**Post date:** [May 22, 2021, 1:07am UTC](https://community.postman.com/t/adding-data-models-inside-api-documentations/3947/10 "2021-05-22T01:07:33Z")

</div>

The accepted answer here seems to be to duplicate models in Markdown tables. I looked at Segment’s documentation per your recommendation and found that their tables are out of sync with their models (at minimum, I observed a misspelling). There’s got to be a way to generate docs from the response schemas, right?
