For AI agents: a documentation index is available at the root level at /llms.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Update a flag trigger. Updating a flag trigger uses the semantic patch format.
To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch).
### Instructions
Semantic patch requests support the following `kind` instructions for updating flag triggers.
<details>
<summary>Click to expand instructions for <strong>updating flag triggers</strong></summary>
#### replaceTriggerActionInstructions
Removes the existing trigger action and replaces it with the new instructions.
##### Parameters
- `value`: An array of the new `kind`s of actions to perform when triggering. Supported flag actions are `turnFlagOn` and `turnFlagOff`.
Here's an example that replaces the existing action with new instructions to turn flag targeting off:
```json
{
"instructions": [
{
"kind": "replaceTriggerActionInstructions",
"value": [ {"kind": "turnFlagOff"} ]
}
]
}
```
#### cycleTriggerUrl
Generates a new URL for this trigger. You must update any clients using the trigger to use this new URL.
Here's an example:
```json
{
"instructions": [{ "kind": "cycleTriggerUrl" }]
}
```
#### disableTrigger
Disables the trigger. This saves the trigger configuration, but the trigger stops running. To re-enable, use `enableTrigger`.
Here's an example:
```json
{
"instructions": [{ "kind": "disableTrigger" }]
}
```
#### enableTrigger
Enables the trigger. If you previously disabled the trigger, it begins running again.
Here's an example:
```json
{
"instructions": [{ "kind": "enableTrigger" }]
}
```
</details>
Authentication
Authorizationstring
API Key authentication via header
Path parameters
projectKeystringRequiredformat: "string"
The project key
environmentKeystringRequiredformat: "string"
The environment key
featureFlagKeystringRequiredformat: "string"
The feature flag key
idstringRequiredformat: "string"
The flag trigger ID
Request
This endpoint expects an object.
commentstringOptional
Optional comment describing the update
instructionslist of maps from strings to anyOptional
The instructions to perform when updating. This should be an array with objects that look like <code>{“kind”: “trigger_action”}</code>.
Response
Flag trigger response
_idstringOptional
The ID of this flag trigger
_versionintegerOptional
The flag trigger version
_creationDatelongOptional
Timestamp of when the flag trigger was created
_maintainerIdstringOptional
The ID of the flag trigger maintainer
_maintainerobjectOptional
Details on the member who maintains this flag trigger
enabledbooleanOptional
Whether the flag trigger is currently enabled
_statusenumOptional
The trigger state: active, inactive, or failed
Allowed values:
_lastFailedAtlongOptional
Timestamp of when the trigger most recently entered failed state
_integrationKeystringOptional
The unique identifier of the integration for your trigger
instructionslist of maps from strings to anyOptional
Details on the action to perform when triggering
_lastTriggeredAtlongOptional
Timestamp of when the trigger was most recently executed
_recentTriggerBodieslist of objectsOptional
Details on recent flag trigger requests.
_triggerCountintegerOptional
Number of times the trigger has been executed
triggerURLstringOptional
The unguessable URL for this flag trigger
_linksmap from strings to objectsOptional
The location and content type of related resources
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
Update a flag trigger. Updating a flag trigger uses the semantic patch format.
To make a semantic patch request, you must append domain-model=launchdarkly.semanticpatch to your Content-Type header. To learn more, read Updates using semantic patch.
Instructions
Semantic patch requests support the following kind instructions for updating flag triggers.
Click to expand instructions for updating flag triggers
replaceTriggerActionInstructions
Removes the existing trigger action and replaces it with the new instructions.
Parameters
value: An array of the new kinds of actions to perform when triggering. Supported flag actions are turnFlagOn and turnFlagOff.
Here’s an example that replaces the existing action with new instructions to turn flag targeting off:
{
"instructions": [
{
"kind": "replaceTriggerActionInstructions",
"value": [ {"kind": "turnFlagOff"} ]
}
]
}
cycleTriggerUrl
Generates a new URL for this trigger. You must update any clients using the trigger to use this new URL.
Here’s an example:
{
"instructions": [{ "kind": "cycleTriggerUrl" }]
}
disableTrigger
Disables the trigger. This saves the trigger configuration, but the trigger stops running. To re-enable, use enableTrigger.
Here’s an example:
{
"instructions": [{ "kind": "disableTrigger" }]
}
enableTrigger
Enables the trigger. If you previously disabled the trigger, it begins running again.