Create Team
curl --request POST \
--url https://api.attention.tech/v2/organizations/teams \
--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"
payload = {
"name": "Marketing",
"parentTeamUUID": "2ccf9bde-68e3-4de4-bc4e-51b927336665"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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"
payload := strings.NewReader("{\n \"name\": \"Marketing\",\n \"parentTeamUUID\": \"2ccf9bde-68e3-4de4-bc4e-51b927336665\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.attention.tech/v2/organizations/teams")
.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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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": "[Attention] Marketing",
"uuid": "5d350a34-6c8d-4408-b0d6-6cfac4782e1f"
}
}{
"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": "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
Create Team
Creates a new team in the organization. You can optionally specify a parent team to create a hierarchical team structure. The team will be created with default permissions and settings.
POST
/
organizations
/
teams
Create Team
curl --request POST \
--url https://api.attention.tech/v2/organizations/teams \
--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"
payload = {
"name": "Marketing",
"parentTeamUUID": "2ccf9bde-68e3-4de4-bc4e-51b927336665"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
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', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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"
payload := strings.NewReader("{\n \"name\": \"Marketing\",\n \"parentTeamUUID\": \"2ccf9bde-68e3-4de4-bc4e-51b927336665\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.attention.tech/v2/organizations/teams")
.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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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": "[Attention] Marketing",
"uuid": "5d350a34-6c8d-4408-b0d6-6cfac4782e1f"
}
}{
"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": "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
Body
application/jsonapplication/vnd.api+json
The details of the team to be created
Response
Team successfully created
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