Delete a team
curl --request DELETE \
--url https://app.trelica.com/api/people/v1/teams/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trelica.com/api/people/v1/teams/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trelica.com/api/people/v1/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://app.trelica.com/api/people/v1/teams/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trelica.com/api/people/v1/teams/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://app.trelica.com/api/people/v1/teams/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trelica.com/api/people/v1/teams/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"type": "about:blank",
"title": "One or more validation errors occurred.",
"status": 400,
"detail": "The request body failed validation. See errors for the offending fields.",
"errors": {
"email": [
"The email field is required."
]
},
"traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
}{
"type": "about:blank",
"title": "Not found.",
"status": 404,
"detail": "The requested resource does not exist or you do not have access to it.",
"traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
}Teams
Delete a team
Deletes the team with the given ID, along with its descendants, and removes the corresponding memberships from people. Teams that are in use by integrations cannot be deleted.
Required scope: People.Write (Write access to people and teams)
DELETE
/
api
/
people
/
v1
/
teams
/
{id}
Delete a team
curl --request DELETE \
--url https://app.trelica.com/api/people/v1/teams/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trelica.com/api/people/v1/teams/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trelica.com/api/people/v1/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://app.trelica.com/api/people/v1/teams/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trelica.com/api/people/v1/teams/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://app.trelica.com/api/people/v1/teams/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trelica.com/api/people/v1/teams/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"type": "about:blank",
"title": "One or more validation errors occurred.",
"status": 400,
"detail": "The request body failed validation. See errors for the offending fields.",
"errors": {
"email": [
"The email field is required."
]
},
"traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
}{
"type": "about:blank",
"title": "Not found.",
"status": 404,
"detail": "The requested resource does not exist or you do not have access to it.",
"traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
}Related topics
Add and remove team membersAbout vault permissionsManage vault permissions using 1Password SDKsWas this page helpful?
⌘I