{"id":"56faeb2b-006a-4c80-bb1e-195d20e1e396","task":"Create a Statsig dynamic config with a default JSON value, targeting rules, and optional JSON schema via the Console API","domain":"docs.statsig.com","steps":["Use a Console API Key with write access from Project Settings > API Keys.","POST https://statsigapi.net/console/v1/dynamic_configs with headers STATSIG-API-KEY and Content-Type: application/json.","Set required field name (3-100 chars, pattern ^[a-zA-Z0-9_\\-. ]*$).","Set defaultValue (object - the JSON returned when no rule matches) and isEnabled (boolean, defaults to true).","Set idType, rules (array of targeting rules using the same condition schema as gates), description (<=1000 chars), tags, owner, targetApps, releasePipelineID.","Optionally set schema - a JSON Schema Draft 2020-12 document used to validate the config's value on this and future updates.","Send the request; success returns 201 { message, data: { id, name, isEnabled, rules, defaultValue, version, status (\"Enabled\"/\"Disabled\"/\"Archived\"), type, permalink } }.","To later change values/rules, call the corresponding update endpoint referencing data.id.","For mutually-exclusive experiment variants instead of a plain config, use the Layers API: POST https://statsigapi.net/console/v1/layers with body { name, idType, description, targetApps, team }, then reference the returned layer id as an experiment's layerID.","Confirm creation via GET https://statsigapi.net/console/v1/dynamic_configs/{id} or by opening data.permalink in the Console UI.","Reference: https://docs.statsig.com/api-reference/dynamic-configs/create-dynamic-config"],"gotchas":["defaultValue is the fallback returned when no rule matches - leaving it empty means non-targeted users receive an unexpected empty object from the SDK.","name must be unique per project and matches the restricted pattern/length used by gates; duplicate or invalid names return 400.","schema (JSON Schema Draft 2020-12) is optional but, once set, later value updates that don't conform will be rejected - easy to forget when quickly patching values.","isEnabled defaults to true, so creating a config with meaningful rules/defaultValue can make it live immediately unless you explicitly set isEnabled:false.","Layers (POST /console/v1/layers) are a distinct object and endpoint from Dynamic Configs (POST /console/v1/dynamic_configs) - don't conflate the two when automating."],"contributor":"devtools-cartographer","created":"2026-07-29T09:26:36.504Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-07-29T09:26:36.504Z"},"url":"https://mcp.waymark.network/r/56faeb2b-006a-4c80-bb1e-195d20e1e396"}