Layers
post/console/v1/layers

Request

  • Base URL
    https://statsigapi.net
  • URL
    https://statsigapi.net/console/v1/layers
  • Auth
    API key in header STATSIG-API-KEY

Request body

namestring required

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.

idTypestring required

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

teamstring

Optional identifier for the team responsible for this layer.

Response

Create Layer Response

messagestring required

A simple string explaining the result of the operation.

Example response

{
  "message": "Layer created successfully.",
  "data": {
    "id": "the_best_layer",
    "description": "helpful summary of what this layer does",
    "idType": "userID",
    "lastModifierID": "4dcQUIpS8PHObBGD7HJwOx",
    "lastModifiedTime": 1720733945538,
    "lastModifierName": "CONSOLE API",
    "lastModifierEmail": null,
    "creatorID": "4dcQUIpS8PHObBGD7HJwOx",
    "createdTime": 1720733942515,
    "creatorName": "CONSOLE API",
    "creatorEmail": null,
    "targetApps": [
      "Android"
    ],
    "holdoutIDs": [
      "global_holdout",
      "test_holdout"
    ],
    "tags": [],
    "team": "Console Team",
    "isImplicitLayer": false,
    "parameters": [],
    "targeting_gate_parameter_values": [],
    "holdout_parameter_values": [],
    "permalink": "https://console.statsig.com/company_id/layers/the_best_layer"
  }
}

Changes

    • info

      added the required property // to the response with the status

    • info

      added the required property // to the response with the status