curl --request PUT \
--url https://statsigapi.net/console/v1/gates/{id}/archive \
--header 'Content-Type: application/json' \
--header 'STATSIG-API-KEY: <api-key>' \
--data '{
"forceArchive": true,
"archiveReason": "The gate is no longer needed"
}'
{
"message": "Gate updated successfully.",
"data": {
"id": "a_gate",
"name": "A Gate",
"description": "description",
"idType": "userID",
"lastModifierID": "1vaQaBoLlkauH9iiuOSBP2",
"lastModifiedTime": 1705691355849,
"lastModifierName": "CONSOLE API",
"lastModifierEmail": null,
"creatorID": "1vaQaBoLlkauH9iiuOSBP2",
"createdTime": 1705691325569,
"creatorName": "CONSOLE API",
"creatorEmail": null,
"targetApps": [],
"holdoutIDs": [],
"tags": [],
"isEnabled": true,
"status": "Archived",
"rules": [],
"checksPerHour": 0,
"type": "PERMANENT",
"typeReason": "NONE",
"team": null,
"reviewSettings": {
"requiredReview": false,
"allowedReviewers": []
},
"measureMetricLifts": true,
"owner": {
"ownerID": "user123",
"ownerName": "CONSOLE API",
"ownerType": "SDK_KEY",
"ownerEmail": ""
},
"monitoringMetrics": []
}
}
curl --request PUT \
--url https://statsigapi.net/console/v1/gates/{id}/archive \
--header 'Content-Type: application/json' \
--header 'STATSIG-API-KEY: <api-key>' \
--data '{
"forceArchive": true,
"archiveReason": "The gate is no longer needed"
}'
{
"message": "Gate updated successfully.",
"data": {
"id": "a_gate",
"name": "A Gate",
"description": "description",
"idType": "userID",
"lastModifierID": "1vaQaBoLlkauH9iiuOSBP2",
"lastModifiedTime": 1705691355849,
"lastModifierName": "CONSOLE API",
"lastModifierEmail": null,
"creatorID": "1vaQaBoLlkauH9iiuOSBP2",
"createdTime": 1705691325569,
"creatorName": "CONSOLE API",
"creatorEmail": null,
"targetApps": [],
"holdoutIDs": [],
"tags": [],
"isEnabled": true,
"status": "Archived",
"rules": [],
"checksPerHour": 0,
"type": "PERMANENT",
"typeReason": "NONE",
"team": null,
"reviewSettings": {
"requiredReview": false,
"allowedReviewers": []
},
"measureMetricLifts": true,
"owner": {
"ownerID": "user123",
"ownerName": "CONSOLE API",
"ownerType": "SDK_KEY",
"ownerEmail": ""
},
"monitoringMetrics": []
}
}
Optional header to respect review settings for mutation endpoints.
id
Archive gate response
The response is of type object
.