curl -X POST \
https://api.upstash.com/v2/team \
-u 'EMAIL:API_KEY' \
-d '{"team_name":"myteam","copy_cc":true}'
import requests
data = '{"team_name":"myteam","copy_cc":true}'
response = requests.post('https://api.upstash.com/v2/team', data=data, auth=('EMAIL', 'API_KEY'))
response.content
client := &http.Client{}
var data = strings.NewReader(`{
"team_name":"myteam",
"copy_cc":true
}`)
req, err := http.NewRequest("POST", "https://api.upstash.com/v2/team", data)
if err != nil {
log.Fatal(err)
}
req.SetBasicAuth("email", "api_key")
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
bodyText, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", bodyText);
{
"team_id": "75b471f2-15a1-47b0-8ce5-12a57682bfc9",
"team_name": "test_team_name_2",
"copy_cc": true
}
Teams
Create Team
This endpoint creates a new team.
POST
/
v2
/
team
curl -X POST \
https://api.upstash.com/v2/team \
-u 'EMAIL:API_KEY' \
-d '{"team_name":"myteam","copy_cc":true}'
import requests
data = '{"team_name":"myteam","copy_cc":true}'
response = requests.post('https://api.upstash.com/v2/team', data=data, auth=('EMAIL', 'API_KEY'))
response.content
client := &http.Client{}
var data = strings.NewReader(`{
"team_name":"myteam",
"copy_cc":true
}`)
req, err := http.NewRequest("POST", "https://api.upstash.com/v2/team", data)
if err != nil {
log.Fatal(err)
}
req.SetBasicAuth("email", "api_key")
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
bodyText, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", bodyText);
{
"team_id": "75b471f2-15a1-47b0-8ce5-12a57682bfc9",
"team_name": "test_team_name_2",
"copy_cc": true
}
Request Parameters
string
required
Name of the new team
boolean
required
Whether to copy existing credit card information to team or not\ Options:
true or falseResponse Parameters
string
ID of the created team
string
Name of the created team
boolean
Whether creditcard information added to team during creation or not
curl -X POST \
https://api.upstash.com/v2/team \
-u 'EMAIL:API_KEY' \
-d '{"team_name":"myteam","copy_cc":true}'
import requests
data = '{"team_name":"myteam","copy_cc":true}'
response = requests.post('https://api.upstash.com/v2/team', data=data, auth=('EMAIL', 'API_KEY'))
response.content
client := &http.Client{}
var data = strings.NewReader(`{
"team_name":"myteam",
"copy_cc":true
}`)
req, err := http.NewRequest("POST", "https://api.upstash.com/v2/team", data)
if err != nil {
log.Fatal(err)
}
req.SetBasicAuth("email", "api_key")
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
bodyText, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", bodyText);
{
"team_id": "75b471f2-15a1-47b0-8ce5-12a57682bfc9",
"team_name": "test_team_name_2",
"copy_cc": true
}
Was this page helpful?
⌘I