> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thena.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Teams search

The teams search API lets you find, filter and analyze teams using flexible Typesense-powered queries. You can search by team name and filter by specific team properties.

## Example use cases

* **Get all teams in the organization**

  ```json theme={null}
  {
    "query_by": "*",
    "q": "*"
  }
  ```

* **Find teams by name**

  ```json theme={null}
  {
    "query_by": "*",
    "filter_by": "name:=engineering",
    "q": "*"
  }
  ```

* **Search for teams by UID**

  ```json theme={null}
  {
    "query_by": "*",
    "filter_by": "teamUid:=THEMMQRBBHEPPQ",
    "q": "*"
  }
  ```

***

## Teams search response fields

Below are all the fields you may see in a team search result. Teams data is included by default.

### Core fields

| Field          | Type    | Description                     |
| -------------- | ------- | ------------------------------- |
| id             | string  | Unique team identifier          |
| uid            | string  | Unique team UID                 |
| name           | string  | Team name                       |
| description    | string  | Team description                |
| icon           | string  | Team icon                       |
| color          | string  | Team color                      |
| identifier     | string  | Team identifier                 |
| organizationId | string  | Organization ID                 |
| parentTeamId   | string  | Parent team ID (can be null)    |
| teamOwnerId    | string  | Team owner ID                   |
| isActive       | boolean | Whether the team is active      |
| isPrivate      | boolean | Whether the team is private     |
| createdAt      | string  | Creation timestamp (ISO8601)    |
| updatedAt      | string  | Last update timestamp (ISO8601) |
| deletedAt      | string  | Deletion timestamp (ISO8601)    |

***

## Filtering options

You can filter teams using the `filter_by` parameter with Typesense syntax. The following filters are available:

### Available filters

* **By team UID**: `teamUid:=THEMMQRBBHEPPQ`
* **By name**: `name:=engineering`

### Combined filters

You can combine multiple filters using `&&`:

```json theme={null}
{
  "query_by": "*",
  "filter_by": "teamUid:=THEMMQRBBHEPPQ&&name:=engineering",
  "q": "*"
}
```

### Filter examples

* **Find team by name only**
  ```json theme={null}
  {
    "filter_by": "name:=engineering"
  }
  ```

* **Find team by UID only**
  ```json theme={null}
  {
    "filter_by": "teamUid:=THEMMQRBBHEPPQ"
  }
  ```
