# Statsig

> Manage Statsig feature flags from your workflows: create feature gates, turn them on and off, let chosen users through, fill ID list segments, create dynamic configs, and read experiments and the audit log.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/statsig

## Actions

### Add IDs to segment

Add user ids (or other ids) to an ID list segment.

**Inputs**

- Segment (`segment`, text, required): The ID list segment.
- IDs (`ids`, list, required): The IDs, of the segment's ID type (user ids for a User ID segment). Type several separated by commas, or pass a list from an earlier step.

**Outputs**

- `count` (number): How many ids were sent
- `ids` (list): The ids
- `segment_id` (text): The segment

**Example output**

```json
{
  "count": 2,
  "ids": [
    "user_123",
    "user_456"
  ],
  "segment_id": "beta_testers"
}
```

### Add users to feature gate

Always let some users through a feature gate, or always keep others out, whatever its rules say. Other users already added stay.

**Inputs**

- Feature gate (`gate`, text, required): The feature gate.
- Users to let through (`passing_user_ids`, list): User ids that always pass the gate, whatever its rules say. Type several separated by commas, or pass a list from an earlier step.
- Users to keep out (`failing_user_ids`, list): User ids that never pass the gate, whatever its rules say. Type several separated by commas, or pass a list from an earlier step.

**Outputs**

- `failing_user_ids` (list): Every user the gate now always keeps out
- `gate_id` (text): The gate
- `passing_user_ids` (list): Every user the gate now always lets through

**Example output**

```json
{
  "failing_user_ids": [],
  "gate_id": "new_checkout",
  "passing_user_ids": [
    "user_123"
  ]
}
```

### Create dynamic config

Create a dynamic config that serves its default value to everyone. Add rules in Statsig to serve others something else.

**Inputs**

- Name (`name`, text, required): The config's name, 3 to 100 characters. Statsig makes its id from it: Pricing Page becomes pricing_page.
- Description (`description`, text): What it is for, shown in the Statsig console.
- Default value (`default_value`, object): The values the config serves to everyone, such as a button colour or a limit.
- ID type (`id_type`, text): Which id it checks people by. Leave empty for User ID, Statsig's default.
- Tags (`tags`, list): Tags to file it under in the Statsig console.

**Outputs**

- `dynamic_config` (object): The new dynamic config

**Example output**

```json
{
  "dynamic_config": {
    "checksPerHour": 0,
    "createdTime": 1792438637085,
    "created_at": "2026-10-19T19:37:17.085000Z",
    "creatorName": "Jo Bloggs",
    "defaultValue": {
      "button_color": "blue",
      "max_items": 10
    },
    "description": "Settings for the pricing page",
    "id": "pricing_page",
    "idType": "userID",
    "isEnabled": true,
    "lastModifiedTime": 1792438637233,
    "lastModifierName": "Jo Bloggs",
    "last_modified_at": "2026-10-19T19:37:17.233000Z",
    "name": "Pricing Page",
    "permalink": "https://console.statsig.com/4YLTPh/dynamic_configs/pricing_page",
    "rules": [],
    "status": "Active",
    "tags": [],
    "version": 1
  }
}
```

### Create feature gate

Create a feature gate. It starts with no rules, so it lets through only the users you add to it; add rules in Statsig to roll it out further.

**Inputs**

- Name (`name`, text, required): The gate's name, 3 to 100 characters. Statsig makes its id from it: New Checkout becomes new_checkout.
- Description (`description`, text): What it is for, shown in the Statsig console.
- ID type (`id_type`, text): Which id it checks people by. Leave empty for User ID, Statsig's default.
- Tags (`tags`, list): Tags to file it under in the Statsig console.
- Turned on (`is_enabled`, true/false): Create the gate turned on. A new gate has no rules, so it lets through only the users you add to it either way. Default: `true`.

**Outputs**

- `gate` (object): The new feature gate

**Example output**

```json
{
  "gate": {
    "checksPerHour": 0,
    "createdTime": 1792438637085,
    "created_at": "2026-10-19T19:37:17.085000Z",
    "creatorName": "Jo Bloggs",
    "description": "The redesigned checkout page",
    "id": "new_checkout",
    "idType": "userID",
    "isEnabled": true,
    "lastModifiedTime": 1792438637233,
    "lastModifierName": "Jo Bloggs",
    "last_modified_at": "2026-10-19T19:37:17.233000Z",
    "name": "New Checkout",
    "permalink": "https://console.statsig.com/4YLTPh/gates/new_checkout",
    "rules": [],
    "status": "In Progress",
    "tags": [
      "\u2605 Core"
    ],
    "type": "TEMPORARY",
    "version": 1
  }
}
```

### Create segment

Create an ID list segment, a named list of users (or other ids) that gate and config rules can target, and optionally fill it.

**Inputs**

- Name (`name`, text, required): The segment's name, 3 to 100 characters. Statsig makes its id from it: Beta Testers becomes beta_testers.
- Description (`description`, text): What it is for, shown in the Statsig console.
- ID type (`id_type`, text): Which id it checks people by. Leave empty for User ID, Statsig's default.
- IDs (`ids`, list): IDs to put in the segment straight away. Type several separated by commas, or pass a list from an earlier step.

**Outputs**

- `ids_added` (number): How many ids it got
- `segment` (object): The new segment

**Example output**

```json
{
  "ids_added": 2,
  "segment": {
    "count": 2,
    "createdTime": 1792438637085,
    "created_at": "2026-10-19T19:37:17.085000Z",
    "creatorName": "Jo Bloggs",
    "description": "People trying new features early",
    "id": "beta_testers",
    "idType": "userID",
    "isEnabled": true,
    "lastModifiedTime": 1792438637233,
    "lastModifierName": "Jo Bloggs",
    "last_modified_at": "2026-10-19T19:37:17.233000Z",
    "name": "Beta Testers",
    "tags": [],
    "type": "id_list"
  }
}
```

### Delete dynamic config

Delete a dynamic config for good.

**Inputs**

- Dynamic config (`dynamic_config`, text, required): The dynamic config.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `dynamic_config_id` (text): The dynamic config deleted

**Example output**

```json
{
  "deleted": true,
  "dynamic_config_id": "pricing_page"
}
```

### Delete feature gate

Delete a feature gate for good.

**Inputs**

- Feature gate (`gate`, text, required): The feature gate.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `gate_id` (text): The gate deleted

**Example output**

```json
{
  "deleted": true,
  "gate_id": "new_checkout"
}
```

### Delete segment

Delete a segment for good.

**Inputs**

- Segment (`segment`, text, required): The segment.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `segment_id` (text): The segment deleted

**Example output**

```json
{
  "deleted": true,
  "segment_id": "beta_testers"
}
```

### Get dynamic config

Get one dynamic config with its default value and rules.

**Inputs**

- Dynamic config (`dynamic_config`, text, required): The dynamic config.

**Outputs**

- `dynamic_config` (object): The dynamic config

**Example output**

```json
{
  "dynamic_config": {
    "checksPerHour": 0,
    "createdTime": 1792438637085,
    "created_at": "2026-10-19T19:37:17.085000Z",
    "creatorName": "Jo Bloggs",
    "defaultValue": {
      "button_color": "blue",
      "max_items": 10
    },
    "description": "Settings for the pricing page",
    "id": "pricing_page",
    "idType": "userID",
    "isEnabled": true,
    "lastModifiedTime": 1792438637233,
    "lastModifierName": "Jo Bloggs",
    "last_modified_at": "2026-10-19T19:37:17.233000Z",
    "name": "Pricing Page",
    "permalink": "https://console.statsig.com/4YLTPh/dynamic_configs/pricing_page",
    "rules": [],
    "status": "Active",
    "tags": [],
    "version": 1
  }
}
```

### Get feature gate

Get one feature gate with its rules and whether it is on.

**Inputs**

- Feature gate (`gate`, text, required): The feature gate.

**Outputs**

- `gate` (object): The feature gate

**Example output**

```json
{
  "gate": {
    "checksPerHour": 0,
    "createdTime": 1792438637085,
    "created_at": "2026-10-19T19:37:17.085000Z",
    "creatorName": "Jo Bloggs",
    "description": "The redesigned checkout page",
    "id": "new_checkout",
    "idType": "userID",
    "isEnabled": true,
    "lastModifiedTime": 1792438637233,
    "lastModifierName": "Jo Bloggs",
    "last_modified_at": "2026-10-19T19:37:17.233000Z",
    "name": "New Checkout",
    "permalink": "https://console.statsig.com/4YLTPh/gates/new_checkout",
    "rules": [],
    "status": "In Progress",
    "tags": [
      "\u2605 Core"
    ],
    "type": "TEMPORARY",
    "version": 1
  }
}
```

### List audit log

List changes made in the project, newest first: who changed which gate, config, segment or experiment, and when.

**Inputs**

- From (`start_date`, date): The first day to include. Leave empty for the 90 days up to the To date.
- To (`end_date`, date): The last day to include. Leave empty for today.
- Page (`page`, number): Which page of results to return, starting at 1. At least 1. Default: `1`.
- Results per page (`limit`, number): How many to return per page, 1-100. Defaults to 50. From 1 to 100. Default: `50`.

**Outputs**

- `audit_logs` (list): The changes
- `has_more` (true/false): Whether a later page has more
- `page` (number): The page returned, from 1
- `total` (number): How many there are in all

**Example output**

```json
{
  "audit_logs": [
    {
      "actionType": "gate_update",
      "changeLog": "Updated Gate",
      "changes": {},
      "date": "Mon Oct 19 2026",
      "id": "43i6fBPdP1cdrFJru1VoN6",
      "modifierEmail": "jo@example.com",
      "name": "new_checkout",
      "tags": [],
      "time": "19:37:29 GMT+0000 (Coordinated Universal Time)",
      "updatedBy": "Jo Bloggs",
      "updatedByUserID": "6YnxAUCsHDkhTxkQKiF0iv"
    }
  ],
  "has_more": false,
  "page": 1,
  "total": 1
}
```

### List dynamic configs

List the project's dynamic configs, a page at a time.

**Inputs**

- Page (`page`, number): Which page of results to return, starting at 1. At least 1. Default: `1`.
- Results per page (`limit`, number): How many to return per page, 1-100. Defaults to 50. From 1 to 100. Default: `50`.

**Outputs**

- `dynamic_configs` (list): The dynamic configs
- `has_more` (true/false): Whether a later page has more
- `page` (number): The page returned, from 1
- `total` (number): How many there are in all

**Example output**

```json
{
  "dynamic_configs": [
    {
      "checksPerHour": 0,
      "createdTime": 1792438637085,
      "created_at": "2026-10-19T19:37:17.085000Z",
      "creatorName": "Jo Bloggs",
      "defaultValue": {
        "button_color": "blue",
        "max_items": 10
      },
      "description": "Settings for the pricing page",
      "id": "pricing_page",
      "idType": "userID",
      "isEnabled": true,
      "lastModifiedTime": 1792438637233,
      "lastModifierName": "Jo Bloggs",
      "last_modified_at": "2026-10-19T19:37:17.233000Z",
      "name": "Pricing Page",
      "permalink": "https://console.statsig.com/4YLTPh/dynamic_configs/pricing_page",
      "rules": [],
      "status": "Active",
      "tags": [],
      "version": 1
    }
  ],
  "has_more": false,
  "page": 1,
  "total": 1
}
```

### List experiments

List the project's experiments with their status, groups and dates, optionally only those in some statuses.

**Inputs**

- Status (`status`, list): Only experiments in these statuses. Leave empty for all. One or more of: `setup` (Setting up), `active` (Running), `decision_made` (Decision made), `experiment_stopped` (Stopped), `assignment_stopped` (Assignment stopped), `abandoned`, `archived`.
- Page (`page`, number): Which page of results to return, starting at 1. At least 1. Default: `1`.
- Results per page (`limit`, number): How many to return per page, 1-100. Defaults to 50. From 1 to 100. Default: `50`.

**Outputs**

- `experiments` (list): The experiments
- `has_more` (true/false): Whether a later page has more
- `page` (number): The page returned, from 1
- `total` (number): How many there are in all

**Example output**

```json
{
  "experiments": [
    {
      "allocation": 100,
      "controlGroupID": "4eTbEGOm2sY3xq9cbwJ2nu",
      "createdTime": 1792438637085,
      "created_at": "2026-10-19T19:37:17.085000Z",
      "creatorName": "Jo Bloggs",
      "decisionReason": null,
      "description": "Does a bigger button sell more?",
      "duration": 14,
      "endTime": null,
      "groups": [
        {
          "name": "Control",
          "size": 50
        },
        {
          "name": "Test",
          "size": 50
        }
      ],
      "hypothesis": "A bigger button raises checkouts",
      "id": "checkout_button",
      "idType": "userID",
      "isEnabled": true,
      "lastModifiedTime": 1792438637233,
      "lastModifierName": "Jo Bloggs",
      "last_modified_at": "2026-10-19T19:37:17.233000Z",
      "launchedGroupID": null,
      "layerID": null,
      "name": "Checkout Button",
      "permalink": "https://console.statsig.com/4YLTPh/experiments/checkout_button",
      "startTime": 1792438637085,
      "status": "active",
      "tags": []
    }
  ],
  "has_more": false,
  "page": 1,
  "total": 1
}
```

### List feature gates

List the project's feature gates, a page at a time.

**Inputs**

- Page (`page`, number): Which page of results to return, starting at 1. At least 1. Default: `1`.
- Results per page (`limit`, number): How many to return per page, 1-100. Defaults to 50. From 1 to 100. Default: `50`.

**Outputs**

- `gates` (list): The feature gates
- `has_more` (true/false): Whether a later page has more
- `page` (number): The page returned, from 1
- `total` (number): How many there are in all

**Example output**

```json
{
  "gates": [
    {
      "checksPerHour": 0,
      "createdTime": 1792438637085,
      "created_at": "2026-10-19T19:37:17.085000Z",
      "creatorName": "Jo Bloggs",
      "description": "The redesigned checkout page",
      "id": "new_checkout",
      "idType": "userID",
      "isEnabled": true,
      "lastModifiedTime": 1792438637233,
      "lastModifierName": "Jo Bloggs",
      "last_modified_at": "2026-10-19T19:37:17.233000Z",
      "name": "New Checkout",
      "permalink": "https://console.statsig.com/4YLTPh/gates/new_checkout",
      "rules": [],
      "status": "In Progress",
      "tags": [
        "\u2605 Core"
      ],
      "type": "TEMPORARY",
      "version": 1
    }
  ],
  "has_more": false,
  "page": 1,
  "total": 1
}
```

### List segment IDs

List the ids in an ID list segment, a page at a time.

**Inputs**

- Segment (`segment`, text, required): The ID list segment.
- Page (`page`, number): Which page of results to return, starting at 1. At least 1. Default: `1`.
- Results per page (`limit`, number): How many to return per page, 1-100. Defaults to 50. From 1 to 100. Default: `50`.

**Outputs**

- `count` (number): How many ids the segment holds in all
- `has_more` (true/false): Whether a later page has more
- `ids` (list): The ids
- `page` (number): The page returned, from 1
- `segment_id` (text): The segment

**Example output**

```json
{
  "count": 2,
  "has_more": false,
  "ids": [
    "user_123",
    "user_456"
  ],
  "page": 1,
  "segment_id": "beta_testers"
}
```

### List segments

List the project's segments with their type and, for ID lists, how many ids they hold.

**Inputs**

- Page (`page`, number): Which page of results to return, starting at 1. At least 1. Default: `1`.
- Results per page (`limit`, number): How many to return per page, 1-100. Defaults to 50. From 1 to 100. Default: `50`.

**Outputs**

- `has_more` (true/false): Whether a later page has more
- `page` (number): The page returned, from 1
- `segments` (list): The segments
- `total` (number): How many there are in all

**Example output**

```json
{
  "has_more": false,
  "page": 1,
  "segments": [
    {
      "count": 2,
      "createdTime": 1792438637085,
      "created_at": "2026-10-19T19:37:17.085000Z",
      "creatorName": "Jo Bloggs",
      "description": "People trying new features early",
      "id": "beta_testers",
      "idType": "userID",
      "isEnabled": true,
      "lastModifiedTime": 1792438637233,
      "lastModifierName": "Jo Bloggs",
      "last_modified_at": "2026-10-19T19:37:17.233000Z",
      "name": "Beta Testers",
      "tags": [],
      "type": "id_list"
    }
  ],
  "total": 1
}
```

### Remove IDs from segment

Take user ids (or other ids) out of an ID list segment.

**Inputs**

- Segment (`segment`, text, required): The ID list segment.
- IDs (`ids`, list, required): The IDs, of the segment's ID type (user ids for a User ID segment). Type several separated by commas, or pass a list from an earlier step.

**Outputs**

- `count` (number): How many ids were sent
- `ids` (list): The ids
- `segment_id` (text): The segment

**Example output**

```json
{
  "count": 1,
  "ids": [
    "user_456"
  ],
  "segment_id": "beta_testers"
}
```

### Remove users from feature gate

Stop letting users through a feature gate, or keeping them out, so its rules decide for them again.

**Inputs**

- Feature gate (`gate`, text, required): The feature gate.
- User ids (`user_ids`, list, required): User ids to stop letting through or keeping out, so the gate's rules decide for them again. Type several separated by commas, or pass a list from an earlier step.

**Outputs**

- `failing_user_ids` (list): Every user the gate now always keeps out
- `gate_id` (text): The gate
- `passing_user_ids` (list): Every user the gate now always lets through

**Example output**

```json
{
  "failing_user_ids": [],
  "gate_id": "new_checkout",
  "passing_user_ids": []
}
```

### Turn off feature gate

Turn a feature gate off, so it lets no one through. Use it as a kill switch.

**Inputs**

- Feature gate (`gate`, text, required): The feature gate.

**Outputs**

- `gate` (object): The feature gate

**Example output**

```json
{
  "gate": {
    "checksPerHour": 0,
    "createdTime": 1792438637085,
    "created_at": "2026-10-19T19:37:17.085000Z",
    "creatorName": "Jo Bloggs",
    "description": "The redesigned checkout page",
    "id": "new_checkout",
    "idType": "userID",
    "isEnabled": false,
    "lastModifiedTime": 1792438637233,
    "lastModifierName": "Jo Bloggs",
    "last_modified_at": "2026-10-19T19:37:17.233000Z",
    "name": "New Checkout",
    "permalink": "https://console.statsig.com/4YLTPh/gates/new_checkout",
    "rules": [],
    "status": "In Progress",
    "tags": [
      "\u2605 Core"
    ],
    "type": "TEMPORARY",
    "version": 1
  }
}
```

### Turn on feature gate

Turn a feature gate on, so its rules decide who passes.

**Inputs**

- Feature gate (`gate`, text, required): The feature gate.

**Outputs**

- `gate` (object): The feature gate

**Example output**

```json
{
  "gate": {
    "checksPerHour": 0,
    "createdTime": 1792438637085,
    "created_at": "2026-10-19T19:37:17.085000Z",
    "creatorName": "Jo Bloggs",
    "description": "The redesigned checkout page",
    "id": "new_checkout",
    "idType": "userID",
    "isEnabled": true,
    "lastModifiedTime": 1792438637233,
    "lastModifierName": "Jo Bloggs",
    "last_modified_at": "2026-10-19T19:37:17.233000Z",
    "name": "New Checkout",
    "permalink": "https://console.statsig.com/4YLTPh/gates/new_checkout",
    "rules": [],
    "status": "In Progress",
    "tags": [
      "\u2605 Core"
    ],
    "type": "TEMPORARY",
    "version": 1
  }
}
```
