{
  "item": [
    {
      "id": "af6961e1-e7fe-4418-b87b-6902a0aff0d6",
      "name": "Webhooks",
      "description": {
        "content": "Configure webhooks for environments and organisations to receive notifications about flag changes and audit log events.",
        "type": "text/plain"
      },
      "item": [
        {
          "id": "74f4fd7e-51cf-420c-8688-44c06c3759f6",
          "name": "List environment webhooks",
          "request": {
            "name": "List environment webhooks",
            "description": {
              "content": "Retrieves a list of all webhooks configured for a specific environment. Environment webhooks receive flag evaluation data for identified users.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "environments",
                ":environment_api_key",
                "webhooks",
                ""
              ],
              "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": "cef54397-b77a-41d6-805e-92c03695ecac",
              "name": "Successful response containing a list of webhooks",
              "originalRequest": {
                "url": {
                  "path": [
                    "environments",
                    ":environment_api_key",
                    "webhooks",
                    ""
                  ],
                  "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  {\n    \"id\": 3818,\n    \"url\": \"http://VkxYxaqhIYpgXgAGKZi.egawVc,YhKM7QbSdSp\",\n    \"enabled\": true,\n    \"created_at\": \"2012-12-12T08:24:49.054Z\",\n    \"updated_at\": \"1988-09-05T04:54:54.330Z\",\n    \"secret\": \"string\"\n  },\n  {\n    \"id\": 188,\n    \"url\": \"http://xINxDwnstqAOwhlBhSzPDIoBXrIGPs.vyn8LV6R9rAGVjIL7-VJgA-JO2chgjA\",\n    \"enabled\": false,\n    \"created_at\": \"1958-07-17T21:26:04.356Z\",\n    \"updated_at\": \"2022-03-04T08:12:15.825Z\",\n    \"secret\": \"string\"\n  }\n]",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "9bc67236-e9ff-4049-a612-1719e3cb4272",
              "name": "Unauthorized - invalid or missing API token",
              "originalRequest": {
                "url": {
                  "path": [
                    "environments",
                    ":environment_api_key",
                    "webhooks",
                    ""
                  ],
                  "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"
            }
          ],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "id": "69226bc3-6277-40f3-af5d-7d862296c3a0",
          "name": "Create an environment webhook",
          "request": {
            "name": "Create an environment webhook",
            "description": {
              "content": "Creates a new webhook for an environment. The webhook will receive POST requests containing flag evaluation data whenever identities are evaluated.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "environments",
                ":environment_api_key",
                "webhooks",
                ""
              ],
              "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": "POST",
            "auth": null,
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"<uri>\",\n  \"enabled\": \"<boolean>\",\n  \"secret\": \"<string>\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "id": "f6710170-9bc1-418d-aa8c-cb0620510338",
              "name": "Webhook created successfully",
              "originalRequest": {
                "url": {
                  "path": [
                    "environments",
                    ":environment_api_key",
                    "webhooks",
                    ""
                  ],
                  "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": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"url\": \"<uri>\",\n  \"enabled\": \"<boolean>\",\n  \"secret\": \"<string>\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Created",
              "code": 201,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"id\": 6504,\n  \"url\": \"http://qGtNSNDBSeeTvaQTxUDgYVDNKRMDCYVkw.zaoNRJrOsRG99T1dqSA5FGCW+CIb\",\n  \"enabled\": true,\n  \"created_at\": \"1986-10-17T16:59:43.852Z\",\n  \"updated_at\": \"1950-02-19T05:04:00.378Z\",\n  \"secret\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "f5394351-b7fc-4dcf-bd94-02c848e7f765",
              "name": "Bad request - validation error",
              "originalRequest": {
                "url": {
                  "path": [
                    "environments",
                    ":environment_api_key",
                    "webhooks",
                    ""
                  ],
                  "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": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"url\": \"<uri>\",\n  \"enabled\": \"<boolean>\",\n  \"secret\": \"<string>\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Bad Request",
              "code": 400,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "text/plain"
                }
              ],
              "body": "",
              "cookie": [],
              "_postman_previewlanguage": "text"
            },
            {
              "id": "b710f370-b0b4-4a90-bcb4-82585a3b8e10",
              "name": "Unauthorized - invalid or missing API token",
              "originalRequest": {
                "url": {
                  "path": [
                    "environments",
                    ":environment_api_key",
                    "webhooks",
                    ""
                  ],
                  "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": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"url\": \"<uri>\",\n  \"enabled\": \"<boolean>\",\n  \"secret\": \"<string>\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Unauthorized",
              "code": 401,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "text/plain"
                }
              ],
              "body": "",
              "cookie": [],
              "_postman_previewlanguage": "text"
            }
          ],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "id": "febdecfb-2391-47ff-bc2b-56520a746498",
          "name": "List organisation webhooks",
          "request": {
            "name": "List organisation webhooks",
            "description": {
              "content": "Retrieves a list of all webhooks configured for a specific organisation. Organisation webhooks receive audit log events for changes made across the organisation.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "organisations",
                ":organisation_id",
                "webhooks",
                ""
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<integer>",
                  "key": "organisation_id",
                  "description": "(Required) The unique identifier for the organisation"
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "auth": null
          },
          "response": [
            {
              "id": "c1f79e9b-9cef-4da5-8b16-4f5d5b1642f0",
              "name": "Successful response containing a list of webhooks",
              "originalRequest": {
                "url": {
                  "path": [
                    "organisations",
                    ":organisation_id",
                    "webhooks",
                    ""
                  ],
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "<integer>",
                      "key": "organisation_id",
                      "description": "(Required) The unique identifier for the organisation"
                    }
                  ]
                },
                "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\": 3818,\n    \"url\": \"http://VkxYxaqhIYpgXgAGKZi.egawVc,YhKM7QbSdSp\",\n    \"enabled\": true,\n    \"created_at\": \"2012-12-12T08:24:49.054Z\",\n    \"updated_at\": \"1988-09-05T04:54:54.330Z\",\n    \"secret\": \"string\"\n  },\n  {\n    \"id\": 188,\n    \"url\": \"http://xINxDwnstqAOwhlBhSzPDIoBXrIGPs.vyn8LV6R9rAGVjIL7-VJgA-JO2chgjA\",\n    \"enabled\": false,\n    \"created_at\": \"1958-07-17T21:26:04.356Z\",\n    \"updated_at\": \"2022-03-04T08:12:15.825Z\",\n    \"secret\": \"string\"\n  }\n]",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "310b98fc-6b83-419a-9c4d-5053cc889636",
              "name": "Unauthorized - invalid or missing API token",
              "originalRequest": {
                "url": {
                  "path": [
                    "organisations",
                    ":organisation_id",
                    "webhooks",
                    ""
                  ],
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "<integer>",
                      "key": "organisation_id",
                      "description": "(Required) The unique identifier for the organisation"
                    }
                  ]
                },
                "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": "e20eea83-2c31-4d32-8b53-55b34786defd",
          "name": "Create an organisation webhook",
          "request": {
            "name": "Create an organisation webhook",
            "description": {
              "content": "Creates a new webhook for an organisation. The webhook will receive POST requests containing audit log events for changes made across the organisation.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "organisations",
                ":organisation_id",
                "webhooks",
                ""
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "<integer>",
                  "key": "organisation_id",
                  "description": "(Required) The unique identifier for the organisation"
                }
              ]
            },
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "auth": null,
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"<uri>\",\n  \"enabled\": \"<boolean>\",\n  \"secret\": \"<string>\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "id": "0cae2a63-37bb-4390-a5cb-8d2150c0355e",
              "name": "Webhook created successfully",
              "originalRequest": {
                "url": {
                  "path": [
                    "organisations",
                    ":organisation_id",
                    "webhooks",
                    ""
                  ],
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "<integer>",
                      "key": "organisation_id",
                      "description": "(Required) The unique identifier for the organisation"
                    }
                  ]
                },
                "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": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"url\": \"<uri>\",\n  \"enabled\": \"<boolean>\",\n  \"secret\": \"<string>\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Created",
              "code": 201,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"id\": 6504,\n  \"url\": \"http://qGtNSNDBSeeTvaQTxUDgYVDNKRMDCYVkw.zaoNRJrOsRG99T1dqSA5FGCW+CIb\",\n  \"enabled\": true,\n  \"created_at\": \"1986-10-17T16:59:43.852Z\",\n  \"updated_at\": \"1950-02-19T05:04:00.378Z\",\n  \"secret\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "deedfb74-90c4-44b5-8943-cfe61ea84688",
              "name": "Bad request - validation error",
              "originalRequest": {
                "url": {
                  "path": [
                    "organisations",
                    ":organisation_id",
                    "webhooks",
                    ""
                  ],
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "<integer>",
                      "key": "organisation_id",
                      "description": "(Required) The unique identifier for the organisation"
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: apikey",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "<API Key>"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"url\": \"<uri>\",\n  \"enabled\": \"<boolean>\",\n  \"secret\": \"<string>\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Bad Request",
              "code": 400,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "text/plain"
                }
              ],
              "body": "",
              "cookie": [],
              "_postman_previewlanguage": "text"
            },
            {
              "id": "9d1bb722-789a-498f-8e20-244887ff08ac",
              "name": "Unauthorized - invalid or missing API token",
              "originalRequest": {
                "url": {
                  "path": [
                    "organisations",
                    ":organisation_id",
                    "webhooks",
                    ""
                  ],
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "<integer>",
                      "key": "organisation_id",
                      "description": "(Required) The unique identifier for the organisation"
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: apikey",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "<API Key>"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"url\": \"<uri>\",\n  \"enabled\": \"<boolean>\",\n  \"secret\": \"<string>\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Unauthorized",
              "code": 401,
              "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": "96db51ab-456b-4e91-8f9d-9d0b63af6814",
    "name": "Flagsmith Admin Environments Webhooks 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"
    }
  }
}