# Return dynamic data in Mock Server Response

**URL:** <https://community.postman.com/t/return-dynamic-data-in-mock-server-response/27794>\
**Category:** Help Hub\
**Tags:** variables\
**Created:** [September 13, 2021, 4:11pm UTC](https://community.postman.com/t/return-dynamic-data-in-mock-server-response/27794 "2021-09-13T16:11:08Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![security-cosmologist](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/security-cosmologist/32/7059_2.png) [@security-cosmologist](https://community.postman.com/u/security-cosmologist)\
**Post date:** [September 16, 2021, 7:40am UTC](https://community.postman.com/t/return-dynamic-data-in-mock-server-response/27794/2 "2021-09-16T07:40:52Z")

</div>

Hello @shakisparki👋

Welcome to the community.

You’re right, the initial value will be the preferred one in such cases, so you’d need to preserve the initial value of the variable.

In order to do so, you might have to use [Postman’s API](https://www.postman.com/postman/workspace/postman-public-workspace/documentation/12959542-c8142d51-e97c-46b6-bd77-52bb66712c9a) - specifically the **PUT Update Environment** endpoint

There was a similar discussion here: [Passing environment variable between monitor runs](https://community.postman.com/t/passing-environment-variable-between-monitor-runs/3194), it’s regarding monitors, but the idea is the same (preserving the initial value of a variable)

---

_[View the full topic](https://community.postman.com/t/return-dynamic-data-in-mock-server-response/27794)._
