Whenever you create collections, APIs, environments, mock servers, and monitors using the Postman API, we recommend specifying which workspace the new element will be stored in by using the optional workspace parameter. However, if you don’t select a workspace, Postman will select one for you. What if you don’t have any personal workspace? What happens when your default workspace is public? We recently updated the Postman API to create a new workspace when there isn’t already a personal workspace to choose as your default.
Determining which workspace to use
Because making the workspace parameter mandatory would introduce breaking changes, we created a smoother solution. We’ve updated the existing behavior to determine which workspace to use. Now, if you don’t specify which workspace you want to use, we will pick one for you by following these steps:
- If you have at least one personal workspace, Postman will store the new element in your oldest personal workspace.
- If you don’t have any personal workspace, Postman will automatically create one for you.
Whenever we automatically create a workspace for you, it will be named “New Workspace,” and its ID will be returned as part of the response.
Even though the Postman API will automatically determine—and now create, if needed—a default workspace, this is only meant to serve as a safety net. We strongly recommend that you still use the workspace parameter to specify where new elements are stored. Please refer to the official Postman API documentation for more information.