Skip to main content
POST
/
console
/
v1
/
layers
/
{id}
Update a layer
curl --request POST \
  --url https://statsigapi.net/console/v1/layers/{id} \
  --header 'Content-Type: application/json' \
  --header 'STATSIG-API-KEY: <api-key>' \
  --data '{
  "description": "<string>",
  "parameters": [
    {
      "name": "<string>",
      "type": "string",
      "defaultValue": "<string>"
    }
  ],
  "targetApps": "<string>"
}'
{
  "message": "Layer updated successfully.",
  "data": {
    "id": "the_best_layer",
    "description": "new description",
    "idType": "userID",
    "lastModifierID": "4dcQUIpS8PHObBGD7HJwOx",
    "lastModifiedTime": 1720734957520,
    "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": [
      {
        "name": "a_parameter",
        "type": "boolean",
        "defaultValue": true
      },
      {
        "name": "b_parameter",
        "type": "number",
        "defaultValue": 123
      },
      {
        "name": "c_parameter",
        "type": "string",
        "defaultValue": "this is a string"
      },
      {
        "name": "d_parameter",
        "type": "array",
        "defaultValue": []
      },
      {
        "name": "e_parameter",
        "type": "object",
        "defaultValue": {
          "key": "value"
        }
      }
    ]
  }
}

Authorizations

STATSIG-API-KEY
string
header
required

Headers

x-respect-review-settings
string

Optional header to respect review settings for mutation endpoints.

Path Parameters

id
string
required

id

Body

application/json
description
string
required

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

Maximum length: 1000
parameters
object[]
required

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

targetApps

List of target applications that this layer is intended for.

Response

Update layer response

message
string
required

A simple string explaining the result of the operation.

data
object
required

A single result.