Last active
April 7, 2026 08:00
-
-
Save bradleykronson/6a12ed71264fbd2f575651bd6e72a089 to your computer and use it in GitHub Desktop.
ChatGPT prompt to create a Postman collection from a spec PDF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| You are an expert API integration engineer. Your job is to read the attached PDF specification document and convert it into a complete, import-ready Postman collection JSON, plus all supporting setup instructions needed to use it properly. | |
| What I want you to produce: | |
| 1. A valid Postman collection in Collection v2.1 JSON format. | |
| 2. A matching Postman environment JSON with all variables the collection needs. | |
| 3. A clear variable reference table showing: | |
| * variable name | |
| * purpose | |
| * example value | |
| * whether it is required | |
| * whether it is secret/sensitive | |
| 4. Authentication setup instructions for Postman, including exactly where each credential/token goes. | |
| 5. Pre-request scripts or test scripts where needed. | |
| 6. Request grouping into sensible folders by resource or workflow. | |
| 7. Example requests for every endpoint in the PDF. | |
| 8. Example response notes where useful. | |
| 9. Any assumptions, ambiguities, or gaps in the PDF called out explicitly. | |
| 10. A short "How to import and run this in Postman" guide. | |
| Important rules: | |
| * Do not summarise the PDF at a high level and stop there. | |
| * Convert the specification into actual Postman assets and implementation-ready instructions. | |
| * If the PDF is incomplete, inconsistent, or ambiguous, make the safest reasonable assumptions, but list them clearly under "Assumptions and open questions". | |
| * Preserve exact endpoint paths, methods, headers, auth requirements, query params, path params, and body schemas from the PDF. | |
| * Infer reusable Postman variables wherever appropriate, such as: | |
| * base_url | |
| * api_version | |
| * auth_token | |
| * client_id | |
| * client_secret | |
| * username | |
| * password | |
| * account_id | |
| * tenant_id | |
| * user_id | |
| * resource_id | |
| * any recurring path/query/body values | |
| * Use collection variables or environment variables appropriately and explain why. | |
| * If OAuth2 is required, provide both: | |
| * the Postman auth configuration guidance | |
| * any token endpoint request needed | |
| * If HMAC/signature auth is required, include the exact pre-request script needed. | |
| * If bearer token auth is used, wire it properly into the collection. | |
| * If there are multiple environments implied by the PDF, include guidance for dev/staging/prod variables. | |
| * Where the PDF provides sample payloads, convert them into realistic Postman request bodies. | |
| * Where schemas exist without examples, generate clean example payloads that match the schema. | |
| * Include content types, accept headers, and any required custom headers. | |
| * Add test scripts for obvious checks such as: | |
| * status code validation | |
| * token extraction | |
| * response field existence | |
| * Organise the collection so it is practical for a developer or QA person to use immediately. | |
| Output format: | |
| Return your answer in this exact structure: | |
| ## 1. Postman Collection JSON | |
| ```json | |
| <full valid collection json> | |
| ``` | |
| ## 2. Postman Environment JSON | |
| ```json | |
| <full valid environment json> | |
| ``` | |
| ## 3. Variable Reference | |
| | Variable | Purpose | Example | Required | Secret | | |
| | -------- | ------- | ------- | -------- | ------ | | |
| ## 4. Authentication and Setup Instructions | |
| <clear step-by-step instructions> | |
| ## 5. Assumptions and Open Questions | |
| <bullet list> | |
| ## 6. Import and Usage Guide | |
| <short practical instructions> | |
| Quality bar: | |
| * The JSON must be valid and importable. | |
| * The structure must be production-usable, not illustrative fluff. | |
| * Prefer completeness over brevity. | |
| * Do not omit important setup details. | |
| * If something in the PDF is unclear, do not silently guess without flagging it. | |
| Before producing the final answer, carefully inspect the PDF for: | |
| * base URLs | |
| * auth flow | |
| * headers | |
| * required params | |
| * optional params | |
| * request/response schemas | |
| * examples | |
| * pagination | |
| * rate limits | |
| * error formats | |
| * versioning | |
| * webhooks if present | |
| If the PDF includes multiple APIs or modules, separate them cleanly into folders in the Postman collection. | |
| Be strict, exhaustive, and implementation-focused. I want importable JSON, not a summary. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment