> ## 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.

# Organization search

The organization search API lets you retrieve the current user's organization data.

## Example use cases

* **Get current organization**

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

* **Get organization with custom fields and teams**

  ```json theme={null}
  {
    "query_by": "*",
    "include_fields": "standardFields,customFields,customFieldValues,teams,sources",
    "q": "*"
  }
  ```

***

## Organization search response fields

Below are all the fields you may see in an organization search result. Many are optional and will only appear if included in your `include_fields` parameter.

### Core fields

| Field               | Type    | Description                          |
| ------------------- | ------- | ------------------------------------ |
| id                  | string  | Unique organization identifier       |
| uid                 | string  | Unique organization UID              |
| name                | string  | Organization name                    |
| description         | string  | Organization description             |
| logoUrl             | string  | Logo URL or identifier               |
| slug                | string  | Organization slug                    |
| allowSameDomainJoin | boolean | Whether to allow same domain join    |
| tier                | string  | Organization tier (e.g., ENTERPRISE) |
| isActive            | boolean | Whether the organization is active   |
| isVerified          | boolean | Whether the organization is verified |
| metadata            | object  | Custom metadata                      |
| createdAt           | string  | Creation timestamp (ISO8601)         |
| updatedAt           | string  | Last update timestamp (ISO8601)      |
| deletedAt           | string  | Deletion timestamp (ISO8601)         |

### Extended fields (with include\_fields)

| Field             | Type  | Description                         |
| ----------------- | ----- | ----------------------------------- |
| standardFields    | array | Array of standard field definitions |
| customFields      | array | Array of custom field definitions   |
| customFieldValues | array | Array of custom field values        |
| teams             | array | Array of teams in the organization  |
| sources           | array | Array of sources configured         |

### Standard field structure

When `standardFields` is included, each field object contains:

| Field               | Type    | Description                             |
| ------------------- | ------- | --------------------------------------- |
| id                  | string  | Field identifier                        |
| name                | string  | Human-readable field name               |
| type                | string  | Field type (string, text, url, boolean) |
| description         | string  | Field description                       |
| mandatoryOnCreation | boolean | Whether field is required on creation   |
| mandatoryOnClose    | boolean | Whether field is required on close      |
| visibleToCustomer   | boolean | Whether field is visible to customers   |
| editableByCustomer  | boolean | Whether field is editable by customers  |
| isStandard          | boolean | Whether this is a standard field        |

> For a full list, see the OrganizationSearchResponseDto in the API reference.

***

## Include fields options

Use the `include_fields` parameter to include additional data:

* **`standardFields`**: Include standard field definitions
* **`customFields`**: Include custom field definitions
* **`customFieldValues`**: Include custom field values
* **`teams`**: Include teams in the organization
* **`sources`**: Include configured sources

**Example:**

```json theme={null}
{
  "query_by": "name",
  "include_fields": "standardFields,customFields,teams",
  "q": "*"
}
```

***

**Tip:** Use the `include_fields` parameter to limit the response to only the fields you need for performance and clarity. Only request extended fields when you need the additional data.
