POST
/
console
/
v1
/
dynamic_configs
curl --request POST \
  --url https://statsigapi.net/console/v1/dynamic_configs \
  --header 'Content-Type: application/json' \
  --header 'STATSIG-API-KEY: <api-key>' \
  --data '{
  "isEnabled": true,
  "description": "<string>",
  "rules": [
    {
      "name": "<string>",
      "passPercentage": 50,
      "conditions": [
        {
          "targetValue": [
            "<string>"
          ],
          "operator": "<string>",
          "field": "<string>",
          "customID": "<string>",
          "type": "app_version"
        }
      ],
      "environments": [
        "<string>"
      ],
      "id": "<string>",
      "baseID": "<string>",
      "returnValue": {},
      "returnValueJson5": "<string>"
    }
  ],
  "defaultValue": {},
  "defaultValueJson5": "<string>",
  "idType": "userID",
  "tags": [
    "<string>"
  ],
  "creatorID": "<string>",
  "owner": {
    "ownerID": "user123",
    "ownerType": "USER",
    "ownerName": "John Doe",
    "ownerEmail": "owner123@test.com"
  },
  "creatorEmail": "<string>",
  "schema": "<string>",
  "schemaJson5": "<string>",
  "targetApps": "<string>",
  "team": "<string>",
  "teamID": "<string>",
  "precommitWebhook": {
    "url": "<string>",
    "internalStatusUrl": "<string>"
  },
  "name": "<string>",
  "id": "<string>"
}'
{
  "message": "Dynamic Config created successfully.",
  "data": {
    "id": "a_dynamic_config",
    "name": "a dynamic config",
    "description": "helpful summary of what this dynamic config does",
    "idType": "userID",
    "lastModifierID": "1vaQaBoLlkauH9iiuOSBP2",
    "lastModifiedTime": 1707344887865,
    "lastModifierName": "CONSOLE API",
    "lastModifierEmail": null,
    "creatorID": "1vaQaBoLlkauH9iiuOSBP2",
    "createdTime": 1707344887764,
    "creatorName": "CONSOLE API",
    "creatorEmail": null,
    "targetApps": [],
    "holdoutIDs": [],
    "tags": [],
    "isEnabled": true,
    "rules": [],
    "defaultValue": {}
  }
}

Authorizations

STATSIG-API-KEY
string
header
required

Headers

x-respect-review-settings
string

Optional header to respect review settings for mutation endpoints.

Body

application/json

Response

200
application/json

Create gate response

The response is of type object.