# How to reuse incoming req value in outgoing req?

**URL:** <https://community.postman.com/t/how-to-reuse-incoming-req-value-in-outgoing-req/68733>\
**Category:** Help Hub\
**Tags:** variables, mock\
**Created:** [September 22, 2024, 8:14pm UTC](https://community.postman.com/t/how-to-reuse-incoming-req-value-in-outgoing-req/68733 "2024-09-22T20:14:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunkad](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@sunkad](https://community.postman.com/u/sunkad)\
**Post date:** [September 22, 2024, 8:14pm UTC](https://community.postman.com/t/how-to-reuse-incoming-req-value-in-outgoing-req/68733/1 "2024-09-22T20:14:36Z")

</div>

I have setup a mock server. In the URL of the incoming request and in the body of the incoming request, there is a value that I would like to reuse in a subsequent outgoing request.  
Is it possible to save the incoming value in a collection/environment variable and use it in the outgoing request? Please note that I’m not talking about the outgoing response, but outgoing request.

Example:  
Incoming request URL is …/{{session\_id}}  
Incoming body is in JSON format. One of the properties has the value {{session\_id}}.  
The body of the mock response is empty.  
I need to send a request subsequently with this session\_id in it.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [October 22, 2024, 8:14pm UTC](https://community.postman.com/t/how-to-reuse-incoming-req-value-in-outgoing-req/68733/2 "2024-10-22T20:14:48Z")

</div>

Closed on October 22, 2024, 8:14pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
