Create a Layer

posthttps://statsigapi.net/console/v1/layers

Authorizations

STATSIG-API-KEYstringrequired

apiKey (header)

Body

application/json
namestringrequired

The unique name of the layer, formatted as an ID (e.g., "A Layer" becomes "a_layer").

descriptionstring

A helpful description of what this layer does, providing context for its purpose.

idTypestringrequired

The type of ID used for this layer, essential for validation in services.

targetAppsoneOf

List of target applications that this layer is associated with.

teamstring

Optional identifier for the team responsible for this layer.

Response

application/json
201Create Layer Response
messagestringrequired

A simple string explaining the result of the operation.

dataobjectrequired
Show child attributes
idstringrequired

ID

namestring

Optional name for the configuration.

idTypestringrequired

The ID type used for this layer, important for validation.

descriptionstringrequired

A detailed description of the layer, explaining its purpose and functionality.

lastModifierIDstringrequired

ID of the last modifier.

lastModifiedTimenumberrequired

Time of the last modification.

lastModifierEmailstringrequired

Email of the last modifier.

lastModifierNamestringrequired

Name of the last modifier.

creatorIDstringrequired

ID of the user who created the entity.

createdTimenumberrequired

Timestamp when the entity was created.

creatorNamestringrequired

Name of the creator.

creatorEmailstringrequired

Email of the creator.

tagsstring[]

Optional tags for categorization.

targetAppsoneOf

List of target applications that this layer is intended for.

holdoutIDsstring[]

Holdouts applied to this configuration.

teamstring

Optional name for the responsible team.

teamIDstring

Optional ID of the responsible team.

versionnumber

Version number

isImplicitLayerbooleanrequired

Indicates if the layer was automatically created by Statsig during experiment creation.

parametersobject[]required

An array of parameters associated with the layer, each defining specific attributes.

Show child attributes
name[]stringrequired

The name of this parameter, used for identification within the layer.

type[]stringrequired

The data type that this parameter returns. Allowed types include: string, boolean, number, object, and array.

defaultValue[]oneOfrequired

The default value for this parameter, which must match the specified type.

description[]string

An optional helpful description of what this layer parameter does, providing context for its purpose.

schema[]string

Optional JSON schema for object parameters. If provided, defaultValue must satisfy the schema.

targeting_gate_parameter_valuesobject[]required

Parameter values returned when a targeting gate passes during ship-with-targeting.

Show child attributes
targetingGateName[]stringrequired

The name of the targeting gate for these shipped values.

parameters[]objectrequired

Layer parameter values returned when the targeting gate passes.

holdout_parameter_valuesobject[]required

Holdout-specific parameter values for this layer.

Show child attributes
holdoutID[]stringrequired

The ID of the holdout for these layer parameter values.

parameters[]objectrequired

Layer parameter values returned when the holdout gate passes.

excludeNewParams[]booleanrequired

Whether newly added layer parameters should be excluded from this holdout edge.

permalinkstringrequired

A permalink to this layer in the Statsig Console.

400Invalid request. Please check the request input and try again.
statusintegerrequired
messagestringrequired
401This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx
statusintegerrequired
messagestringrequired

Was this helpful?