# Can not create environment variables in new workspace

**URL:** <https://community.postman.com/t/can-not-create-environment-variables-in-new-workspace/7675>\
**Category:** Help Hub\
**Created:** [September 9, 2019, 9:02pm UTC](https://community.postman.com/t/can-not-create-environment-variables-in-new-workspace/7675 "2019-09-09T21:02:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rjilani](https://avatars.discourse-cdn.com/v4/letter/r/9de053/32.png) [@rjilani](https://community.postman.com/u/rjilani)\
**Post date:** [September 9, 2019, 9:02pm UTC](https://community.postman.com/t/can-not-create-environment-variables-in-new-workspace/7675/1 "2019-09-09T21:02:22Z")

</div>

Hi: according to post man API documentation in order to create an environment variable inside a specific workspace we can use the query parameter to reference the desired workspace, but it is not working both from the postman UI tool as well as python request code. E.g. I have a personal workpace called test but the code “curl -X POST   
'[https://api.getpostman.com/environments/?workspace=test](https://api.getpostman.com/environments/?workspace=test)” doesn’t work, and I got an error message saying “{“error”:{“name”:“instanceNotFoundError”,“message”:“We could not find the workspace you are looking for”}}”. I have double check and the workspace exist but don’t know the reason for the error message.

---

<div class="post-metadata">

**Author:** ![singhsivcan](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/singhsivcan/32/1595_2.png) [@singhsivcan](https://community.postman.com/u/singhsivcan)\
**Post date:** [September 10, 2019, 3:45am UTC](https://community.postman.com/t/can-not-create-environment-variables-in-new-workspace/7675/2 "2019-09-10T03:45:22Z")

</div>

@rjilani I think you’re passing the workspace name which is incorrect.  
You need to pass the `id` of the workspace name as the value of the `workspace` query param.  
And your updated URL would be looking something like this:

`https://api.getpostman.com/environments/?workspace=x8s8dis9di2k2fglo5`

In case you don’t know the ID of the workspace, you can just [get all workspaces](https://docs.api.getpostman.com/?version=latest#5b53aa96-042d-4bc2-8c85-c10bc7ea0553) and find the ID in the response list.

---

<div class="post-metadata">

**Author:** ![rjilani](https://avatars.discourse-cdn.com/v4/letter/r/9de053/32.png) [@rjilani](https://community.postman.com/u/rjilani)\
**Post date:** [September 10, 2019, 5:01pm UTC](https://community.postman.com/t/can-not-create-environment-variables-in-new-workspace/7675/3 "2019-09-10T17:01:12Z")

</div>

Thanks it worked like a charm after putting the workspace id.
