> 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.

# Create a workspace

POST https://api.getpostman.com/workspaces
Content-Type: application/json

Creates a new [workspace](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/creating-workspaces/).

**Note:**

- This endpoint returns a 403 `Forbidden` response if the user does not have permission to create workspaces. [Admins and Super Admins](https://learning.postman.com/docs/collaborating-in-postman/roles-and-permissions/#team-roles) can configure workspace permissions to restrict users and/or user groups from creating workspaces or require approvals for the creation of team workspaces.
- Private and [Partner Workspaces](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/partner-workspaces/) are available on Postman [**Team** and **Enterprise** plans](https://www.postman.com/pricing).
- There are rate limits when publishing public workspaces.
- Public team workspace names must be unique.
- The `teamId` property must be passed in the request body if [Postman Organizations](https://learning.postman.com/docs/administration/onboarding-checklist) is enabled.


Reference: https://learning.postman.com/api-docs/api-reference/workspaces/create-workspace

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Postman API
  version: 1.0.0
paths:
  /workspaces:
    post:
      operationId: createWorkspace
      summary: Create a workspace
      description: >
        Creates a new
        [workspace](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/creating-workspaces/).


        **Note:**


        - This endpoint returns a 403 `Forbidden` response if the user does not
        have permission to create workspaces. [Admins and Super
        Admins](https://learning.postman.com/docs/collaborating-in-postman/roles-and-permissions/#team-roles)
        can configure workspace permissions to restrict users and/or user groups
        from creating workspaces or require approvals for the creation of team
        workspaces.

        - Private and [Partner
        Workspaces](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/partner-workspaces/)
        are available on Postman [**Team** and **Enterprise**
        plans](https://www.postman.com/pricing).

        - There are rate limits when publishing public workspaces.

        - Public team workspace names must be unique.

        - The `teamId` property must be passed in the request body if [Postman
        Organizations](https://learning.postman.com/docs/administration/onboarding-checklist)
        is enabled.
      tags:
        - workspaces
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/createWorkspaceResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorNameMessage'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateWorkspaceRequestUnauthorizedError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/workspace403Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateWorkspaceRequestInternalServerError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/createWorkspace'
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:
    CreateWorkspaceWorkspaceType:
      type: string
      enum:
        - personal
        - private
        - public
        - team
        - partner
      description: >
        The type of workspace:

        - `personal`

        - `private` — Private workspaces are available on Postman [**Team** and
        **Enterprise** plans](https://www.postman.com/pricing).

        - `public`

        - `team`

        - `partner` — [Partner
        Workspaces](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/partner-workspaces/)
        are available on Postman [**Team** and **Enterprise**
        plans](https://www.postman.com/pricing)).
      title: CreateWorkspaceWorkspaceType
    CreateWorkspaceWorkspace:
      type: object
      properties:
        name:
          type: string
          description: The workspace's name.
        type:
          $ref: '#/components/schemas/CreateWorkspaceWorkspaceType'
          description: >
            The type of workspace:

            - `personal`

            - `private` — Private workspaces are available on Postman [**Team**
            and **Enterprise** plans](https://www.postman.com/pricing).

            - `public`

            - `team`

            - `partner` — [Partner
            Workspaces](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/partner-workspaces/)
            are available on Postman [**Team** and **Enterprise**
            plans](https://www.postman.com/pricing)).
        description:
          type: string
          description: The workspace's description.
        about:
          type: string
          description: A brief summary about the workspace.
        teamId:
          type: string
          description: >-
            The team ID to assign to the workspace. This property is required if
            Postman
            [Organizations](https://learning.postman.com/docs/administration/managing-your-team/overview)
            is enabled.
      required:
        - name
        - type
      description: Information about the workspace.
      title: CreateWorkspaceWorkspace
    createWorkspace:
      type: object
      properties:
        workspace:
          $ref: '#/components/schemas/CreateWorkspaceWorkspace'
          description: Information about the workspace.
      title: createWorkspace
    CreateWorkspaceResponseWorkspace:
      type: object
      properties:
        id:
          type: string
          description: The workspace's ID.
        name:
          type: string
          description: The workspace's name.
      description: Information about the created workspace.
      title: CreateWorkspaceResponseWorkspace
    createWorkspaceResponse:
      type: object
      properties:
        workspace:
          $ref: '#/components/schemas/CreateWorkspaceResponseWorkspace'
          description: Information about the created workspace.
      title: createWorkspaceResponse
    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
    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
    CreateWorkspaceRequestUnauthorizedError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: CreateWorkspaceRequestUnauthorizedError
    Workspace403ErrorError:
      type: object
      properties:
        status:
          type: number
          format: double
          description: The error's HTTP status code.
        name:
          type: string
          description: The error name.
        message:
          type: string
          description: The error message.
        detail:
          type: string
          description: Information about the error.
        instance:
          type: string
          description: >-
            The URI reference that identifies the specific occurrence of the
            problem.
      title: Workspace403ErrorError
    workspace403Error:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/Workspace403ErrorError'
      title: workspace403Error
    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
    CreateWorkspaceRequestInternalServerError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetail'
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: CreateWorkspaceRequestInternalServerError
  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

### Workspace Created



**Request**

```json
undefined
```

**Response**

```json
{
  "workspace": {
    "id": "1f0df51a-8658-4ee8-a2a1-d2567dfa09a9",
    "name": "Team Workspace"
  }
}
```

**SDK Code**

```python Workspace Created
import requests

url = "https://api.getpostman.com/workspaces"

headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Workspace Created
const url = 'https://api.getpostman.com/workspaces';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: undefined
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Workspace Created
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/workspaces"

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

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Workspace Created
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::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'

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

```java Workspace Created
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

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

```php Workspace Created
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp Workspace Created
using RestSharp;

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

```swift Workspace Created
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/workspaces")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```

### Create Workspace



**Request**

```json
{
  "workspace": {
    "name": "Team Workspace",
    "type": "team",
    "description": "This is a team workspace.",
    "about": "Team workspace."
  }
}
```

**Response**

```json
{
  "workspace": {
    "id": "1f0df51a-8658-4ee8-a2a1-d2567dfa09a9",
    "name": "Team Workspace"
  }
}
```

**SDK Code**

```python Create Workspace
import requests

url = "https://api.getpostman.com/workspaces"

payload = { "workspace": {
        "name": "Team Workspace",
        "type": "team",
        "description": "This is a team workspace.",
        "about": "Team workspace."
    } }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Create Workspace
const url = 'https://api.getpostman.com/workspaces';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"workspace":{"name":"Team Workspace","type":"team","description":"This is a team workspace.","about":"Team workspace."}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Create Workspace
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/workspaces"

	payload := strings.NewReader("{\n  \"workspace\": {\n    \"name\": \"Team Workspace\",\n    \"type\": \"team\",\n    \"description\": \"This is a team workspace.\",\n    \"about\": \"Team workspace.\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Create Workspace
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::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"workspace\": {\n    \"name\": \"Team Workspace\",\n    \"type\": \"team\",\n    \"description\": \"This is a team workspace.\",\n    \"about\": \"Team workspace.\"\n  }\n}"

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

```java Create Workspace
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/workspaces")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"workspace\": {\n    \"name\": \"Team Workspace\",\n    \"type\": \"team\",\n    \"description\": \"This is a team workspace.\",\n    \"about\": \"Team workspace.\"\n  }\n}")
  .asString();
```

```php Create Workspace
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/workspaces', [
  'body' => '{
  "workspace": {
    "name": "Team Workspace",
    "type": "team",
    "description": "This is a team workspace.",
    "about": "Team workspace."
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Create Workspace
using RestSharp;

var client = new RestClient("https://api.getpostman.com/workspaces");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"workspace\": {\n    \"name\": \"Team Workspace\",\n    \"type\": \"team\",\n    \"description\": \"This is a team workspace.\",\n    \"about\": \"Team workspace.\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Create Workspace
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["workspace": [
    "name": "Team Workspace",
    "type": "team",
    "description": "This is a team workspace.",
    "about": "Team workspace."
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/workspaces")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```

### Create Workspace in a Team



**Request**

```json
{
  "workspace": {
    "name": "Team Workspace",
    "type": "team",
    "description": "This is a team workspace.",
    "about": "Team workspace.",
    "teamId": "1234"
  }
}
```

**Response**

```json
{
  "workspace": {
    "id": "1f0df51a-8658-4ee8-a2a1-d2567dfa09a9",
    "name": "Team Workspace"
  }
}
```

**SDK Code**

```python Create Workspace in a Team
import requests

url = "https://api.getpostman.com/workspaces"

payload = { "workspace": {
        "name": "Team Workspace",
        "type": "team",
        "description": "This is a team workspace.",
        "about": "Team workspace.",
        "teamId": "1234"
    } }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Create Workspace in a Team
const url = 'https://api.getpostman.com/workspaces';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"workspace":{"name":"Team Workspace","type":"team","description":"This is a team workspace.","about":"Team workspace.","teamId":"1234"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Create Workspace in a Team
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/workspaces"

	payload := strings.NewReader("{\n  \"workspace\": {\n    \"name\": \"Team Workspace\",\n    \"type\": \"team\",\n    \"description\": \"This is a team workspace.\",\n    \"about\": \"Team workspace.\",\n    \"teamId\": \"1234\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Create Workspace in a Team
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::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"workspace\": {\n    \"name\": \"Team Workspace\",\n    \"type\": \"team\",\n    \"description\": \"This is a team workspace.\",\n    \"about\": \"Team workspace.\",\n    \"teamId\": \"1234\"\n  }\n}"

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

```java Create Workspace in a Team
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/workspaces")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"workspace\": {\n    \"name\": \"Team Workspace\",\n    \"type\": \"team\",\n    \"description\": \"This is a team workspace.\",\n    \"about\": \"Team workspace.\",\n    \"teamId\": \"1234\"\n  }\n}")
  .asString();
```

```php Create Workspace in a Team
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/workspaces', [
  'body' => '{
  "workspace": {
    "name": "Team Workspace",
    "type": "team",
    "description": "This is a team workspace.",
    "about": "Team workspace.",
    "teamId": "1234"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Create Workspace in a Team
using RestSharp;

var client = new RestClient("https://api.getpostman.com/workspaces");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"workspace\": {\n    \"name\": \"Team Workspace\",\n    \"type\": \"team\",\n    \"description\": \"This is a team workspace.\",\n    \"about\": \"Team workspace.\",\n    \"teamId\": \"1234\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Create Workspace in a Team
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["workspace": [
    "name": "Team Workspace",
    "type": "team",
    "description": "This is a team workspace.",
    "about": "Team workspace.",
    "teamId": "1234"
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/workspaces")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```