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

# Get an organization

> Retrieves an organization by ID. Requires membership in the organization.



## OpenAPI

````yaml https://charts.basedash.com/api/public/openapi get /api/public/organizations/{id}
openapi: 3.1.0
info:
  title: Basedash Public API
  version: 0.0.0
  description: >-
    API for programmatic access to Basedash features. Use API keys for
    authentication.
  contact:
    name: Basedash Support
    url: https://basedash.com
    email: support@basedash.com
servers:
  - url: https://charts.basedash.com
    description: Production
security: []
tags:
  - name: Organizations
    description: Manage organizations
  - name: Groups
    description: Manage organization groups and memberships
  - name: Data Sources
    description: Manage database connections and data sources
  - name: MCP servers
    description: Manage MCP server data sources
  - name: Insights
    description: Manage generated insights
  - name: Automations
    description: Manage automations and automation runs
  - name: Skills
    description: Manage organization skills
  - name: Definitions
    description: Manage reusable SQL definitions
  - name: Dashboards
    description: Manage dashboards and their tabs
  - name: Charts
    description: Manage charts and their SQL queries
  - name: Chats
    description: >-
      Chat with the Basedash AI agent about your data. Start a chat by sending a
      message, then continue the conversation with follow-up messages. The
      assistant responds asynchronously: pass the `wait` query parameter to
      receive the finished response in the same request, or poll the assistant
      message (or stream its events) after an HTTP 202. Chats created through
      the API are not shown in the Basedash app.
paths:
  /api/public/organizations/{id}:
    get:
      tags:
        - Organizations
      summary: Get an organization
      description: >-
        Retrieves an organization by ID. Requires membership in the
        organization.
      parameters:
        - schema:
            type: string
            description: Organization ID
          required: true
          description: Organization ID
          name: id
          in: path
        - schema:
            type: string
            enum:
              - jwtSecret
            description: >-
              Include sensitive fields in the response. Use `jwtSecret` to
              include the embed JWT secret (requires admin access).
          required: false
          description: >-
            Include sensitive fields in the response. Use `jwtSecret` to include
            the embed JWT secret (requires admin access).
          name: include
          in: query
      responses:
        '200':
          description: >-
            Organization retrieved successfully. The `jwtSecret` field is only
            included when explicitly requested via `?include=jwtSecret` and the
            user has admin access.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Organization ID
                      name:
                        type: string
                        description: Name of the organization
                      slug:
                        type: string
                        description: URL-friendly slug
                      customAiContext:
                        type:
                          - string
                          - 'null'
                        description: Custom context for AI
                      insightsAiContext:
                        type:
                          - string
                          - 'null'
                        description: Custom context injected into AI-generated insights
                      onboardingStatus:
                        type: string
                        enum:
                          - STARTED
                          - COMPLETED
                        description: Onboarding status
                      fullEmbedEnabled:
                        type: boolean
                        description: Full embed enabled flag
                      embedAllowedOrigins:
                        type: array
                        items:
                          type: string
                        description: Allowed embed origins
                      isBillable:
                        type: boolean
                        description: >-
                          [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:
                        type: boolean
                        description: >-
                          Whether automated insights generation is enabled for
                          this organization.
                      insightsFrequency:
                        type: string
                        enum:
                          - DAILY
                          - WEEKDAYS
                          - WEEKLY
                          - MONTHLY
                          - NEVER
                        description: >-
                          How often automated insights are generated. NEVER
                          means automatic generation is disabled.
                      insightsPreferredDayOfWeek:
                        type:
                          - number
                          - 'null'
                        description: >-
                          Preferred day of week for weekly insights. 0 is
                          Sunday.
                      insightsPreferredDayOfMonth:
                        type:
                          - number
                          - 'null'
                        description: Preferred day of month for monthly insights.
                      allowOnDemandAiUsage:
                        type: boolean
                        description: >-
                          Whether the organization can continue using AI beyond
                          included monthly AI credits.
                      aiUsageOverageLimitCents:
                        type:
                          - integer
                          - 'null'
                        exclusiveMinimum: 0
                        maximum: 2147483647
                        description: >-
                          Maximum AI usage overage for the organization in
                          cents. Null means no limit.
                      billingEmail:
                        type: string
                        description: >-
                          Email address used for billing communication and
                          invoices
                      sendInvoicesToBillingEmail:
                        type: boolean
                        description: >-
                          Whether paid invoices are emailed to the billing email
                          address
                      defaultDashboardAccessAudience:
                        type: string
                        enum:
                          - EVERYONE
                          - CREATOR_ONLY
                          - CREATOR_GROUPS
                        description: Default audience for newly created dashboards
                      defaultDashboardAccessLevel:
                        type: string
                        enum:
                          - MANAGE
                          - EDIT
                          - VIEW
                        description: >-
                          Default permission level for the audience. Creator
                          always gets MANAGE regardless.
                      defaultChatAccessAudience:
                        type: string
                        enum:
                          - EVERYONE
                          - CREATOR_ONLY
                          - CREATOR_GROUPS
                        description: Default audience for newly created chats
                      defaultChatAccessLevel:
                        type: string
                        enum:
                          - MANAGE
                          - EDIT
                          - VIEW
                        description: >-
                          Default permission level for new chats. Creator always
                          gets MANAGE regardless.
                      defaultAutomationAccessAudience:
                        type: string
                        enum:
                          - EVERYONE
                          - CREATOR_ONLY
                          - CREATOR_GROUPS
                        description: Default audience for newly created automations
                      defaultAutomationAccessLevel:
                        type: string
                        enum:
                          - MANAGE
                          - EDIT
                          - VIEW
                        description: >-
                          Default permission level for new automations. Creator
                          always gets MANAGE regardless.
                      trialEndsAt:
                        type:
                          - string
                          - 'null'
                        description: >-
                          [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:
                        type: string
                        description: >-
                          JWT secret for embedding. Only returned when
                          `?include=jwtSecret` is specified and the user has
                          admin access.
                    required:
                      - id
                      - name
                      - slug
                      - customAiContext
                      - insightsAiContext
                      - onboardingStatus
                      - fullEmbedEnabled
                      - embedAllowedOrigins
                      - isBillable
                      - insightsEnabled
                      - insightsFrequency
                      - insightsPreferredDayOfWeek
                      - insightsPreferredDayOfMonth
                      - allowOnDemandAiUsage
                      - aiUsageOverageLimitCents
                      - billingEmail
                      - sendInvoicesToBillingEmail
                      - defaultDashboardAccessAudience
                      - defaultDashboardAccessLevel
                      - defaultChatAccessAudience
                      - defaultChatAccessLevel
                      - defaultAutomationAccessAudience
                      - defaultAutomationAccessLevel
                      - trialEndsAt
                required:
                  - data
        '401':
          description: Unauthorized - Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found - Organization not found or no membership
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded - Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - error
    RateLimitErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/RateLimitError'
      required:
        - error
    ApiError:
      type: object
      properties:
        title:
          type: string
          description: Error type identifier
        detail:
          type: string
          description: Human-readable error description
      required:
        - title
        - detail
    RateLimitError:
      allOf:
        - $ref: '#/components/schemas/ApiError'
        - type: object
          properties:
            title:
              type: string
              enum:
                - RateLimitExceeded
            retryAfterMs:
              type: number
              description: Milliseconds until the rate limit window resets
          required:
            - retryAfterMs
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authentication using Bearer token format: `Bearer
        <basedash_api_key>`

````