POST https://api.getpostman.com/environments
A sample body is added to the request that conforms to the following JSON schema: On successful creation of the environment, the API returns the environment name and You can also specify the context of a workspace to create an environment in directly by passing the Requires API Key as {
"type": "object",
"properties": {
"environment": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 254,
"minLength": 1
},
"values": {
"type": "array",
"maxItems": 100,
"additionalItems": false,
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"maxLength": 254
"minLength": 1
},
"value": { "type": "string" },
"enabled": { "type": "boolean" }
},
"required": ["key", "value"]
}
}
},
"required": ["name"]
}
},
"required": ["environment"]
}
id
.workspace
as a query param.
X-Api-Key
request header or apikey
URL query parameter.
Body
PARAM
Key | Datatype | Required | Description |
HEADERS
Key | Datatype | Required | Description |
Content-Type
|
string |
RESPONSES
status OK
{
"environment": {
"id": "f158266e-306b-4702-a2b9-e4ede7878b7a",
"name": "Sample Environment Name (required)",
"uid": "5665-f158266e-306b-4702-a2b9-e4ede7878b7a"
}
} |
ENDPOINTS