Teams
Create Team
Creates a new organizational team (team unit) for the API key’s team. Use parent_id to create a child node (depth is derived from the parent). Omit parent_id to create a root node at depth 1.
POST
https://api.folkyn.com
/
api
/
v1
/
teams
Create Team
curl --request POST \
--url https://api.folkyn.com/api/v1/teams \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Engineering",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"sort_order": 0
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Engineering',
parent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
external_id: '<string>',
sort_order: 0
})
};
fetch('https://api.folkyn.com/api/v1/teams', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.folkyn.com/api/v1/teams"
payload = {
"name": "Engineering",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"sort_order": 0
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.folkyn.com/api/v1/teams"
payload := strings.NewReader("{\n \"name\": \"Engineering\",\n \"parent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_id\": \"<string>\",\n \"sort_order\": 0\n}")
req, _ := http.NewRequest("POST", 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))
}{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"depth": 2,
"path": "<string>",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"sort_order": 1,
"is_archived": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": 401,
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": {
"field": "name",
"requiredScope": "tags:write",
"retryAfterSeconds": 1
}
}
}{
"error": {
"code": 401,
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": {
"field": "name",
"requiredScope": "tags:write",
"retryAfterSeconds": 1
}
}
}{
"error": {
"code": 401,
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": {
"field": "name",
"requiredScope": "tags:write",
"retryAfterSeconds": 1
}
}
}{
"error": {
"code": 401,
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": {
"field": "name",
"requiredScope": "tags:write",
"retryAfterSeconds": 1
}
}
}{
"error": {
"code": 401,
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": {
"field": "name",
"requiredScope": "tags:write",
"retryAfterSeconds": 1
}
}
}Authorizations
bearerAuthApiKeyHeader
Use Authorization: Bearer <your_api_key>
Body
application/json
Team name (must be non-empty).
Example:
"Engineering"
Parent organizational team UUID. Omit to create a root node.
External reference for integrations (unique per team when set).
Maximum string length:
255Sort order among siblings (ascending).
Required range:
x >= 0Response
Team created
Show child attributes
Show child attributes
⌘I
Create Team
curl --request POST \
--url https://api.folkyn.com/api/v1/teams \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Engineering",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"sort_order": 0
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Engineering',
parent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
external_id: '<string>',
sort_order: 0
})
};
fetch('https://api.folkyn.com/api/v1/teams', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.folkyn.com/api/v1/teams"
payload = {
"name": "Engineering",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"sort_order": 0
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.folkyn.com/api/v1/teams"
payload := strings.NewReader("{\n \"name\": \"Engineering\",\n \"parent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"external_id\": \"<string>\",\n \"sort_order\": 0\n}")
req, _ := http.NewRequest("POST", 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))
}{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"depth": 2,
"path": "<string>",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"sort_order": 1,
"is_archived": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": 401,
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": {
"field": "name",
"requiredScope": "tags:write",
"retryAfterSeconds": 1
}
}
}{
"error": {
"code": 401,
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": {
"field": "name",
"requiredScope": "tags:write",
"retryAfterSeconds": 1
}
}
}{
"error": {
"code": 401,
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": {
"field": "name",
"requiredScope": "tags:write",
"retryAfterSeconds": 1
}
}
}{
"error": {
"code": 401,
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": {
"field": "name",
"requiredScope": "tags:write",
"retryAfterSeconds": 1
}
}
}{
"error": {
"code": 401,
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"details": {
"field": "name",
"requiredScope": "tags:write",
"retryAfterSeconds": 1
}
}
}