> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-3a82795f.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Dashboard

> Creates a new dashboard



## OpenAPI

````yaml /clickstack/api-reference/hyperdx-openapi.json post /api/v2/dashboards
openapi: 3.0.0
info:
  title: HyperDX External API
  description: API for managing HyperDX alerts and dashboards
  version: 2.0.0
servers:
  - url: https://api.hyperdx.io
    description: Production API server
  - url: /
    description: Current server
security:
  - BearerAuth: []
tags:
  - name: Dashboards
    description: Endpoints for managing dashboards and their visualizations
  - name: Alerts
    description: Endpoints for managing monitoring alerts
paths:
  /api/v2/dashboards:
    post:
      tags:
        - Dashboards
      summary: Create Dashboard
      description: Creates a new dashboard
      operationId: createDashboard
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDashboardRequest'
            examples:
              simpleTimeSeriesDashboard:
                summary: Dashboard with time series chart
                value:
                  name: API Monitoring Dashboard
                  tiles:
                    - name: API Request Volume
                      x: 0
                      'y': 0
                      w: 6
                      h: 3
                      asRatio: false
                      series:
                        - type: time
                          dataSource: events
                          aggFn: count
                          where: service:api
                          groupBy: []
                  tags:
                    - api
                    - monitoring
              complexDashboard:
                summary: Dashboard with multiple chart types
                value:
                  name: Service Health Overview
                  tiles:
                    - name: Request Count
                      x: 0
                      'y': 0
                      w: 6
                      h: 3
                      asRatio: false
                      series:
                        - type: time
                          dataSource: events
                          aggFn: count
                          where: service:backend
                          groupBy: []
                    - name: Error Distribution
                      x: 6
                      'y': 0
                      w: 6
                      h: 3
                      asRatio: false
                      series:
                        - type: table
                          dataSource: events
                          aggFn: count
                          where: level:error
                          groupBy:
                            - errorType
                          sortOrder: desc
                  tags:
                    - service-health
                    - production
      responses:
        '200':
          description: Successfully created dashboard
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DashboardResponse'
              examples:
                createdDashboard:
                  summary: Created dashboard response
                  value:
                    data:
                      id: 65f5e4a3b9e77c001a567890
                      name: API Monitoring Dashboard
                      tiles:
                        - id: 65f5e4a3b9e77c001a901234
                          name: API Request Volume
                          x: 0
                          'y': 0
                          w: 6
                          h: 3
                          asRatio: false
                          series:
                            - type: time
                              dataSource: events
                              aggFn: count
                              where: service:api
                              groupBy: []
                      tags:
                        - api
                        - monitoring
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Unauthorized access. API key is missing or invalid.
        '500':
          description: Server error or validation failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: 'Dashboard validation failed: name is required'
components:
  schemas:
    CreateDashboardRequest:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          example: New Dashboard
        tiles:
          type: array
          items:
            $ref: '#/components/schemas/Tile'
        tags:
          type: array
          items:
            type: string
          example:
            - development
    DashboardResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Dashboard'
    Error:
      type: object
      properties:
        message:
          type: string
    Tile:
      type: object
      properties:
        id:
          type: string
          example: 65f5e4a3b9e77c001a901234
        name:
          type: string
          example: Error Rate
        x:
          type: integer
          example: 0
        'y':
          type: integer
          example: 0
        w:
          type: integer
          example: 6
        h:
          type: integer
          example: 3
        asRatio:
          type: boolean
          example: false
        series:
          type: array
          items:
            $ref: '#/components/schemas/ChartSeries'
    Dashboard:
      type: object
      properties:
        id:
          type: string
          example: 65f5e4a3b9e77c001a567890
        name:
          type: string
          example: Service Overview
        tiles:
          type: array
          items:
            $ref: '#/components/schemas/Tile'
        tags:
          type: array
          items:
            type: string
          example:
            - production
            - monitoring
    ChartSeries:
      type: object
      required:
        - sourceId
        - aggFn
        - where
        - groupBy
      properties:
        sourceId:
          type: string
          description: ID of the data source for this series
          example: 65f5e4a3b9e77c001a123456
        aggFn:
          type: string
          description: Aggregation function to use on the data
          enum:
            - avg
            - count
            - count_distinct
            - last_value
            - max
            - min
            - quantile
            - sum
          example: count
        field:
          type: string
          description: Field to aggregate
          example: duration
        where:
          type: string
          description: Filter condition in Lucene query syntax
          example: level:error
        whereLanguage:
          type: string
          description: Query language used in the where clause
          enum:
            - lucene
            - sql
          example: lucene
        groupBy:
          type: array
          description: Fields to group the results by
          items:
            type: string
          example:
            - service
            - host
        metricName:
          type: string
          description: Name of the metric (for metric data sources)
          example: http_requests_total
        metricDataType:
          type: string
          description: Type of metric data
          enum:
            - sum
            - gauge
            - histogram
          example: gauge
        type:
          type: string
          enum:
            - time
            - table
            - number
            - histogram
            - search
            - markdown
          example: time
        dataSource:
          type: string
          enum:
            - events
            - metrics
          example: events
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````