---
title: "Update an organization"
method: PATCH
path: "/api/public/organizations/{id}"
tags: ["Organizations"]
---

# Update an organization

`PATCH /api/public/organizations/{id}`

## Request

- Base URL: `https://charts.basedash.com`
- URL: `https://charts.basedash.com/api/public/organizations/{id}`
- Auth: HTTP bearer

Updates an existing organization. Requires admin access.

## Path parameters

- `id` string, required: Organization ID

## Query parameters

- `include` 'jwtSecret': Include sensitive fields in the response. Use `jwtSecret` to include the embed JWT secret.

## Request body

- object
  - `name` string: Name of the organization
  - `customAiContext` string: Custom context for AI features
  - `insightsAiContext` string, nullable: Custom context for AI-generated insights
  - `skipOnboarding` boolean: Skip onboarding flow
  - `fullEmbedEnabled` boolean: Enable full embed functionality
  - `embedAllowedOrigins` string[]: Allowed origins for embedding. Supports exact URLs (https://example.com) and wildcard patterns (https://*.example.com)
  - `billingAccountId` string: Billing account to attach the new organization to. Requires admin access to the billing account owner organization. The organization is billed through the account and treated as a paid (GROWTH) organization with no trial limitations.
  - `isBillable` boolean: [Self-hosted] Controls whether the organization is billable. Defaults to true. Relevant for self-hosted deployments where billing gates certain features. When false, the organization will not be counted towards billable usage and will have a limited set of features. When true, the organization will be counted towards billable usage (after a 14-day trial) and will have access to all features.
  - `insightsEnabled` boolean: Enable automated insights generation for this organization. Defaults to true.
  - `modelsEnabled` boolean: Show Models in the product and allow creating or editing models. Defaults to true.
  - `automationNotificationsVisible` boolean: When true, the Slack and email notifications section is shown on the automation page. When false, that section is hidden. Does not affect existing notification delivery or the automations API. Defaults to true.
  - `insightsFrequency` 'DAILY' | 'WEEKDAYS' | 'WEEKLY' | 'MONTHLY' | 'NEVER': How often automated insights are generated. Defaults to DAILY.
  - `insightsPreferredDayOfWeek` integer: Preferred day of week for WEEKLY insights. 0 is Sunday.
  - `insightsPreferredDayOfMonth` integer: Preferred day of month for MONTHLY insights.
  - `allowOnDemandAiUsage` boolean: Allow users in the organization to continue using AI beyond included monthly AI credits. For an organization attached to a billing account, this controls access beyond the account's pooled included credits for this tenant; the billing account setting still applies to the whole account. Defaults to true.
  - `aiUsageOverageLimitCents` integer, nullable: Maximum AI usage overage for the organization in cents. For an organization attached to a billing account, this is an absolute cap on that organization’s usage during the account billing period, not a share of the pooled credits. The billing account cap also applies. Null means no tenant limit. Only applies when on-demand AI usage is enabled.
  - `billingEmail` string, email: Email address used for billing communication and invoices
  - `sendInvoicesToBillingEmail` boolean: Whether paid invoices are emailed to the billing email address
  - `defaultDashboardAccessAudience` 'EVERYONE' | 'CREATOR_ONLY' | 'CREATOR_GROUPS': Default audience for newly created dashboards
  - `defaultDashboardAccessLevel` 'MANAGE' | 'EDIT' | 'VIEW': Default permission level for the audience. Creator always gets MANAGE regardless.
  - `defaultChatAccessAudience` 'EVERYONE' | 'CREATOR_ONLY' | 'CREATOR_GROUPS': Default audience for newly created chats
  - `defaultChatAccessLevel` 'MANAGE' | 'EDIT' | 'VIEW': Default permission level for new chats. Creator always gets MANAGE regardless.
  - `defaultAutomationAccessAudience` 'EVERYONE' | 'CREATOR_ONLY' | 'CREATOR_GROUPS': Default audience for newly created automations
  - `defaultAutomationAccessLevel` 'MANAGE' | 'EDIT' | 'VIEW': Default permission level for new automations. Creator always gets MANAGE regardless.

## Response `200`

Organization updated successfully. The `jwtSecret` field is only included when explicitly requested via `?include=jwtSecret`.

- object
  - `data` object, required
    - `id` string, required: Organization ID
    - `name` string, required: Name of the organization
    - `slug` string, required: URL-friendly slug
    - `customAiContext` string, nullable, required: Custom context for AI
    - `insightsAiContext` string, nullable, required: Custom context injected into AI-generated insights
    - `onboardingStatus` 'STARTED' | 'COMPLETED', required: Onboarding status
    - `fullEmbedEnabled` boolean, required: Full embed enabled flag
    - `embedAllowedOrigins` string[], required: Allowed embed origins
    - `billingAccountId` string, nullable, required: Billing account this organization is billed through, or null when the organization manages its own billing.
    - `isBillable` boolean, required: [Self-hosted] Whether the organization is billable. Defaults to true. Relevant for self-hosted deployments where billing gates certain features. When false, the organization will not be counted towards billable usage and will have a limited set of features. When true, the organization will be counted towards billable usage (after a 14-day trial) and will have access to all features.
    - `insightsEnabled` boolean, required: Whether automated insights generation is enabled for this organization.
    - `modelsEnabled` boolean, required: Whether Models is shown in the product and creating or editing models is allowed.
    - `automationNotificationsVisible` boolean, required: Whether the Slack and email notifications section is shown on the automation page. Does not affect existing notification delivery or the automations API.
    - `insightsFrequency` 'DAILY' | 'WEEKDAYS' | 'WEEKLY' | 'MONTHLY' | 'NEVER', required: How often automated insights are generated. NEVER means automatic generation is disabled.
    - `insightsPreferredDayOfWeek` number, nullable, required: Preferred day of week for weekly insights. 0 is Sunday.
    - `insightsPreferredDayOfMonth` number, nullable, required: Preferred day of month for monthly insights.
    - `allowOnDemandAiUsage` boolean, required: Whether the organization can continue using AI beyond included monthly AI credits. For an organization attached to a billing account, this controls access beyond the account's pooled included credits for this tenant; the billing account setting still applies to the whole account.
    - `aiUsageOverageLimitCents` integer, nullable, required: Maximum AI usage overage for the organization in cents. For an organization attached to a billing account, this is an absolute cap on that organization’s usage during the account billing period, not a share of the pooled credits. The billing account cap also applies. Null means no tenant limit.
    - `billingEmail` string, required: Email address used for billing communication and invoices
    - `sendInvoicesToBillingEmail` boolean, required: Whether paid invoices are emailed to the billing email address
    - `defaultDashboardAccessAudience` 'EVERYONE' | 'CREATOR_ONLY' | 'CREATOR_GROUPS', required: Default audience for newly created dashboards
    - `defaultDashboardAccessLevel` 'MANAGE' | 'EDIT' | 'VIEW', required: Default permission level for the audience. Creator always gets MANAGE regardless.
    - `defaultChatAccessAudience` 'EVERYONE' | 'CREATOR_ONLY' | 'CREATOR_GROUPS', required: Default audience for newly created chats
    - `defaultChatAccessLevel` 'MANAGE' | 'EDIT' | 'VIEW', required: Default permission level for new chats. Creator always gets MANAGE regardless.
    - `defaultAutomationAccessAudience` 'EVERYONE' | 'CREATOR_ONLY' | 'CREATOR_GROUPS', required: Default audience for newly created automations
    - `defaultAutomationAccessLevel` 'MANAGE' | 'EDIT' | 'VIEW', required: Default permission level for new automations. Creator always gets MANAGE regardless.
    - `trialEndsAt` string, nullable, required: [Self-hosted] ISO 8601 date when the trial ends, or null if no trial. Trial starts after the organization is created and becomes billable.
    - `jwtSecret` string: JWT secret for embedding. Only returned when `?include=jwtSecret` is specified and the user has admin access.

## Other responses

- `400`: Bad request - Invalid JSON body or validation error
- `401`: Unauthorized - Missing or invalid API key
- `404`: Not found - Organization not found or no admin access
- `429`: Rate limit exceeded - Too many requests
- `500`: Internal server error

---

[API](https://skmtc.dev/basedash/apis/basedash-public-api.md) - [All operations](https://skmtc.dev/basedash/apis/basedash-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/basedash/apis/basedash-public-api/revisions/efb9d40bc6f7?raw)
