List departments
curl --request GET \
--url https://api.teambuilder.ge/v1/departments \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.teambuilder.ge/v1/departments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.teambuilder.ge/v1/departments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "b3e1f7a2-6c4d-4e8f-9a1b-2c3d4e5f6a7b",
"external_id": "D-ENG",
"name": "Engineering",
"parent_id": null,
"archived_at": null
}
],
"pagination": {
"next_cursor": "djEuQ2hhY2hhMjAuZXhhbXBsZS1jdXJzb3I"
}
}{
"error": {
"code": "validation_failed",
"message": "limit must not be greater than 100",
"request_id": "req_7Hq2LmX9vT4kPz1RbN8sWc"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid API key",
"request_id": "req_7Hq2LmX9vT4kPz1RbN8sWc"
}
}{
"error": {
"code": "forbidden",
"message": "This API key lacks the required scope: departments:read",
"request_id": "req_7Hq2LmX9vT4kPz1RbN8sWc"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests. Retry after 30 seconds.",
"request_id": "req_7Hq2LmX9vT4kPz1RbN8sWc"
}
}List departments
Your company’s departments and their hierarchy, optionally including archived ones.
GET
/
v1
/
departments
List departments
curl --request GET \
--url https://api.teambuilder.ge/v1/departments \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.teambuilder.ge/v1/departments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.teambuilder.ge/v1/departments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "b3e1f7a2-6c4d-4e8f-9a1b-2c3d4e5f6a7b",
"external_id": "D-ENG",
"name": "Engineering",
"parent_id": null,
"archived_at": null
}
],
"pagination": {
"next_cursor": "djEuQ2hhY2hhMjAuZXhhbXBsZS1jdXJzb3I"
}
}{
"error": {
"code": "validation_failed",
"message": "limit must not be greater than 100",
"request_id": "req_7Hq2LmX9vT4kPz1RbN8sWc"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid API key",
"request_id": "req_7Hq2LmX9vT4kPz1RbN8sWc"
}
}{
"error": {
"code": "forbidden",
"message": "This API key lacks the required scope: departments:read",
"request_id": "req_7Hq2LmX9vT4kPz1RbN8sWc"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests. Retry after 30 seconds.",
"request_id": "req_7Hq2LmX9vT4kPz1RbN8sWc"
}
}Authorizations
API key — tb_live_… for production data, tb_test_… for the sandbox.
Query Parameters
The pagination.next_cursor of the previous page. Omit it, or send it empty, for the first page. A cursor is opaque and works only on the endpoint that returned it, for the same company.
Maximum string length:
512Example:
"djEuQ2hhY2hhMjAuZXhhbXBsZS1jdXJzb3I"
How many items to return per page, from 1 to 100.
Required range:
1 <= x <= 100Example:
25
Set to true to include archived departments. They are left out by default.
Example:
false
