# Introducing Code-Based Mocks in Postman

DevFeed: [Introducing Code-Based Mocks in Postman](<https://devfeed.tech/articles/introducing-code-based-mocks-in-postman-88049.md>)

Original publisher: [Read original article](<https://blog.postman.com/introducing-code-based-mocks-in-postman/>)

Author: Kartik Jain

Published: 2026-10-15T15:00:20Z

Content type: release

Language: en

Sources: [Postman](<https://devfeed.tech/sources/postman-blog.md>)

Topics: [Postman](<https://devfeed.tech/topics/postman.md>), [Postman CLI](<https://devfeed.tech/topics/postman-cli.md>), [Postman Agent Mode](<https://devfeed.tech/topics/postman-agent-mode.md>), [generative-ai-tools](<https://devfeed.tech/topics/generative-ai-tools.md>)

Tags: [cli](<https://devfeed.tech/tags/cli.md>), [code-based-mocks](<https://devfeed.tech/tags/code-based-mocks.md>), [coding-agent](<https://devfeed.tech/tags/coding-agent.md>), [general](<https://devfeed.tech/tags/general.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [postman](<https://devfeed.tech/tags/postman.md>), [postman-mock-server](<https://devfeed.tech/tags/postman-mock-server.md>), [stateful-mock-server](<https://devfeed.tech/tags/stateful-mock-server.md>)

## AI overview

Postman introduces code-based mock servers written in JavaScript that can maintain state across requests, simulate failures, and run locally, in CI, or in the cloud. The article demonstrates using an agent and the Postman CLI to create, test, and deploy a mock cart service, giving teams a stable endpoint while the real service is still being built.

## Source excerpt

Code-based mocks are mock servers written in JavaScript. They remember state, fail on demand, and your agent can create, run, and deploy them from the terminal. The post Introducing Code-Based Mocks in Postman appeared first on Postman Blog.