> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. # Get all workspaces GET https://api.postman.com/workspaces Gets all [workspaces](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/creating-workspaces/). The response includes your workspaces and any workspaces that you have access to. **Note:** This endpoint's response contains the visibility field. Visibility determines who can access the workspace: - `personal` — Only you can access the workspace. - `team` — All team members can access the workspace. - `private` — Only invited team members can access the workspace ([**Team** and **Enterprise** plans only](https://www.postman.com/pricing)). - `public` — Everyone can access the workspace. - `partner` — Only invited team members and [partners](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/partner-workspaces/) can access the workspace ([**Team** and **Enterprise** plans only](https://www.postman.com/pricing)). Reference: https://learning.postman.com/api-docs/api-reference/workspaces/get-workspaces ## Authentication - `x-api-key` header (required) — API Key authentication via header ## Servers - `https://api.postman.com` (https://api.postman.com, default) - `https://api.eu.postman.com` (https://api.eu.postman.com) ## Request ### Query parameters - `type` (enum, optional) — The type of workspace to filter the response by. - Allowed values: `personal`, `team`, `private`, `public`, `partner` - `createdBy` (integer, optional) — Return only workspaces created by a specific user ID. For multiple users, pass this value as a comma-separated list of user IDs. The response only returns workspaces that you have access to. - `include` (enum, optional) — Include the following information in the endpoint's response: - `mocks:deactivated` — Include all deactivated mock servers in the response. - `scim` — Return the SCIM user IDs of the workspace creator and who last modified it. - Allowed values: `mocks:deactivated`, `scim` - `elementType` (enum, optional) — Filter results to return the workspace where the given element type is located. If you pass this query parameter, you must also pass the `elementId` query parameter. - Allowed values: `collection`, `specification` - `elementId` (string, optional) — Filter results to return the workspace where the given element's ID is located. When filtering by collection, you must use the collection's unique ID (`userId`-`collection`). If you pass this query parameter, you must also pass the `elementType` query parameter. - `cursor` (string, optional) — The pointer to the first record of the set of paginated results. To view the next response, use the `nextCursor` value for this parameter. - `limit` (integer, optional) — The maximum number of rows to return in the response, up to a maximum value of 100. Any value greater than 100 returns a 400 Bad Request response. ## Response ### 200 Successful Response - `workspaces` (list of object, optional) — A list of workspaces. - `id` (string, optional) — The workspace's ID. - `name` (string, optional) — The workspace's name. - `type` (enum, optional) — The type of workspace. - Allowed values: `personal`, `team`, `private`, `public`, `partner` - `visibility` (enum, optional) — The workspace's visibility. [Visibility](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/managing-workspaces/#changing-workspace-visibility) determines who can access the workspace: - `personal` — Only you can access the workspace. - `team` — All team members can access the workspace. - `private` — Only invited team members can access the workspace ([**Team** and **Enterprise** plans only](https://www.postman.com/pricing)). - `public` — Everyone can access the workspace. - `partner` — Only invited team members and [partners](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/partner-workspaces/) can access the workspace ([**Team** and **Enterprise** plans only](https://www.postman.com/pricing)). - Allowed values: `personal`, `team`, `private`, `public`, `partner` - `createdBy` (string, optional) — The user who created the workspace. The response only returns workspaces that you have access to. - `about` (string, optional) — A brief summary about the workspace. - `createdAt` (datetime, optional) — The date and time at which the workspace was created. - `updatedAt` (datetime, optional) — The date and time at which the workspace was last updated. - `scim` (object, optional) — An object containing SCIM user IDs. This object only returns if you pass the `include=scim` query parameter. - `createdBy` (string, optional) — The SCIM user ID of the user who created the workspace. - `meta` (object, optional) — The response's meta information for paginated results. This object only returns if you pass the `limit` query parameter. - `nextCursor` (string, optional) — The pagination cursor that points to the next record in the results set. ## Errors ### 400 Bad Request Error Bad Request - `object or object or object` - Bad Request - `error` (object, optional) — Information about the error. - `name` (string, optional) — The error name. - `message` (string, optional) — The error message. - `statusCode` (integer, optional) — The error's HTTP status code. - Error (Name, Message) - `name` (string, optional) — The error name. - `message` (string, optional) — The error message. - Error (Name, Message) - `error` (object, optional) — Information about the error. - `name` (string, optional) — The error name. - `message` (string, optional) — The error message. ### 401 Unauthorized Error Unauthorized - `object or object` - Error (Type, Title, Detail, Status) - `type` (string or string, optional) — The type of error. - `title` (string, optional) — A short summary of the problem. - `detail` (string, optional) — Information about the error. - `status` (integer, optional) — The error's HTTP status code. - Error (Name, Message) - `error` (object, optional) — Information about the error. - `name` (string, optional) — The error name. - `message` (string, optional) — The error message. ### 429 Too Many Requests Error Rate Limit Exceeded - `error` (string, optional) — The error type. - `message` (string, optional) — The error message. ### 500 Internal Server Error Internal Server Error - `object or object or object` - Error (Type, Title, Detail) - `type` (string, optional) — The type of error. - `title` (string, optional) — A short summary of the problem. - `detail` (string or map from string to any, optional) — Information about the error. - Error (Type, Title, Detail, Status) - `type` (string or string, optional) — The type of error. - `title` (string, optional) — A short summary of the problem. - `detail` (string, optional) — Information about the error. - `status` (integer, optional) — The error's HTTP status code. - Error (Name, Message) - `error` (object, optional) — Information about the error. - `name` (string, optional) — The error name. - `message` (string, optional) — The error message. ## Examples ### Successful Response **Response** ```json { "workspaces": [ { "id": "1f0df51a-8658-4ee8-a2a1-d2567dfa09a9", "name": "My Workspace", "type": "personal", "visibility": "personal", "createdBy": "12345678", "about": "This is a personal workspace.", "createdAt": "2022-07-18T06:57:37.000Z", "updatedAt": "2025-05-30T08:49:54.000Z" }, { "id": "a0f46158-1529-11ee-be56-0242ac120002", "name": "Private Workspace", "type": "team", "visibility": "private", "createdBy": "12345678", "about": "This is a private workspace.", "createdAt": "2022-07-18T06:57:37.000Z", "updatedAt": "2025-05-30T08:49:54.000Z" }, { "id": "f8801e9e-03a4-4c7b-b31e-5db5cd771696", "name": "Team Workspace", "type": "team", "visibility": "team", "createdBy": "12345678", "about": "This is a team workspace.", "createdAt": "2022-07-18T06:57:37.000Z", "updatedAt": "2025-05-30T08:49:54.000Z" }, { "id": "74dbfab8-1529-11ee-be56-0242ac120002", "name": "Public Workspace", "type": "team", "visibility": "public", "createdBy": "12345678", "about": "This is a public workspace.", "createdAt": "2022-07-18T06:57:37.000Z", "updatedAt": "2025-05-30T08:49:54.000Z" }, { "id": "74dbfab8-1529-11ee-be56-0242ac120002", "name": "Partner Workspace", "type": "team", "visibility": "partner", "createdBy": "12345678", "about": "This is a partner workspace.", "createdAt": "2022-07-18T06:57:37.000Z", "updatedAt": "2025-05-30T08:49:54.000Z" } ] } ``` **SDK Code** ```python Successful Response import requests url = "https://api.postman.com/workspaces" headers = {"x-api-key": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript Successful Response const url = 'https://api.postman.com/workspaces'; const options = {method: 'GET', headers: {'x-api-key': ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Successful Response package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.postman.com/workspaces" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("x-api-key", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Successful Response require 'uri' require 'net/http' url = URI("https://api.postman.com/workspaces") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["x-api-key"] = '' response = http.request(request) puts response.read_body ``` ```java Successful Response import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.postman.com/workspaces") .header("x-api-key", "") .asString(); ``` ```php Successful Response request('GET', 'https://api.postman.com/workspaces', [ 'headers' => [ 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp Successful Response using RestSharp; var client = new RestClient("https://api.postman.com/workspaces"); var request = new RestRequest(Method.GET); request.AddHeader("x-api-key", ""); IRestResponse response = client.Execute(request); ``` ```swift Successful Response import Foundation let headers = ["x-api-key": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/workspaces")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Include SCIM IDs **Response** ```json { "workspaces": [ { "id": "1f0df51a-8658-4ee8-a2a1-d2567dfa09a9", "name": "My Workspace", "type": "personal", "visibility": "personal", "createdBy": "12345678", "about": "This is a personal workspace.", "createdAt": "2022-07-18T06:57:37.000Z", "updatedAt": "2025-05-30T08:49:54.000Z", "scim": { "createdBy": "405775fe15ed41872a8eea4c8aa2b38cda9749812cc55c99" } } ] } ``` **SDK Code** ```python Include SCIM IDs import requests url = "https://api.postman.com/workspaces" headers = {"x-api-key": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript Include SCIM IDs const url = 'https://api.postman.com/workspaces'; const options = {method: 'GET', headers: {'x-api-key': ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Include SCIM IDs package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.postman.com/workspaces" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("x-api-key", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Include SCIM IDs require 'uri' require 'net/http' url = URI("https://api.postman.com/workspaces") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["x-api-key"] = '' response = http.request(request) puts response.read_body ``` ```java Include SCIM IDs import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.postman.com/workspaces") .header("x-api-key", "") .asString(); ``` ```php Include SCIM IDs request('GET', 'https://api.postman.com/workspaces', [ 'headers' => [ 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp Include SCIM IDs using RestSharp; var client = new RestClient("https://api.postman.com/workspaces"); var request = new RestRequest(Method.GET); request.AddHeader("x-api-key", ""); IRestResponse response = client.Execute(request); ``` ```swift Include SCIM IDs import Foundation let headers = ["x-api-key": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/workspaces")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Response With Pagination **Response** ```json { "workspaces": [ { "id": "1f0df51a-8658-4ee8-a2a1-d2567dfa09a9", "name": "My Workspace", "type": "personal", "visibility": "personal", "createdBy": "12345678", "about": "This is a personal workspace.", "createdAt": "2022-07-18T06:57:37.000Z", "updatedAt": "2025-05-30T08:49:54.000Z" }, { "id": "a0f46158-1529-11ee-be56-0242ac120002", "name": "Private Workspace", "type": "team", "visibility": "private", "createdBy": "12345678", "about": "This is a private workspace.", "createdAt": "2022-07-18T06:57:37.000Z", "updatedAt": "2025-05-30T08:49:54.000Z" } ], "meta": { "nextCursor": "NDgzMjY1" } } ``` **SDK Code** ```python Response With Pagination import requests url = "https://api.postman.com/workspaces" headers = {"x-api-key": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript Response With Pagination const url = 'https://api.postman.com/workspaces'; const options = {method: 'GET', headers: {'x-api-key': ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Response With Pagination package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.postman.com/workspaces" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("x-api-key", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Response With Pagination require 'uri' require 'net/http' url = URI("https://api.postman.com/workspaces") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["x-api-key"] = '' response = http.request(request) puts response.read_body ``` ```java Response With Pagination import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.postman.com/workspaces") .header("x-api-key", "") .asString(); ``` ```php Response With Pagination request('GET', 'https://api.postman.com/workspaces', [ 'headers' => [ 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp Response With Pagination using RestSharp; var client = new RestClient("https://api.postman.com/workspaces"); var request = new RestRequest(Method.GET); request.AddHeader("x-api-key", ""); IRestResponse response = client.Execute(request); ``` ```swift Response With Pagination import Foundation let headers = ["x-api-key": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/workspaces")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```