Custom documentation templates help you create clear and easy-to-understand API docs that fit your team's style. This makes sharing and using APIs simpler for everyone.
You want to add your company logo and colors to API docs.
You need to explain API endpoints with extra examples or notes.
You want to hide some technical details to keep docs simple.
You want to organize API info in a way that matches your workflow.
You want to create docs that non-technical people can understand.
Syntax
Postman
Handlebars template syntax is used for custom docs in Postman.
Example placeholders:
{{title}} - API title
{{description}} - API description
{{#each endpoints}} ... {{/each}} - Loop through endpoints
{{method}} - HTTP method
{{url}} - Endpoint URL
{{response}} - Example response
Use double curly braces {{}} to insert variables.
Use #each to loop through lists like endpoints.
Examples
Shows the API title and description in the docs.
Postman
{{title}}
{{description}}
Lists all API endpoints with their method, URL, and description.
{{#each endpoints}}### {{method}} {{url}}
Example response:
{{response}}
{{/each}}
Sample Program
This template creates a simple API documentation page. It shows the API title and description, then lists each endpoint with its method, URL, description, and example request and response.
3. Given this snippet in a Postman custom documentation template:
{{#each requests}} - {{name}} {{/each}}
What will this code output?
medium
A. The word 'requests' repeated multiple times
B. An error because loops are not allowed
C. A list of request names from the collection
D. Nothing, because {{name}} is undefined
Solution
Step 1: Understand the Handlebars loop syntax
The {{#each requests}} block loops over all requests in the collection, outputting each request's name.
Step 2: Determine the output of the loop
Each iteration outputs a dash and the request name, creating a list of request names.
Final Answer:
A list of request names from the collection -> Option C
Quick Check:
Loop over requests outputs names [OK]
Hint: Loops with #each output list items [OK]
Common Mistakes:
Thinking loops are not supported
Assuming {{name}} is undefined
Expecting repeated static text instead of dynamic names
4. You wrote this in a Postman custom documentation template:
{{#each requests}} - {{name} {{/each}}
Why does the documentation fail to render correctly?
medium
A. Incorrect loop syntax, should be {{#for requests}}
B. The closing tag {{/each}} is missing
C. The variable 'name' does not exist in requests
D. Missing closing curly brace in {{name}}
Solution
Step 1: Check the variable syntax inside the loop
The variable {{name} is missing a closing curly brace, it should be {{name}}.
Step 2: Verify loop syntax and tags
The loop uses correct {{#each requests}} and closing {{/each}} tags, so those are not the issue.
Final Answer:
Missing closing curly brace in {{name}} -> Option D
Quick Check:
All must have matching braces [OK]
Hint: Check all {{}} pairs are closed properly [OK]
Common Mistakes:
Using wrong loop syntax like #for
Assuming variable 'name' is missing
Forgetting to close the loop tag
5. You want to create a custom documentation template that shows each request's name and description only if the description exists. Which Handlebars syntax correctly achieves this?