Update Team
curl --request PATCH \
--url https://api.attention.tech/v2/organizations/teams/{teamId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Marketing",
"parentTeamUUID": "2ccf9bde-68e3-4de4-bc4e-51b927336665"
}
'import requests
url = "https://api.attention.tech/v2/organizations/teams/{teamId}"
payload = {
"name": "Marketing",
"parentTeamUUID": "2ccf9bde-68e3-4de4-bc4e-51b927336665"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Marketing', parentTeamUUID: '2ccf9bde-68e3-4de4-bc4e-51b927336665'})
};
fetch('https://api.attention.tech/v2/organizations/teams/{teamId}', 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.attention.tech/v2/organizations/teams/{teamId}",
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' => 'Marketing',
'parentTeamUUID' => '2ccf9bde-68e3-4de4-bc4e-51b927336665'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.attention.tech/v2/organizations/teams/{teamId}"
payload := strings.NewReader("{\n \"name\": \"Marketing\",\n \"parentTeamUUID\": \"2ccf9bde-68e3-4de4-bc4e-51b927336665\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<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://api.attention.tech/v2/organizations/teams/{teamId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Marketing\",\n \"parentTeamUUID\": \"2ccf9bde-68e3-4de4-bc4e-51b927336665\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attention.tech/v2/organizations/teams/{teamId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Marketing\",\n \"parentTeamUUID\": \"2ccf9bde-68e3-4de4-bc4e-51b927336665\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"name": "Marketing",
"uuid": "25fd70be-4d15-4b95-9931-69a320ceef76"
}
}{
"id": "not_found_error",
"status": "404",
"code": "404",
"title": "Not Found Error",
"detail": "The requested resource was not found",
"source": {
"pointer": "/data/attributes/id"
}
}{
"code": 401,
"message": "unauthenticated for Invalid API key"
}{
"id": "not_found_error",
"status": "404",
"code": "404",
"title": "Not Found Error",
"detail": "The requested resource was not found",
"source": {
"pointer": "/data/attributes/id"
}
}{
"code": 422,
"message": "Missing required fields in body"
}{
"code": "500",
"detail": "An unexpected error occurred on the server. Please try again later or contact support if the problem persists.",
"id": "internal_server_error",
"title": "Internal Server Error"
}{
"id": "not_found_error",
"status": "404",
"code": "404",
"title": "Not Found Error",
"detail": "The requested resource was not found",
"source": {
"pointer": "/data/attributes/id"
}
}Organization
Update Team
Updates an existing team’s information. You can modify the team’s name and parent team assignment. This operation can be used to restructure the team hierarchy within the organization.
PATCH
/
organizations
/
teams
/
{teamId}
Update Team
curl --request PATCH \
--url https://api.attention.tech/v2/organizations/teams/{teamId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Marketing",
"parentTeamUUID": "2ccf9bde-68e3-4de4-bc4e-51b927336665"
}
'import requests
url = "https://api.attention.tech/v2/organizations/teams/{teamId}"
payload = {
"name": "Marketing",
"parentTeamUUID": "2ccf9bde-68e3-4de4-bc4e-51b927336665"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Marketing', parentTeamUUID: '2ccf9bde-68e3-4de4-bc4e-51b927336665'})
};
fetch('https://api.attention.tech/v2/organizations/teams/{teamId}', 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.attention.tech/v2/organizations/teams/{teamId}",
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' => 'Marketing',
'parentTeamUUID' => '2ccf9bde-68e3-4de4-bc4e-51b927336665'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.attention.tech/v2/organizations/teams/{teamId}"
payload := strings.NewReader("{\n \"name\": \"Marketing\",\n \"parentTeamUUID\": \"2ccf9bde-68e3-4de4-bc4e-51b927336665\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<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://api.attention.tech/v2/organizations/teams/{teamId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Marketing\",\n \"parentTeamUUID\": \"2ccf9bde-68e3-4de4-bc4e-51b927336665\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attention.tech/v2/organizations/teams/{teamId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Marketing\",\n \"parentTeamUUID\": \"2ccf9bde-68e3-4de4-bc4e-51b927336665\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"name": "Marketing",
"uuid": "25fd70be-4d15-4b95-9931-69a320ceef76"
}
}{
"id": "not_found_error",
"status": "404",
"code": "404",
"title": "Not Found Error",
"detail": "The requested resource was not found",
"source": {
"pointer": "/data/attributes/id"
}
}{
"code": 401,
"message": "unauthenticated for Invalid API key"
}{
"id": "not_found_error",
"status": "404",
"code": "404",
"title": "Not Found Error",
"detail": "The requested resource was not found",
"source": {
"pointer": "/data/attributes/id"
}
}{
"code": 422,
"message": "Missing required fields in body"
}{
"code": "500",
"detail": "An unexpected error occurred on the server. Please try again later or contact support if the problem persists.",
"id": "internal_server_error",
"title": "Internal Server Error"
}{
"id": "not_found_error",
"status": "404",
"code": "404",
"title": "Not Found Error",
"detail": "The requested resource was not found",
"source": {
"pointer": "/data/attributes/id"
}
}Authorizations
Path Parameters
UUID of the team to update
Body
application/jsonapplication/vnd.api+json
The updated team information
Response
Team successfully updated
Represents a team in the system with its properties and hierarchical structure
Show child attributes
Show child attributes
Example:
{
"uuid": "fe515723-fe2e-4959-a5fa-c4d3937fe7e4",
"name": "Engineering",
"phrases": ["engineering", "tech", "development"],
"domain": "attention.tech",
"organizerJoinInternalMeetings": true,
"consentEmailEnabled": true,
"parentTeamUUID": "2ccf9bde-68e3-4de4-bc4e-51b927336665",
"organizationUUID": "16b78cec-82ef-46d2-8213-5d3bb7d2571c"
}
Was this page helpful?
⌘I