Teams allow you to organize users into groups and manage permissions at a team level. This is useful for large organizations where different teams need access to different resources.
The team object
Attributes
| Attribute | Type | Description |
|---|
id | string | Unique identifier for the team |
name | string | Team name |
description | string | Optional team description |
member_count | integer | Number of users in the team |
created_at | timestamp | When the team was created |
updated_at | timestamp | When the team was last updated |
Example object
{
"id": "team_1234567890",
"name": "Engineering",
"description": "Product development team",
"member_count": 15,
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-10-20T14:20:00Z"
}
List all teams
GET /playbook/api/v1/teams
Query parameters
| Parameter | Type | Description |
|---|
limit | integer | Number of teams to return (1-100) |
cursor | string | Pagination cursor |
search | string | Search by team name |
Example request
curl "https://app.airclou.com/playbook/api/v1/teams" \
-H "Authorization: Bearer YOUR_API_KEY"
Example response
{
"data": [
{
"id": "team_1234567890",
"name": "Engineering",
"description": "Product development team",
"member_count": 15,
"created_at": "2025-01-15T10:30:00Z"
}
],
"pagination": {
"next_cursor": null,
"has_more": false,
"total_count": 1
}
}
Create a team
POST /playbook/api/v1/teams
Request body
| Field | Type | Required | Description |
|---|
name | string | Yes | Team name |
description | string | No | Team description |
Example request
curl -X POST "https://app.airclou.com/playbook/api/v1/teams" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Marketing",
"description": "Marketing and growth team"
}'
Add a user to a team
POST /playbook/api/v1/teams/{team_id}/members
Request body
| Field | Type | Required | Description |
|---|
user_id | string | Yes | ID of the user to add |
Example request
curl -X POST "https://app.airclou.com/playbook/api/v1/teams/team_1234567890/members" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"user_id": "usr_1234567890"
}'
Remove a user from a team
DELETE /playbook/api/v1/teams/{team_id}/members/{user_id}
Example request
curl -X DELETE "https://app.airclou.com/playbook/api/v1/teams/team_1234567890/members/usr_1234567890" \
-H "Authorization: Bearer YOUR_API_KEY"