v5

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-02-283466592.5 MB
Flag triggers

Create flag trigger

Create a new flag trigger.

post/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}

Path parameters

projectKeystring string required

The project key

The project key

environmentKeystring string required

The environment key

The environment key

featureFlagKeystring string required

The feature flag key

The feature flag key

Request body

commentstring

Optional comment describing the trigger

instructionsInstruction[]

The action to perform when triggering. This should be an array with a single object that looks like <code>{"kind": "flag_action"}</code>. Supported flag actions are <code>turnFlagOn</code> and <code>turnFlagOff</code>.

integrationKeystring required

The unique identifier of the integration for your trigger. Use <code>generic-trigger</code> for integrations not explicitly supported.

Example request

{
  "comment": "example comment",
  "instructions": [
    {
      "kind": "turnFlagOn"
    }
  ],
  "integrationKey": "generic-trigger"
}

Response

Flag trigger response

_idstring
_versioninteger

The flag trigger version

_creationDateinteger
_maintainerIdstring

The ID of the flag trigger maintainer

enabledboolean

Whether the flag trigger is currently enabled

_integrationKeystring

The unique identifier of the integration for your trigger

instructionsInstruction[]
_lastTriggeredAtinteger
_triggerCountinteger

Number of times the trigger has been executed

triggerURLstring

The unguessable URL for this flag trigger

_linksobject

The location and content type of related resources

Example response

{
  "_version": 1,
  "_maintainerId": "12ab3c45de678910abc12345",
  "_maintainer": {
    "_links": {
      "self": {
        "href": "/api/v2/members/569f183514f4432160000007",
        "type": "application/json"
      }
    },
    "_id": "569f183514f4432160000007",
    "firstName": "Ariel",
    "lastName": "Flores",
    "role": "admin",
    "email": "ariel@acme.com"
  },
  "enabled": true,
  "_integrationKey": "generic-trigger",
  "_triggerCount": 3
}