Team API

Retrieve information about your team and its members. API keys are scoped to a single team.

Get Team

GET/api/v1/teamread:team

Retrieve information about the team associated with the API key.

Request Example

curl -X GET "https://gateway.thekairos.app/v1/team" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Acme Corporation",
    "slug": "acme-corp",
    "description": "Building the future of productivity",
    "logo_url": "https://...",
    "settings": {
      "timezone": "America/New_York",
      "week_start": "monday"
    },
    "member_count": 12,
    "created_at": "2023-06-01T00:00:00Z",
    "updated_at": "2024-01-05T10:00:00Z"
  }
}
Team Scope
Each API key is associated with exactly one team. The team information returned is always the team that owns the API key.

List Team Members

GET/api/v1/team/membersread:team

Retrieve a list of all members in the team.

Query Parameters

pageintegerPage number (default: 1)
limitintegerItems per page (default: 50, max: 100)
rolestringFilter by role: owner, admin, member
sort_bystringSort field: name, email, joined_at (default: name)
sort_orderstringSort direction: asc or desc (default: asc)

Request Example

curl -X GET "https://gateway.thekairos.app/v1/team/members?limit=20" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "data": [
    {
      "id": "456e7890-e12b-34d5-a678-901234567000",
      "user_id": "789e0123-e45b-67d8-a901-234567890000",
      "email": "john@example.com",
      "full_name": "John Doe",
      "avatar_url": "https://...",
      "role": "admin",
      "role_id": 2,
      "joined_at": "2023-06-15T00:00:00Z",
      "last_active_at": "2024-01-10T14:30:00Z"
    },
    {
      "id": "567e8901-e23b-45d6-a789-012345678000",
      "user_id": "890e1234-e56b-78d9-a012-345678901000",
      "email": "jane@example.com",
      "full_name": "Jane Smith",
      "avatar_url": "https://...",
      "role": "member",
      "role_id": 3,
      "joined_at": "2023-07-01T00:00:00Z",
      "last_active_at": "2024-01-09T16:45:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 12,
    "has_more": false
  }
}

Team Roles

Team members have one of the following roles:

RoleRole IDDescription
owner1Full access, can manage billing and delete team
admin2Can manage members, settings, and API keys
member3Standard access to team resources

Common Use Cases

Getting User IDs for @Mentions

When creating comments with @mentions, you need user IDs. Use the team members endpoint to retrieve a list of all team members and their IDs.

Assigning Tasks

When creating or updating tasks, use the assigned_to field with a user ID from the team members list to assign the task.

Activity Tracking

The last_active_at field helps you understand team engagement and identify inactive members.