> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

# Get all workspaces

GET https://api.getpostman.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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Postman API
  version: 1.0.0
paths:
  /workspaces:
    get:
      operationId: getWorkspaces
      summary: Get all workspaces
      description: >
        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)).
      tags:
        - workspaces
      parameters:
        - name: type
          in: query
          description: The type of workspace to filter the response by.
          required: false
          schema:
            $ref: '#/components/schemas/workspaceTypeQuery'
        - name: createdBy
          in: query
          description: >-
            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.
          required: false
          schema:
            $ref: '#/components/schemas/workspaceCreatedBy'
        - name: include
          in: query
          description: >
            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.
          required: false
          schema:
            $ref: '#/components/schemas/workspaceIncludeQuery'
        - name: elementType
          in: query
          description: >-
            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.
          required: false
          schema:
            $ref: '#/components/schemas/workspaceElementTypeQuery'
        - name: elementId
          in: query
          description: >-
            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.
          required: false
          schema:
            $ref: '#/components/schemas/workspaceElementIdQuery'
        - name: cursor
          in: query
          description: >-
            The pointer to the first record of the set of paginated results. To
            view the next response, use the `nextCursor` value for this
            parameter.
          required: false
          schema:
            $ref: '#/components/schemas/cursor'
        - name: limit
          in: query
          description: >-
            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.
          required: false
          schema:
            $ref: '#/components/schemas/limitMax100'
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getWorkspaces'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetWorkspacesRequestBadRequestError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetWorkspacesRequestUnauthorizedError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetWorkspacesRequestInternalServerError'
servers:
  - url: https://api.getpostman.com
    description: https://api.getpostman.com
  - url: https://api.eu.postman.com
    description: https://api.eu.postman.com
components:
  schemas:
    workspaceTypeQuery:
      type: string
      enum:
        - personal
        - team
        - private
        - public
        - partner
      title: workspaceTypeQuery
    workspaceCreatedBy:
      type: integer
      title: workspaceCreatedBy
    workspaceIncludeQuery:
      type: string
      enum:
        - mocks:deactivated
        - scim
      title: workspaceIncludeQuery
    workspaceElementTypeQuery:
      type: string
      enum:
        - collection
        - specification
      title: workspaceElementTypeQuery
    workspaceElementIdQuery:
      type: string
      title: workspaceElementIdQuery
    cursor:
      type: string
      title: cursor
    limitMax100:
      type: integer
      title: limitMax100
    GetWorkspacesWorkspaceDataType:
      type: string
      enum:
        - personal
        - team
        - private
        - public
        - partner
      description: The type of workspace.
      title: GetWorkspacesWorkspaceDataType
    GetWorkspacesWorkspaceDataVisibility:
      type: string
      enum:
        - personal
        - team
        - private
        - public
        - partner
      description: >
        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)).
      title: GetWorkspacesWorkspaceDataVisibility
    getWorkspacesScimObject:
      type: object
      properties:
        createdBy:
          type: string
          description: The SCIM user ID of the user who created the workspace.
      description: >-
        An object containing SCIM user IDs. This object only returns if you pass
        the `include=scim` query parameter.
      title: getWorkspacesScimObject
    getWorkspacesWorkspaceData:
      type: object
      properties:
        id:
          type: string
          description: The workspace's ID.
        name:
          type: string
          description: The workspace's name.
        type:
          $ref: '#/components/schemas/GetWorkspacesWorkspaceDataType'
          description: The type of workspace.
        visibility:
          $ref: '#/components/schemas/GetWorkspacesWorkspaceDataVisibility'
          description: >
            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)).
        createdBy:
          type: string
          description: >-
            The user who created the workspace. The response only returns
            workspaces that you have access to.
        about:
          type: string
          description: A brief summary about the workspace.
        createdAt:
          type: string
          format: date-time
          description: The date and time at which the workspace was created.
        updatedAt:
          type: string
          format: date-time
          description: The date and time at which the workspace was last updated.
        scim:
          $ref: '#/components/schemas/getWorkspacesScimObject'
      description: Information about the workspace.
      title: getWorkspacesWorkspaceData
    GetWorkspacesMeta:
      type: object
      properties:
        nextCursor:
          type: string
          description: >-
            The pagination cursor that points to the next record in the results
            set.
      description: >-
        The response's meta information for paginated results. This object only
        returns if you pass the `limit` query parameter.
      title: GetWorkspacesMeta
    getWorkspaces:
      type: object
      properties:
        workspaces:
          type: array
          items:
            $ref: '#/components/schemas/getWorkspacesWorkspaceData'
          description: A list of workspaces.
        meta:
          $ref: '#/components/schemas/GetWorkspacesMeta'
          description: >-
            The response's meta information for paginated results. This object
            only returns if you pass the `limit` query parameter.
      title: getWorkspaces
    Workspace400ErrorError:
      type: object
      properties:
        name:
          type: string
          description: The error name.
        message:
          type: string
          description: The error message.
      title: Workspace400ErrorError
    workspace400Error:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/Workspace400ErrorError'
        statusCode:
          type: integer
          description: The error's HTTP status code.
      title: workspace400Error
    commonErrorNameMessageOnly:
      type: object
      properties:
        name:
          type: string
          description: The error name.
        message:
          type: string
          description: The error message.
      title: commonErrorNameMessageOnly
    CommonErrorNameMessageError:
      type: object
      properties:
        name:
          type: string
          description: The error name.
        message:
          type: string
          description: The error message.
      description: Information about the error.
      title: CommonErrorNameMessageError
    commonErrorNameMessage:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/CommonErrorNameMessageError'
          description: Information about the error.
      title: commonErrorNameMessage
    GetWorkspacesRequestBadRequestError:
      oneOf:
        - $ref: '#/components/schemas/workspace400Error'
        - $ref: '#/components/schemas/commonErrorNameMessageOnly'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: GetWorkspacesRequestBadRequestError
    CommonErrorTypeTitleDetailStatusType:
      oneOf:
        - type: string
          format: uri-reference
        - type: string
      title: CommonErrorTypeTitleDetailStatusType
    commonErrorTypeTitleDetailStatus:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/CommonErrorTypeTitleDetailStatusType'
        title:
          type: string
          description: A short summary of the problem.
        detail:
          type: string
          description: Information about the error.
        status:
          type: integer
          description: The error's HTTP status code.
      title: commonErrorTypeTitleDetailStatus
    GetWorkspacesRequestUnauthorizedError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: GetWorkspacesRequestUnauthorizedError
    CommonErrorTypeTitleDetailDetail:
      oneOf:
        - type: string
        - type: object
          additionalProperties:
            description: Any type
      description: Information about the error.
      title: CommonErrorTypeTitleDetailDetail
    commonErrorTypeTitleDetail:
      type: object
      properties:
        type:
          type: string
          description: The type of error.
        title:
          type: string
          description: A short summary of the problem.
        detail:
          $ref: '#/components/schemas/CommonErrorTypeTitleDetailDetail'
          description: Information about the error.
      title: commonErrorTypeTitleDetail
    GetWorkspacesRequestInternalServerError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetail'
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: GetWorkspacesRequestInternalServerError
  securitySchemes:
    PostmanApiKey:
      type: apiKey
      in: header
      name: x-api-key
    scimApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        A valid [SCIM API
        key](https://learning.postman.com/docs/administration/scim-provisioning/scim-provisioning-overview/#generating-scim-api-key)
        for calls to SCIM endpoints.
    basicAuth:
      type: http
      scheme: basic

```

## 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.getpostman.com/workspaces"

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Successful Response
const url = 'https://api.getpostman.com/workspaces';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

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.getpostman.com/workspaces"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	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.getpostman.com/workspaces")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Successful Response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.getpostman.com/workspaces")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Successful Response
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.getpostman.com/workspaces', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Successful Response
using RestSharp;

var client = new RestClient("https://api.getpostman.com/workspaces");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Successful Response
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.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.getpostman.com/workspaces"

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Include SCIM IDs
const url = 'https://api.getpostman.com/workspaces';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

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.getpostman.com/workspaces"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	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.getpostman.com/workspaces")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

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<String> response = Unirest.get("https://api.getpostman.com/workspaces")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Include SCIM IDs
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.getpostman.com/workspaces', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Include SCIM IDs
using RestSharp;

var client = new RestClient("https://api.getpostman.com/workspaces");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Include SCIM IDs
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.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.getpostman.com/workspaces"

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Response With Pagination
const url = 'https://api.getpostman.com/workspaces';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

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.getpostman.com/workspaces"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	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.getpostman.com/workspaces")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

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<String> response = Unirest.get("https://api.getpostman.com/workspaces")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Response With Pagination
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.getpostman.com/workspaces', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Response With Pagination
using RestSharp;

var client = new RestClient("https://api.getpostman.com/workspaces");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Response With Pagination
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.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()
```