---
canonical_url: "https://docs.composio.dev/toolkits/statsig"
markdown_url: "https://docs.composio.dev/toolkits/statsig.md"
product: "platform"
version: null
last_updated: null
---

# Statsig

Statsig provides server-side feature gate evaluation, dynamic configuration, experimentation, and event measurement APIs.

- **Category:** analytics
- **Auth:** API_KEY
- **Composio-managed OAuth available?** N/A
- **Tools:** 7
- **Triggers:** 0
- **Slug:** `STATSIG`
- **Version:** 00000000_00

## Tools

### Check Feature Gate

**Slug:** `STATSIG_CHECK_GATE`

Evaluate one Statsig feature gate with optional user context without logging an exposure. A false result can mean either that the context fails the gate or that the gate name does not exist.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `user` | object | No | Optional user context used to evaluate the gate. If provided, include user_id, email, or at least one custom_ids entry. |
| `gate_name` | string | Yes | Exact feature-gate name to evaluate. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Check Feature Gates

**Slug:** `STATSIG_CHECK_GATES`

Evaluate multiple Statsig feature gates with optional shared user context without logging exposures. Results are keyed by gate name; a false result does not prove that a gate exists.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `user` | object | No | Optional user context shared by all gate evaluations. If provided, include user_id, email, or at least one custom_ids entry. |
| `gate_names` | array | Yes | One or more exact feature-gate names to evaluate in one request. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Dynamic Config

**Slug:** `STATSIG_GET_DYNAMIC_CONFIG`

Evaluate a Statsig dynamic config or experiment with optional user context and return its value and assignment metadata without logging an exposure. A missing name returns an empty value object.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `user` | object | No | Optional user context used to evaluate the config. If provided, include user_id, email, or at least one custom_ids entry. |
| `config_name` | string | Yes | Exact dynamic-config or experiment name to evaluate (2-100 characters). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Layer

**Slug:** `STATSIG_GET_LAYER`

Evaluate a Statsig layer with optional user context and return its parameter values and assignment metadata without logging an exposure. A missing layer is reported as not found.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `user` | object | No | Optional user context used to evaluate the layer. If provided, include user_id, email, or at least one custom_ids entry. |
| `layer_name` | string | Yes | Exact layer name to evaluate (1-100 characters). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Ranked Variants

**Slug:** `STATSIG_GET_RANKED_VARIANTS`

Rank variants for a Statsig contextual-bandit Autotune configuration using optional user context without logging an exposure.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `user` | object | No | Optional user context used to rank the variants. If provided, include user_id, email, or at least one custom_ids entry. |
| `config_name` | string | Yes | Exact contextual-bandit Autotune config name (2-100 characters). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Log Custom Exposures

**Slug:** `STATSIG_LOG_CUSTOM_EXPOSURES`

Permanently log one or more Statsig gate, experiment, or dynamic-config exposures when automatic exposure logging is not being used. Acknowledged exposures cannot be deleted through the runtime API.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `exposures` | array | Yes | One or more gate exposures or experiment/config exposures identified by an assigned group or rule ID. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Log Events

**Slug:** `STATSIG_LOG_EVENTS`

Permanently log one or more custom Statsig events for analytics and metric calculation in a single batch. Acknowledged events cannot be deleted through the runtime API.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `events` | array | Yes | One or more custom events to log in a single batch. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
