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

# Organizations

> Read and update the current Workspace organization.

<Warning>
  **Upcoming release — Zylon 1.58**

  These docs are published ahead of release so you can prepare your API integrations. The release image is not yet available. For installations running 1.57, use the [1.57 documentation](/en/v1.57/overview).
</Warning>

Organizations are the top-level container for workspace members and projects. These endpoints operate on the organization selected by the `x-org` header.

## Basic request and response

Get the current organization with `GET /api/v1/app/organization`.

```bash theme={null}
curl "https://{BASE_URL}/api/v1/app/organization" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -H "x-org: {org_slug}"
```

<Accordion title="Example response">
  ```json theme={null}
  {
    "id": "org_2f3a9d1c7b5e4a8f",
    "name": "Aurora Labs",
    "slug": "aurora-labs",
    "state": "Active",
    "display_name": "Aurora Labs",
    "context": "Enterprise R&D and analytics.",
    "logo": "https://{BASE_URL}/files/org-logo.png",
    "auto_join_enabled": true,
    "enable_generated_resources_downloads": true,
    "enable_uploaded_resources_downloads": true,
    "default_role": "AppMember",
    "email_regex": ".*@example.com",
    "gateway_id": "gw_4b7c2a1d9e5f",
    "created_at": "2026-02-08T14:12:45Z"
  }
  ```
</Accordion>

## Update organization settings

```bash theme={null}
curl -X POST "https://{BASE_URL}/api/v1/app/organization" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -H "x-org: {org_slug}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Aurora Labs",
    "context": "Private AI platform for product and support teams.",
    "clear_context": false,
    "email_regex": ".*@example.com",
    "enable_generated_resources_downloads": true,
    "enable_uploaded_resources_downloads": true
  }'
```

<Accordion title="Endpoint parameters">
  | Field | Type | Required | Description |
  | - | - | - | - |
  | `name` | string | No | Organization display name. Maximum 60 characters. |
  | `context` | string | No | Organization context used by Workspace features. |
  | `clear_context` | boolean | No | Set to `true` to remove the existing context. Defaults to `false`. |
  | `email_regex` | string | No | Valid regex for organization email matching. |
  | `enable_generated_resources_downloads` | boolean | No | Permit downloads of generated resources. Omit or send null to keep the setting. |
  | `enable_uploaded_resources_downloads` | boolean | No | Permit downloads of uploaded resources. Omit or send null to keep the setting. |
  | `logo_file_name` | string | No | Multipart logo file name. Required when uploading a logo file. |
  | `logo_content_type` | string | No | Multipart logo content type. Must be PNG or JPEG. |
  | `logo_content_length` | integer | No | Multipart logo size in bytes. Maximum 5 MB. |
  | `fileData` | file | No | Multipart-only logo binary. |
</Accordion>

<Accordion title="Example response">
  ```json theme={null}
  {
    "id": "org_2f3a9d1c7b5e4a8f",
    "name": "Aurora Labs",
    "slug": "aurora-labs",
    "state": "Active",
    "display_name": "Aurora Labs",
    "context": "Private AI platform for product and support teams.",
    "logo": "https://{BASE_URL}/files/org-logo.png",
    "auto_join_enabled": true,
    "enable_generated_resources_downloads": true,
    "enable_uploaded_resources_downloads": true,
    "default_role": "AppMember",
    "email_regex": ".*@example.com",
    "gateway_id": "gw_4b7c2a1d9e5f",
    "created_at": "2026-02-08T14:12:45Z"
  }
  ```
</Accordion>

## Organization response fields

GET and POST return the same model. Nullable fields may be omitted. Download policy affects artifact downloads and thread file downloads/exports; disabled downloads return `403`.

| Field | Type | Meaning |
| - | - | - |
| `id` | string | Organization ID. |
| `name` | string | Organization name. |
| `slug` | string | Workspace slug for `x-org`. |
| `state` | string | `Active`, `Inactive`. |
| `display_name` | string | Display name. |
| `context` | string or null | Organization instructions. |
| `logo` | string or null | Public logo URL. |
| `auto_join_enabled` | boolean | Automatic membership enabled. |
| `enable_generated_resources_downloads` | boolean | Download policy for generated resources. |
| `enable_uploaded_resources_downloads` | boolean | Download policy for uploaded resources. |
| `default_role` | string | `AppGuest`, `AppMember`, `AppAdmin`, `AppOwner`. |
| `email_regex` | string | Email matching regex. |
| `gateway_id` | string | Organization gateway ID. |
| `created_at` | timestamp | Server-generated creation time. |
| `member_count` | integer or null | Optional member count; not populated by these self-organization routes. |

## Errors and edge cases

* **401/403**: missing or invalid API token.
* **400**: invalid regex, organization name over 60 characters, unsupported logo content type, or logo larger than 5 MB.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.