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

# Add a panel (members)

> At most 24 a dashboard. Saving runs nothing. Send `Content-Type: application/json`.



## OpenAPI

````yaml /api-reference/openapi.json post /projects/{projectId}/dashboards/{dashboardId}/panels
openapi: 3.1.0
info:
  title: Apsio API
  version: 0.1.0
  description: >-
    Read API v0: your projects, release health and comparisons, missing symbols,
    issues, sessions, vitals, cohort comparisons, performance (app start,
    screens, hangs, MetricKit) and network endpoints and traces for one project.
    Authenticate with a project token as a bearer token, with an OAuth access
    token from Apsio's authorization server (MCP clients), or, from the console,
    with the session cookie of a member of the project's organization.
servers:
  - url: https://api.apsio.io/v1
security: []
paths:
  /projects/{projectId}/dashboards/{dashboardId}/panels:
    post:
      summary: Add a panel (members)
      description: >-
        At most 24 a dashboard. Saving runs nothing. Send `Content-Type:
        application/json`.
      parameters:
        - schema:
            type: string
            pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: 0192f3a4-0000-7000-8000-00000000a101
          required: true
          name: projectId
          in: path
        - schema:
            type: string
            pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: 0192f3a4-0000-7000-8000-00000000d001
          required: true
          name: dashboardId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PanelInput'
      responses:
        '201':
          description: Added.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DashboardPanel'
        '400':
          description: Not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: No valid bearer token or console session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: 'Not allowed: a role, the grant, or the sandbox.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such project, dashboard or panel.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: 'At the limit: 20 dashboards a project, 24 panels a dashboard.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Too many writes; try again shortly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Dashboards are not available here.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearer: []
        - session: []
components:
  schemas:
    PanelInput:
      oneOf:
        - type: object
          properties:
            kind:
              type: string
              enum:
                - sql
            title:
              type: string
              minLength: 1
              maxLength: 100
            sql:
              type: string
              minLength: 1
              maxLength: 10000
              description: >-
                Read-only SQL, run as POST /query runs it, with {from:DateTime},
                {to:DateTime} and {bucket:UInt32} filled from the board's range.
            chart:
              $ref: '#/components/schemas/PanelChart'
            layout:
              $ref: '#/components/schemas/PanelLayout'
          required:
            - kind
            - title
            - sql
            - chart
            - layout
          additionalProperties: false
        - type: object
          properties:
            kind:
              type: string
              enum:
                - preset
            title:
              type: string
              minLength: 1
              maxLength: 100
            preset:
              type: string
              maxLength: 64
            params:
              type: object
              additionalProperties:
                anyOf:
                  - type: number
                  - type: string
                    maxLength: 512
            chart:
              $ref: '#/components/schemas/PanelChart'
            layout:
              $ref: '#/components/schemas/PanelLayout'
          required:
            - kind
            - title
            - preset
            - chart
            - layout
          additionalProperties: false
    DashboardPanel:
      type: object
      properties:
        id:
          type: string
        dashboard_id:
          type: string
        kind:
          type: string
          enum:
            - sql
            - preset
        title:
          type: string
          description: 'Untrusted text: render it as text.'
        sql:
          type:
            - string
            - 'null'
          description: Untrusted text, as written.
        preset:
          type:
            - string
            - 'null'
        params:
          type: object
          additionalProperties:
            anyOf:
              - type: number
              - type: string
        chart:
          type: object
          additionalProperties: {}
        layout:
          type: object
          additionalProperties:
            type: number
        updated_by:
          type:
            - string
            - 'null'
        updated_via:
          type: string
          enum:
            - console
            - token
            - oauth
            - mcp
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - dashboard_id
        - kind
        - title
        - sql
        - preset
        - params
        - chart
        - layout
        - updated_by
        - updated_via
        - created_at
        - updated_at
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: invalid_request
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
    PanelChart:
      type: object
      properties:
        type:
          type: string
          enum:
            - line
            - bar
            - stat
            - table
        x:
          type: string
          maxLength: 128
          pattern: ^[^\u0000-\u001f\u007f-\u009f‪-‮⁦-⁩]*$
          description: The column on the x axis (line, bar).
        'y':
          type: array
          items:
            type: string
            maxLength: 128
            pattern: ^[^\u0000-\u001f\u007f-\u009f‪-‮⁦-⁩]*$
          maxItems: 6
          description: The value columns, at most 6.
        series:
          type: string
          maxLength: 128
          pattern: ^[^\u0000-\u001f\u007f-\u009f‪-‮⁦-⁩]*$
          description: A column whose values split the lines or bars.
        unit:
          type: string
          maxLength: 16
          pattern: ^[^\u0000-\u001f\u007f-\u009f‪-‮⁦-⁩]*$
        threshold:
          type: number
          description: A horizontal line, for a budget.
      required:
        - type
      additionalProperties: false
    PanelLayout:
      type: object
      properties:
        x:
          type: integer
          minimum: 0
          maximum: 11
        'y':
          type: integer
          minimum: 0
          maximum: 1000
        w:
          type: integer
          minimum: 1
          maximum: 12
        h:
          type: integer
          minimum: 1
          maximum: 12
      required:
        - x
        - 'y'
        - w
        - h
      additionalProperties: false
      description: Its place on a grid 12 columns wide.
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        A project token (apsio_pt_v0...), which reads exactly one project, or an
        OAuth access token issued for the API, which reads what its user can.
        Access tokens issued for Apsio's MCP server are accepted only from the
        MCP server itself.
    session:
      type: apiKey
      in: cookie
      name: apsio_session
      description: >-
        The console session, set by /v1/auth/callback (`__Host-apsio_session`
        when host-only).

````

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