---
updatedAt: 2026-07-28T19:33:42.000Z
---

# Create an environment

Create a new environment.<br><br><a href="https://api.solace.dev/cloud/reference/authentication">Token Permissions</a>: [ <code>environments:edit</code> ]

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Platform",
    "description": "# REST API Concepts\n\nSolace PubSub+ Platform provides RESTful APIs that you can use to manage your data in PubSub+ Cloud. The REST APIs allow\nyou to model your event-driven architectures from your own client applications.\n\nThe following document describes the public REST APIs available for use. Please note that these APIs are in the Early\nAccess release stage and are available for testing and early user feedback. The APIs are subject to change until they\nare declared Generally Available.",
    "version": "2.2.2"
  },
  "servers": [
    {
      "url": "https://api.solace.cloud",
      "description": "Solace PubSub+ Cloud US EAST Region"
    },
    {
      "url": "https://api.solacecloud.com.au",
      "description": "Solace PubSub+ Cloud AU Region"
    },
    {
      "url": "https://api.solacecloud.eu",
      "description": "Solace PubSub+ Cloud EU Region"
    },
    {
      "url": "https://api.solacecloud.sg",
      "description": "Solace PubSub+ Cloud SG Region"
    }
  ],
  "security": [
    {
      "APIToken": []
    }
  ],
  "tags": [
    {
      "name": "Environments"
    }
  ],
  "paths": {
    "/api/v2/platform/environments": {
      "post": {
        "tags": [
          "Environments"
        ],
        "summary": "Create an environment",
        "description": "Create a new environment.<br><br><a href=\"https://api.solace.dev/cloud/reference/authentication\">Token Permissions</a>: [ <code>environments:edit</code> ]",
        "operationId": "createEnvironment",
        "requestBody": {
          "description": "The environment object.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnvironmentCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/EnvironmentResponseEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse",
                  "additionalProperties": {
                    "default": ""
                  },
                  "default": ""
                },
                "example": {
                  "message": "Bad request.",
                  "errorId": "618e2fb0-a198-4d9d-9219-13e51ef0ecec"
                }
              },
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse",
                  "additionalProperties": {
                    "default": ""
                  },
                  "default": ""
                },
                "example": {
                  "message": "An authentication error occurred.",
                  "errorId": "618e2fb0-a198-4d9d-9219-13e51ef0ecec"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse",
                  "additionalProperties": {
                    "default": ""
                  },
                  "default": ""
                },
                "example": {
                  "message": "You do not have permissions to perform this operation.",
                  "errorId": "618e2fb0-a198-4d9d-9219-13e51ef0ecec"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse",
                  "additionalProperties": {
                    "default": ""
                  },
                  "default": ""
                },
                "example": {
                  "message": "Could not find service 4o5kyf4x5504.",
                  "errorId": "618e2fb0-a198-4d9d-9219-13e51ef0ecec"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway - Marketplace integration error.",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "EnvironmentCreateRequest": {
        "type": "object",
        "default": null,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean",
            "default": false,
            "description": "Indicates whether this is the organization’s default environment. The default value is false. The valid values are:\n<ul>\n    <li>true: The environment is the default.</li>\n    <li>false: The environment is not default.</li>\n    </ul>"
          },
          "isProduction": {
            "type": "boolean",
            "default": false,
            "description": "Indicates whether this is an organization’s production environment. The default value is true. The valid values are:\n<ul>\n    <li>true: The environment is a production environment.</li>\n    <li>false: The environment is not a production environment.</li>\n</ul>\n<p>This is an immutable field. If an environment needs to be migrated, architecture can be migrated to a new environment\nwith the desired environment type instead.</p>\n"
          },
          "icon": {
            "type": "string",
            "default": "",
            "description": "Specify the name of the icon to use for the environment.",
            "enum": [
              "CONSTRUCTION",
              "MAINTENANCE",
              "TOOLKIT",
              "TERMINAL",
              "TEST_TUBE",
              "BUG",
              "BROKER",
              "ROCKET_LAUNCH",
              "VERIFIED",
              "DEPLOYED_CODE",
              "NEW_RELEASE",
              "CONTENT_SEARCH"
            ]
          },
          "fgColor": {
            "type": "string",
            "default": "",
            "description": "Specify the RGB hexadecimal color code for the environment's foreground.\nYou can use 6-digit (opaque) or 8-digit (alpha) hex color codes.\n",
            "example": "#000000 | #00000080",
            "pattern": "^#[0-9a-fA-F]{6}([0-9a-fA-F]{2})?$"
          },
          "bgColor": {
            "type": "string",
            "default": "",
            "description": "Specify the RGB hexadecimal color code for the environment's background.\nYou can use 6-digit (opaque) or 8-digit (alpha) hex color codes.\n",
            "example": "#FF0000 | #FF000080",
            "pattern": "^#[0-9a-fA-F]{6}([0-9a-fA-F]{2})?$"
          }
        },
        "required": [
          "name"
        ]
      },
      "EnvironmentResponse": {
        "type": "object",
        "default": null,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "isProduction": {
            "type": "boolean"
          },
          "icon": {
            "type": "string"
          },
          "fgColor": {
            "type": "string"
          },
          "bgColor": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "createdTime": {
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          },
          "updatedTime": {
            "type": "string"
          },
          "organization": {
            "$ref": "#/components/schemas/OrganizationInfo"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ]
      },
      "EnvironmentResponseEnvelope": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/EnvironmentResponse"
          },
          "meta": {
            "type": "object",
            "additionalProperties": {},
            "default": "",
            "description": "<p>The metadata about the response, which can include:</p><ul><li>Pagination data, such as page number, page size, etc. for GET operations that return large amount of response data. For more information, see <a href=\"./pagination\">Pagination</a>.</li><li>Timestamp information, such as current time, or the time create or update operation occurred for CREATE, PUT, POST operations.</li></ul>"
          },
          "included": {
            "type": "array",
            "items": {}
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "default": null,
        "properties": {
          "message": {
            "type": "string",
            "default": "",
            "description": "A user-friendly message that describes the error.",
            "example": "An error occurred."
          },
          "errorId": {
            "type": "string",
            "default": "",
            "description": "The UUID (Universally Unique Identifier) that is logged with an appropriate stack trace for a WARN or ERROR log that allows support to better determine what cause the error.",
            "example": "123e4567-e89b-12d3-a456-426655440000"
          },
          "meta": {
            "type": "object",
            "additionalProperties": {},
            "default": "",
            "description": "The metadata about the error. This provides additional information about the error that occurred.",
            "example": "'object': { 'field': 'description' }"
          },
          "validationDetails": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "default": "",
            "description": "When applicable, these are the details of issues with the fields provided for the REST call.",
            "example": "'name': ['Not unique']"
          }
        }
      },
      "OrganizationInfo": {
        "type": "object",
        "default": null,
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "internal": {
            "type": "boolean"
          },
          "organizationType": {
            "type": "string",
            "enum": [
              "STANDARD",
              "ENTERPRISE",
              "TRIAL",
              "POC",
              "SAP",
              "BOOMI",
              "INTERNAL",
              "PARTNER"
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "APIToken": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}
```