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

# Create a dashboard

> Creates a new dashboard within an organization, including a default "Main" tab. Requires admin access to the organization.



## OpenAPI

````yaml https://charts.basedash.com/api/public/openapi post /api/public/organizations/{orgId}/dashboards
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
paths:
  /api/public/organizations/{orgId}/dashboards:
    post:
      tags:
        - Dashboards
      summary: Create a dashboard
      description: >-
        Creates a new dashboard within an organization, including a default
        "Main" tab. Requires admin access to the organization.
      parameters:
        - schema:
            type: string
            description: Organization ID
          required: true
          description: Organization ID
          name: orgId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDashboardInput'
      responses:
        '201':
          description: Dashboard created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DashboardWithTabsResponse'
                required:
                  - data
        '400':
          description: Bad request - Invalid JSON body or validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - Organization trial has expired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found - Organization not found or no admin access
          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:
    CreateDashboardInput:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          description: Name of the dashboard
        description:
          type:
            - string
            - 'null'
          description: Optional description of the dashboard
        icon:
          type: string
          minLength: 1
          description: Icon name for the dashboard
        color:
          type: string
          minLength: 1
          description: Icon color key for the dashboard
        dashboardFolderId:
          type:
            - string
            - 'null'
          description: ID of the folder to place the dashboard in
        width:
          $ref: '#/components/schemas/DashboardWidth'
        defaultDateRange:
          $ref: '#/components/schemas/DateRange'
        defaultCustomDateRangeStart:
          type:
            - string
            - 'null'
          format: date-time
          description: Start of the custom date range (when defaultDateRange is CUSTOM)
        defaultCustomDateRangeEnd:
          type:
            - string
            - 'null'
          format: date-time
          description: End of the custom date range (when defaultDateRange is CUSTOM)
        defaultGroupByInterval:
          $ref: '#/components/schemas/GroupByInterval'
      required:
        - name
    DashboardWithTabsResponse:
      allOf:
        - $ref: '#/components/schemas/DashboardResponse'
        - type: object
          properties:
            tabs:
              type: array
              items:
                $ref: '#/components/schemas/DashboardTab'
              description: Tabs on the dashboard, ordered by their sort order
          required:
            - tabs
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - error
    RateLimitErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/RateLimitError'
      required:
        - error
    DashboardWidth:
      anyOf:
        - type: string
          enum:
            - NORMAL
        - type: string
          enum:
            - WIDE
        - type: string
          enum:
            - ULTRAWIDE
      description: Width of the dashboard grid
    DateRange:
      anyOf:
        - type: string
          enum:
            - CUSTOM
        - type: string
          enum:
            - TODAY
        - type: string
          enum:
            - YESTERDAY
        - type: string
          enum:
            - THIS_WEEK
        - type: string
          enum:
            - THIS_MONTH
        - type: string
          enum:
            - THIS_QUARTER
        - type: string
          enum:
            - THIS_YEAR
        - type: string
          enum:
            - LAST_7_DAYS
        - type: string
          enum:
            - LAST_30_DAYS
        - type: string
          enum:
            - LAST_60_DAYS
        - type: string
          enum:
            - LAST_90_DAYS
        - type: string
          enum:
            - LAST_6_MONTHS
        - type: string
          enum:
            - LAST_1_YEAR
        - type: string
          enum:
            - ALL_TIME
      description: Default date range applied to the dashboard
    GroupByInterval:
      anyOf:
        - type: string
          enum:
            - HOUR
        - type: string
          enum:
            - DAY
        - type: string
          enum:
            - WEEK
        - type: string
          enum:
            - MONTH
        - type: string
          enum:
            - YEAR
      description: Default group-by interval applied to the dashboard
    DashboardResponse:
      type: object
      properties:
        id:
          type: string
          description: Dashboard ID
        createdAt:
          type: string
          format: date-time
          description: Dashboard creation timestamp
        updatedAt:
          type: string
          format: date-time
          description: Dashboard last update timestamp
        name:
          type: string
          description: Name of the dashboard
        description:
          type:
            - string
            - 'null'
          description: Description of the dashboard
        icon:
          type: string
          description: Icon name for the dashboard
        color:
          type: string
          description: Icon color key for the dashboard
        dashboardFolderId:
          type:
            - string
            - 'null'
          description: ID of the folder the dashboard is in
        width:
          $ref: '#/components/schemas/DashboardWidth'
        defaultDateRange:
          $ref: '#/components/schemas/DateRange'
        defaultCustomDateRangeStart:
          type:
            - string
            - 'null'
          format: date-time
          description: Start of the custom date range
        defaultCustomDateRangeEnd:
          type:
            - string
            - 'null'
          format: date-time
          description: End of the custom date range
        defaultGroupByInterval:
          $ref: '#/components/schemas/GroupByInterval'
        organizationId:
          type: string
          description: Organization ID
      required:
        - id
        - createdAt
        - updatedAt
        - name
        - description
        - icon
        - color
        - dashboardFolderId
        - width
        - defaultDateRange
        - defaultCustomDateRangeStart
        - defaultCustomDateRangeEnd
        - defaultGroupByInterval
        - organizationId
    DashboardTab:
      type: object
      properties:
        id:
          type: string
          description: Dashboard tab ID
        createdAt:
          type: string
          format: date-time
          description: Tab creation timestamp
        updatedAt:
          type: string
          format: date-time
          description: Tab last update timestamp
        name:
          type: string
          description: Name of the tab
        order:
          type: number
          description: Sort order of the tab within the dashboard
        dashboardId:
          type: string
          description: ID of the dashboard the tab belongs to
      required:
        - id
        - createdAt
        - updatedAt
        - name
        - order
        - dashboardId
    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>`

````