curl --request PATCH \
--url https://statsigapi.net/console/v1/users/teams/{id} \
--header 'Content-Type: application/json' \
--header 'STATSIG-API-KEY: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"id": "<string>",
"members": [
"<string>"
],
"admins": [
"<string>"
],
"defaultGateMetrics": [
{
"name": "<string>",
"type": "<string>"
}
],
"defaultExperimentPrimaryMetrics": [
{
"name": "<string>",
"type": "<string>"
}
],
"defaultExperimentSecondaryMetrics": [
{
"name": "<string>",
"type": "<string>"
}
],
"defaultHoldoutMetrics": [
{
"name": "<string>",
"type": "<string>"
}
],
"defaultTargetApplications": [
"<string>"
],
"defaultHoldoutID": "<string>",
"requireReviews": true,
"requireGateTemplates": true,
"requireExperimentTemplates": true,
"requireDynamicConfigTemplates": true
}
'import requests
url = "https://statsigapi.net/console/v1/users/teams/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"id": "<string>",
"members": ["<string>"],
"admins": ["<string>"],
"defaultGateMetrics": [
{
"name": "<string>",
"type": "<string>"
}
],
"defaultExperimentPrimaryMetrics": [
{
"name": "<string>",
"type": "<string>"
}
],
"defaultExperimentSecondaryMetrics": [
{
"name": "<string>",
"type": "<string>"
}
],
"defaultHoldoutMetrics": [
{
"name": "<string>",
"type": "<string>"
}
],
"defaultTargetApplications": ["<string>"],
"defaultHoldoutID": "<string>",
"requireReviews": True,
"requireGateTemplates": True,
"requireExperimentTemplates": True,
"requireDynamicConfigTemplates": True
}
headers = {
"STATSIG-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'STATSIG-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
id: '<string>',
members: ['<string>'],
admins: ['<string>'],
defaultGateMetrics: [{name: '<string>', type: '<string>'}],
defaultExperimentPrimaryMetrics: [{name: '<string>', type: '<string>'}],
defaultExperimentSecondaryMetrics: [{name: '<string>', type: '<string>'}],
defaultHoldoutMetrics: [{name: '<string>', type: '<string>'}],
defaultTargetApplications: ['<string>'],
defaultHoldoutID: '<string>',
requireReviews: true,
requireGateTemplates: true,
requireExperimentTemplates: true,
requireDynamicConfigTemplates: true
})
};
fetch('https://statsigapi.net/console/v1/users/teams/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://statsigapi.net/console/v1/users/teams/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'id' => '<string>',
'members' => [
'<string>'
],
'admins' => [
'<string>'
],
'defaultGateMetrics' => [
[
'name' => '<string>',
'type' => '<string>'
]
],
'defaultExperimentPrimaryMetrics' => [
[
'name' => '<string>',
'type' => '<string>'
]
],
'defaultExperimentSecondaryMetrics' => [
[
'name' => '<string>',
'type' => '<string>'
]
],
'defaultHoldoutMetrics' => [
[
'name' => '<string>',
'type' => '<string>'
]
],
'defaultTargetApplications' => [
'<string>'
],
'defaultHoldoutID' => '<string>',
'requireReviews' => true,
'requireGateTemplates' => true,
'requireExperimentTemplates' => true,
'requireDynamicConfigTemplates' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"STATSIG-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://statsigapi.net/console/v1/users/teams/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"id\": \"<string>\",\n \"members\": [\n \"<string>\"\n ],\n \"admins\": [\n \"<string>\"\n ],\n \"defaultGateMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultExperimentPrimaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultExperimentSecondaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultHoldoutMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultTargetApplications\": [\n \"<string>\"\n ],\n \"defaultHoldoutID\": \"<string>\",\n \"requireReviews\": true,\n \"requireGateTemplates\": true,\n \"requireExperimentTemplates\": true,\n \"requireDynamicConfigTemplates\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("STATSIG-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://statsigapi.net/console/v1/users/teams/{id}")
.header("STATSIG-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"id\": \"<string>\",\n \"members\": [\n \"<string>\"\n ],\n \"admins\": [\n \"<string>\"\n ],\n \"defaultGateMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultExperimentPrimaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultExperimentSecondaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultHoldoutMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultTargetApplications\": [\n \"<string>\"\n ],\n \"defaultHoldoutID\": \"<string>\",\n \"requireReviews\": true,\n \"requireGateTemplates\": true,\n \"requireExperimentTemplates\": true,\n \"requireDynamicConfigTemplates\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://statsigapi.net/console/v1/users/teams/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["STATSIG-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"id\": \"<string>\",\n \"members\": [\n \"<string>\"\n ],\n \"admins\": [\n \"<string>\"\n ],\n \"defaultGateMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultExperimentPrimaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultExperimentSecondaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultHoldoutMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultTargetApplications\": [\n \"<string>\"\n ],\n \"defaultHoldoutID\": \"<string>\",\n \"requireReviews\": true,\n \"requireGateTemplates\": true,\n \"requireExperimentTemplates\": true,\n \"requireDynamicConfigTemplates\": true\n}"
response = http.request(request)
puts response.read_body{
"message": "Team updated successfully.",
"data": {
"name": "The Avengers",
"members": [
{
"email": "test@statsig.com",
"firstName": "test",
"lastName": "user",
"role": "admin"
}
],
"admins": [],
"defaultGateMetrics": [
{
"name": "A metric for asd ",
"type": "event_count_custom"
}
],
"defaultExperimentPrimaryMetrics": [
{
"name": "A metric for aaaa ",
"type": "event_count_custom"
}
],
"defaultExperimentSecondaryMetrics": [],
"defaultHoldoutMetrics": [],
"changeTeamConfigs": "anyone",
"reviewApproval": "anyone",
"defaultTargetApplications": [
"Android"
]
}
}{
"status": 400,
"message": "Invalid request. Please check the request input and try again."
}{
"status": 401,
"message": "This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx"
}Update Team. Ops: Replace. Use GET for current data if you intent to Add.
curl --request PATCH \
--url https://statsigapi.net/console/v1/users/teams/{id} \
--header 'Content-Type: application/json' \
--header 'STATSIG-API-KEY: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"id": "<string>",
"members": [
"<string>"
],
"admins": [
"<string>"
],
"defaultGateMetrics": [
{
"name": "<string>",
"type": "<string>"
}
],
"defaultExperimentPrimaryMetrics": [
{
"name": "<string>",
"type": "<string>"
}
],
"defaultExperimentSecondaryMetrics": [
{
"name": "<string>",
"type": "<string>"
}
],
"defaultHoldoutMetrics": [
{
"name": "<string>",
"type": "<string>"
}
],
"defaultTargetApplications": [
"<string>"
],
"defaultHoldoutID": "<string>",
"requireReviews": true,
"requireGateTemplates": true,
"requireExperimentTemplates": true,
"requireDynamicConfigTemplates": true
}
'import requests
url = "https://statsigapi.net/console/v1/users/teams/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"id": "<string>",
"members": ["<string>"],
"admins": ["<string>"],
"defaultGateMetrics": [
{
"name": "<string>",
"type": "<string>"
}
],
"defaultExperimentPrimaryMetrics": [
{
"name": "<string>",
"type": "<string>"
}
],
"defaultExperimentSecondaryMetrics": [
{
"name": "<string>",
"type": "<string>"
}
],
"defaultHoldoutMetrics": [
{
"name": "<string>",
"type": "<string>"
}
],
"defaultTargetApplications": ["<string>"],
"defaultHoldoutID": "<string>",
"requireReviews": True,
"requireGateTemplates": True,
"requireExperimentTemplates": True,
"requireDynamicConfigTemplates": True
}
headers = {
"STATSIG-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'STATSIG-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
id: '<string>',
members: ['<string>'],
admins: ['<string>'],
defaultGateMetrics: [{name: '<string>', type: '<string>'}],
defaultExperimentPrimaryMetrics: [{name: '<string>', type: '<string>'}],
defaultExperimentSecondaryMetrics: [{name: '<string>', type: '<string>'}],
defaultHoldoutMetrics: [{name: '<string>', type: '<string>'}],
defaultTargetApplications: ['<string>'],
defaultHoldoutID: '<string>',
requireReviews: true,
requireGateTemplates: true,
requireExperimentTemplates: true,
requireDynamicConfigTemplates: true
})
};
fetch('https://statsigapi.net/console/v1/users/teams/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://statsigapi.net/console/v1/users/teams/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'id' => '<string>',
'members' => [
'<string>'
],
'admins' => [
'<string>'
],
'defaultGateMetrics' => [
[
'name' => '<string>',
'type' => '<string>'
]
],
'defaultExperimentPrimaryMetrics' => [
[
'name' => '<string>',
'type' => '<string>'
]
],
'defaultExperimentSecondaryMetrics' => [
[
'name' => '<string>',
'type' => '<string>'
]
],
'defaultHoldoutMetrics' => [
[
'name' => '<string>',
'type' => '<string>'
]
],
'defaultTargetApplications' => [
'<string>'
],
'defaultHoldoutID' => '<string>',
'requireReviews' => true,
'requireGateTemplates' => true,
'requireExperimentTemplates' => true,
'requireDynamicConfigTemplates' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"STATSIG-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://statsigapi.net/console/v1/users/teams/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"id\": \"<string>\",\n \"members\": [\n \"<string>\"\n ],\n \"admins\": [\n \"<string>\"\n ],\n \"defaultGateMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultExperimentPrimaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultExperimentSecondaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultHoldoutMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultTargetApplications\": [\n \"<string>\"\n ],\n \"defaultHoldoutID\": \"<string>\",\n \"requireReviews\": true,\n \"requireGateTemplates\": true,\n \"requireExperimentTemplates\": true,\n \"requireDynamicConfigTemplates\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("STATSIG-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://statsigapi.net/console/v1/users/teams/{id}")
.header("STATSIG-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"id\": \"<string>\",\n \"members\": [\n \"<string>\"\n ],\n \"admins\": [\n \"<string>\"\n ],\n \"defaultGateMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultExperimentPrimaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultExperimentSecondaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultHoldoutMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultTargetApplications\": [\n \"<string>\"\n ],\n \"defaultHoldoutID\": \"<string>\",\n \"requireReviews\": true,\n \"requireGateTemplates\": true,\n \"requireExperimentTemplates\": true,\n \"requireDynamicConfigTemplates\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://statsigapi.net/console/v1/users/teams/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["STATSIG-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"id\": \"<string>\",\n \"members\": [\n \"<string>\"\n ],\n \"admins\": [\n \"<string>\"\n ],\n \"defaultGateMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultExperimentPrimaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultExperimentSecondaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultHoldoutMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"defaultTargetApplications\": [\n \"<string>\"\n ],\n \"defaultHoldoutID\": \"<string>\",\n \"requireReviews\": true,\n \"requireGateTemplates\": true,\n \"requireExperimentTemplates\": true,\n \"requireDynamicConfigTemplates\": true\n}"
response = http.request(request)
puts response.read_body{
"message": "Team updated successfully.",
"data": {
"name": "The Avengers",
"members": [
{
"email": "test@statsig.com",
"firstName": "test",
"lastName": "user",
"role": "admin"
}
],
"admins": [],
"defaultGateMetrics": [
{
"name": "A metric for asd ",
"type": "event_count_custom"
}
],
"defaultExperimentPrimaryMetrics": [
{
"name": "A metric for aaaa ",
"type": "event_count_custom"
}
],
"defaultExperimentSecondaryMetrics": [],
"defaultHoldoutMetrics": [],
"changeTeamConfigs": "anyone",
"reviewApproval": "anyone",
"defaultTargetApplications": [
"Android"
]
}
}{
"status": 400,
"message": "Invalid request. Please check the request input and try again."
}{
"status": 401,
"message": "This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx"
}Authorizations
Headers
Optional header to respect review settings for mutation endpoints.
Path Parameters
id
Body
The name of the team.
Description of the team.
The ID of the team.
Array of member email addresses in the team.
Array of admin email addresses in the team.
Default gate metrics for the team.
Show child attributes
Show child attributes
Default primary metrics for experiments in the team.
Show child attributes
Show child attributes
Default secondary metrics for experiments in the team.
Show child attributes
Show child attributes
Default holdout metrics for the team.
Show child attributes
Show child attributes
Who can change team configurations: "anyone" or "team_only".
anyone, team_only Who can review and approve changes: "anyone", "team_only", or "admin_only".
anyone, team_only, admin_only Default target applications for the team.
Default holdout ID for the team, if applicable.
Whether reviews are required for changes, if applicable.
Whether gate templates are required for the team, if applicable.
Whether experiment templates are required for the team, if applicable.
Whether dynamic config templates are required for the team, if applicable.

