curl --location --request POST 'https://app.launchdarkly.com/api/v2/webhooks' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Example hook",
"on": true,
"secret": "<password>",
"sign": true,
"statements": [
{
"actions": [
"updateOn"
],
"effect": "allow",
"notActions": [
"updateOn"
],
"notResources": [
"proj/*:env/*:flag/my-flag"
],
"resources": [
"proj/*:env/*:flag/my-flag"
]
}
],
"tags": [],
"url": "https://example.com/example"
}'
{
"_id": "5a580a01b4ff89217bdf9dc1",
"_links": {
"next": {
"href": "/api/v2/endpoint",
"type": "application/json"
},
"self": {
"href": "/api/v2/endpoint",
"type": "application/json"
}
},
"name": "Example hook",
"on": true,
"secret": "frobozz",
"statements": [
{
"actions": [
"updateOn"
],
"effect": "allow",
"notActions": [
"updateOn"
],
"notResources": [
"proj/*:env/*:flag/my-flag"
],
"resources": [
"proj/*:env/*:flag/my-flag"
]
}
],
"tags": [
[]
],
"url": "https://example.com/example"
}