Skip to main content
PUT
/
teams
/
{team_token}
Update team
curl --request PUT \
  --url https://api.vantage.sh/v2/teams/{team_token} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "workspace_tokens": [
    "<string>"
  ],
  "user_tokens": [
    "<string>"
  ],
  "user_emails": [
    "<string>"
  ],
  "default_dashboard_token": "<string>"
}
'
import requests

url = "https://api.vantage.sh/v2/teams/{team_token}"

payload = {
"name": "<string>",
"description": "<string>",
"workspace_tokens": ["<string>"],
"user_tokens": ["<string>"],
"user_emails": ["<string>"],
"default_dashboard_token": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
workspace_tokens: ['<string>'],
user_tokens: ['<string>'],
user_emails: ['<string>'],
default_dashboard_token: '<string>'
})
};

fetch('https://api.vantage.sh/v2/teams/{team_token}', 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://api.vantage.sh/v2/teams/{team_token}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'workspace_tokens' => [
'<string>'
],
'user_tokens' => [
'<string>'
],
'user_emails' => [
'<string>'
],
'default_dashboard_token' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$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://api.vantage.sh/v2/teams/{team_token}"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"workspace_tokens\": [\n \"<string>\"\n ],\n \"user_tokens\": [\n \"<string>\"\n ],\n \"user_emails\": [\n \"<string>\"\n ],\n \"default_dashboard_token\": \"<string>\"\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api.vantage.sh/v2/teams/{team_token}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"workspace_tokens\": [\n \"<string>\"\n ],\n \"user_tokens\": [\n \"<string>\"\n ],\n \"user_emails\": [\n \"<string>\"\n ],\n \"default_dashboard_token\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.vantage.sh/v2/teams/{team_token}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"workspace_tokens\": [\n \"<string>\"\n ],\n \"user_tokens\": [\n \"<string>\"\n ],\n \"user_emails\": [\n \"<string>\"\n ],\n \"default_dashboard_token\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "token": "team_d617e73dcc6b57c5",
  "name": "Updated Team",
  "description": "Updated Team Description",
  "workspace_tokens": [
    "wrkspc_efc4284a56772481"
  ],
  "user_tokens": [
    "usr_d268561e520c7aac"
  ],
  "default_dashboard_token": null
}
{
"errors": [
"<string>"
],
"links": {
"self": "<string>",
"first": "<string>",
"next": "<string>",
"last": "<string>",
"prev": "<string>"
}
}
{
"errors": [
"<string>"
],
"links": {
"self": "<string>",
"first": "<string>",
"next": "<string>",
"last": "<string>",
"prev": "<string>"
}
}
{
"errors": [
"<string>"
],
"links": {
"self": "<string>",
"first": "<string>",
"next": "<string>",
"last": "<string>",
"prev": "<string>"
}
}
{
"errors": [
"<string>"
],
"links": {
"self": "<string>",
"first": "<string>",
"next": "<string>",
"last": "<string>",
"prev": "<string>"
}
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

team_token
string
required

Body

application/json

Update a Team.

name
string

The name of the Team.

description
string

The description of the Team.

workspace_tokens
string[]

The Workspace tokens to associate to the Team.

user_tokens
string[]

The User tokens to associate to the Team.

user_emails
string[]

The User emails to associate to the Team.

role
enum<string>

The role to assign to the provided Users. Defaults to 'editor' which has editor permissions.

Available options:
owner,
editor,
viewer
default_dashboard_token
string | null

The token of a Dashboard to set as the Team default. Send null to clear.

Response

Team model

token
string
required
name
string
required

The name of the Team.

Example:

"Cost Savers"

description
string | null
required

The description of the Team.

Example:

"The Team that saves costs"

workspace_tokens
string[]
required

The tokens for any Workspaces that the Team belongs to

user_emails
string[]
required

The email addresses for Users that belong to the Team

user_tokens
string[]
required

The tokens for Users that belong to the Team

default_dashboard_token
string | null
required

The token of the default Dashboard for the Team.

Example:

"dshbrd_abcd1234"