> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

# Use Postman AI Recipes

AI prompt recipes are ready-to-use prompt templates that help you get the most out of Postman's AI-powered agents. Each recipe addresses a real-world scenario and provides an example prompt you can use or adapt to fit your specific needs.

### Debug auth errors

#### Problem

You've inherited a collection from a teammate, but every request returns a `401 Unauthorized` or `403 Forbidden` error. You aren't sure which environment variables are missing or whether your OAuth 2.0 configuration is correct.

### Solution

Analyze the authentication headers in your requests and cross-reference them with your current Environment. The agent can identify missing variables, misconfigured token flows, and header inconsistencies before you spend hours guessing.

#### Example prompt

```txt title="Debug auth errors" wordWrap
I'm getting 401 errors on this collection; help me debug the auth, sync my environment variables, and validate that OAuth 2.0 is configured correctly.
```

***

### Collection cleanup

#### Problem

Your workspace has grown out of control. You have 200+ requests with names like `New Request (Copy)` and duplicate endpoints scattered across five different folders, making it difficult navigate or maintain.

#### Solution

Deduplicate and reorganize your collection's architecture. The agent can identify redundant requests, merge duplicate endpoints, and restructure your folders into a logical hierarchy with descriptive names.

### Example prompt

```txt title="Collection cleanup" wordWrap
Find duplicate requests, identify redundant endpoints, and reorganize this collection by grouping related endpoints into a logical folder structure with descriptive names.
```

***

### Server generation and scaffolding

#### Problem

You have a finished API design in Postman but haven't written a single line of code yet. Starting from scratch is time-consuming, and manually translating your collection into a typed server introduces risk.

#### Solution

Scaffold a complete, type-safe API server directly from your API collection. The Postman Agent generates production-ready boilerplate so you can start building features rather than infrastructure.

#### Example prompt

```txt title="Server generation and backend scaffolding" wordWrap
Generate a complete Express.js server with TypeScript, database integration, and CRUD operations directly from this API collection.
```

***

### Map legacy and undocumented APIs

#### Problem

You need to integrate with a legacy third-party API that has zero documentation and a confusing endpoint structure. You don't know what's available, what parameters are required, or what a successful response looks like.

#### Solution

Map the surface area and behavior of the unknown service. The agent systematically analyzes endpoints, generates working request examples, and documents which calls return meaningful payloads — giving you a foundation to build your integration on.

#### Example prompt

```txt title="Map legacy and undocumented APIs" wordWrap
Explore and document this unknown API by analyzing endpoints, generating request examples, and documenting what returns interesting payloads.
```

***

### Production pipelines and safe deployment testing

#### Problem

Your team is terrified of breaking the production API during a Friday afternoon deployment. You need confidence that the new version works before it reaches all your users.

#### Solution

Use the agent to build a deployment testing strategy that includes blue-green deployments and canary testing workflows. This lets you validate the new API version against a controlled subset of traffic before committing to a full release.

### Example prompt

```txt title="Production pipelines and safe deployment testing" wordWrap
Create testing strategies for blue-green deployments and implement canary testing workflows to validate the new API version with a subset of traffic before full release.
```

***

### Compliance audit

#### Problem

You are heading into a security audit and need to ensure your APIs meet HIPAA or GDPR data-handling standards. Manually reviewing every endpoint for compliance gaps is slow, inconsistent, and error-prone.

#### Solution

Run an automated compliance and security scan across your entire workspace. The agent checks for exposed secrets, validates role-based access control (RBAC) configurations, and identifies endpoints that may be handling sensitive data incorrectly.

#### Example prompt

```txt title="Compliance audit" wordWrap
Implement security testing and compliance checks for GDPR and HIPAA; validate our role-based access control and ensure no secrets are exposed in the collection.
```

<Warning>
  Never store API keys, tokens, or passwords directly in a collection. Use Postman Environment variables and Vault integrations to manage secrets securely before running a compliance audit.
</Warning>

***

### Automate customer onboarding

#### Problem

Every time a new customer completes a payment in **Stripe**, your team manually creates a contact record in **HubSpot** and a channel in **Slack**. This repetitive process wastes time and is prone to human error.

#### Solution

Build a multi-tool intelligent workflow in Postman Flows. The agent connects your Stripe, HubSpot, and Slack integrations into a single automated pipeline that triggers on new subscription events — no manual steps required.

#### Example prompt

```txt title="Automate customer onboarding" wordWrap
Create an intelligent workflow using Flows that automatically creates a HubSpot contact and sends a Slack message whenever a new Stripe subscription is detected.
```

***

### Broken documentation refresh

#### Problem

Your API has evolved but your public documentation is six months out of date. Support ticket volumes are climbing because developers are working from stale examples and dated schemas.

#### Solution

Use the Documentation Generator to sync your documentation with your actual test results and schemas. The agent produces comprehensive, up-to-date API docs complete with real-world examples and an interactive "try it out" guide for your users.

#### Example prompt

```txt title="Broken documentation refresh" wordWrap
Analyze my latest test results and schemas to generate comprehensive API documentation with real-time examples and a "try-it-out" interactive guide.
```

***

### Load testing with production data

#### Problem

You know the API works for a single user in isolation, but you have no idea whether it will hold up when 1,000 users simultaneously upload different CSV data sets. Performance bottlenecks only reveal themselves under load.

#### Solution

Build a data-driven load test powered by your actual CSV data. The agent sets up parameterized test scenarios for different user roles, runs them at scale, and generates a performance report that pinpoints bottlenecks before they reach production.

#### Example prompt

```txt title="Load testing with production data" wordWrap
Set up data-driven tests using my CSV file, create test scenarios for different user roles, and generate a performance report to identify bottlenecks.
```

***

### Cloud-native pipeline builder

#### Problem

You have working application code, but you're struggling to write the `Dockerfile` and YAML manifests needed to deploy it to a **Kubernetes** cluster. Setting up CI/CD pipelines from scratch is complex and time-intensive.

#### Solution

Use the agent to generate your DevOps infrastructure. This includes Docker configuration, Kubernetes deployment manifests, CI/CD workflow files, and Infrastructure as Code (IaC) templates — everything you need to go from code to cloud.

#### Example prompt

```txt title="Cloud-native pipeline builder" wordWrap
Generate a complete DevOps pipeline for this API including Docker, Kubernetes, CI/CD workflows, and Infrastructure as Code templates.
```