{
  "item": [
    {
      "id": "b4b0423f-01cc-44fb-8aa6-22a361cc3c13",
      "name": "Environments",
      "description": {
        "content": "Manage environments within a project. Environments represent deployment stages such as development, staging, and production.",
        "type": "text/plain"
      },
      "item": [
        {
          "id": "df20a6a3-209e-4e46-ad4c-638c878bba08",
          "name": "List environments",
          "request": {
            "name": "List environments",
            "description": {
              "content": "Retrieves a list of all environments the authenticated user has access to. Environments represent deployment stages within a project.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "environments",
                ""
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "auth": null
          },
          "response": [
            {
              "id": "12f46c78-1c40-4066-8b20-55d46bbb6beb",
              "name": "Successful response containing a list of environments",
              "originalRequest": {
                "url": {
                  "path": [
                    "environments",
                    ""
                  ],
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: apikey",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "<API Key>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "[\n  {\n    \"id\": 2874,\n    \"name\": \"string\",\n    \"api_key\": \"string\",\n    \"description\": \"string\",\n    \"project\": 3482,\n    \"minimum_change_request_approvals\": 1181,\n    \"allow_client_traits\": true,\n    \"hide_sensitive_data\": true\n  },\n  {\n    \"id\": 4700,\n    \"name\": \"string\",\n    \"api_key\": \"string\",\n    \"description\": \"string\",\n    \"project\": 9873,\n    \"minimum_change_request_approvals\": 3578,\n    \"allow_client_traits\": true,\n    \"hide_sensitive_data\": true\n  }\n]",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "c87dfd72-f5a6-427c-8156-498c7c77bbdc",
              "name": "Unauthorized - invalid or missing API token",
              "originalRequest": {
                "url": {
                  "path": [
                    "environments",
                    ""
                  ],
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: apikey",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "<API Key>"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "Unauthorized",
              "code": 401,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "text/plain"
                }
              ],
              "body": "",
              "cookie": [],
              "_postman_previewlanguage": "text"
            }
          ],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "id": "c52f8d8e-9e99-4bec-ac5a-5a927d72ea71",
          "name": "Get an environment",
          "request": {
            "name": "Get an environment",
            "description": {
              "content": "Retrieves the details of a specific environment by its API key, including its name, project, and feature states.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "environments",
                ":environment_api_key",
                ""
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "environment_api_key",
                  "description": "(Required) The API key for the environment"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "auth": null
          },
          "response": [
            {
              "id": "738e20e2-4572-41eb-9873-f7bcf9f2421e",
              "name": "Successful response containing the environment details",
              "originalRequest": {
                "url": {
                  "path": [
                    "environments",
                    ":environment_api_key",
                    ""
                  ],
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "<string>",
                      "key": "environment_api_key",
                      "description": "(Required) The API key for the environment"
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: apikey",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "<API Key>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"id\": 1611,\n  \"name\": \"string\",\n  \"api_key\": \"string\",\n  \"description\": \"string\",\n  \"project\": 9444,\n  \"minimum_change_request_approvals\": 4973,\n  \"allow_client_traits\": false,\n  \"hide_sensitive_data\": false\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "5fe2bfb6-d31b-4792-9fc8-3cabcdf3b5d9",
              "name": "Unauthorized - invalid or missing API token",
              "originalRequest": {
                "url": {
                  "path": [
                    "environments",
                    ":environment_api_key",
                    ""
                  ],
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "<string>",
                      "key": "environment_api_key",
                      "description": "(Required) The API key for the environment"
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: apikey",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "<API Key>"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "Unauthorized",
              "code": 401,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "text/plain"
                }
              ],
              "body": "",
              "cookie": [],
              "_postman_previewlanguage": "text"
            },
            {
              "id": "98d07ac1-d6ee-460b-9183-09a573dbbeae",
              "name": "Environment not found",
              "originalRequest": {
                "url": {
                  "path": [
                    "environments",
                    ":environment_api_key",
                    ""
                  ],
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "<string>",
                      "key": "environment_api_key",
                      "description": "(Required) The API key for the environment"
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: apikey",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "<API Key>"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "Not Found",
              "code": 404,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "text/plain"
                }
              ],
              "body": "",
              "cookie": [],
              "_postman_previewlanguage": "text"
            }
          ],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "id": "d122de09-1e3c-4b23-9711-8af9adb8b83b",
          "name": "Update an environment",
          "request": {
            "name": "Update an environment",
            "description": {
              "content": "Updates the details of an existing environment including its name, description, and configuration properties.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "environments",
                ":environment_api_key",
                ""
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<string>",
                  "key": "environment_api_key",
                  "description": "(Required) The API key for the environment"
                }
              ]
            },
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "PUT",
            "auth": null,
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"<string>\",\n  \"description\": \"<string>\",\n  \"allow_client_traits\": \"<boolean>\",\n  \"hide_sensitive_data\": \"<boolean>\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "id": "47155089-c140-4363-b808-d2a3409e1cea",
              "name": "Environment updated successfully",
              "originalRequest": {
                "url": {
                  "path": [
                    "environments",
                    ":environment_api_key",
                    ""
                  ],
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "<string>",
                      "key": "environment_api_key",
                      "description": "(Required) The API key for the environment"
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: apikey",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "<API Key>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "PUT",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"<string>\",\n  \"description\": \"<string>\",\n  \"allow_client_traits\": \"<boolean>\",\n  \"hide_sensitive_data\": \"<boolean>\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"id\": 1611,\n  \"name\": \"string\",\n  \"api_key\": \"string\",\n  \"description\": \"string\",\n  \"project\": 9444,\n  \"minimum_change_request_approvals\": 4973,\n  \"allow_client_traits\": false,\n  \"hide_sensitive_data\": false\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "1dcb3dc8-d7f5-4802-84f4-0ef325275429",
              "name": "Bad request - validation error",
              "originalRequest": {
                "url": {
                  "path": [
                    "environments",
                    ":environment_api_key",
                    ""
                  ],
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "<string>",
                      "key": "environment_api_key",
                      "description": "(Required) The API key for the environment"
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: apikey",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "<API Key>"
                  }
                ],
                "method": "PUT",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"<string>\",\n  \"description\": \"<string>\",\n  \"allow_client_traits\": \"<boolean>\",\n  \"hide_sensitive_data\": \"<boolean>\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Bad Request",
              "code": 400,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "text/plain"
                }
              ],
              "body": "",
              "cookie": [],
              "_postman_previewlanguage": "text"
            },
            {
              "id": "096055cb-39bb-4b88-8dba-232ff90d1548",
              "name": "Unauthorized - invalid or missing API token",
              "originalRequest": {
                "url": {
                  "path": [
                    "environments",
                    ":environment_api_key",
                    ""
                  ],
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "<string>",
                      "key": "environment_api_key",
                      "description": "(Required) The API key for the environment"
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: apikey",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "<API Key>"
                  }
                ],
                "method": "PUT",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"<string>\",\n  \"description\": \"<string>\",\n  \"allow_client_traits\": \"<boolean>\",\n  \"hide_sensitive_data\": \"<boolean>\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Unauthorized",
              "code": 401,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "text/plain"
                }
              ],
              "body": "",
              "cookie": [],
              "_postman_previewlanguage": "text"
            },
            {
              "id": "90be92ab-4bb7-4934-bd45-92ae35c938f3",
              "name": "Environment not found",
              "originalRequest": {
                "url": {
                  "path": [
                    "environments",
                    ":environment_api_key",
                    ""
                  ],
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "<string>",
                      "key": "environment_api_key",
                      "description": "(Required) The API key for the environment"
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: apikey",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "<API Key>"
                  }
                ],
                "method": "PUT",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"<string>\",\n  \"description\": \"<string>\",\n  \"allow_client_traits\": \"<boolean>\",\n  \"hide_sensitive_data\": \"<boolean>\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Not Found",
              "code": 404,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "text/plain"
                }
              ],
              "body": "",
              "cookie": [],
              "_postman_previewlanguage": "text"
            }
          ],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        }
      ],
      "event": []
    }
  ],
  "event": [],
  "variable": [
    {
      "type": "string",
      "value": "https://api.flagsmith.com/api/v1",
      "key": "baseUrl"
    }
  ],
  "auth": {
    "type": "apikey",
    "apikey": [
      {
        "key": "key",
        "value": "Authorization"
      },
      {
        "key": "value",
        "value": "{{apiKey}}"
      },
      {
        "key": "in",
        "value": "header"
      }
    ]
  },
  "info": {
    "_postman_id": "a164e693-2ea0-4628-9070-4d5c5bb802ac",
    "name": "Flagsmith Admin Environments API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": {
      "content": "The Flagsmith Admin API allows developers to programmatically manage all aspects of their Flagsmith projects. Anything that can be done through the Flagsmith dashboard can also be accomplished via this API, including creating, updating, and deleting projects, environments, feature flags, segments, and users. It uses a secret Organisation API Token for authentication and provides a Swagger interface at api.flagsmith.com/api/v1/docs for interactive exploration.\n\nContact Support:\n Name: Flagsmith Support",
      "type": "text/plain"
    }
  }
}