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

# Create dashboard from spec

> Creates a dashboard for the caller's user from a spec — the `spec` object of `GET /v1/dashboards/{id}` (not the whole read model), or a template's. The network is named as `network_id` + `environment` (one copilot per environment of a network), so the same call moves between dev, staging and prod by changing one word. Sources and actions name tools by their agent-facing name and are resolved against the catalogue of that copilot (the read-only tools of its agents are sources, the write tools actions); a tool the copilot does not carry fails the call naming it. The dashboard is compiled, test-refreshed with the caller's credentials, published as version 1 and activated — the same path the dashboard agent takes, without a model. A session token creates for its own user; an API key names the user with X-User-Id and may send `runtimeAuth`. The per-user cap applies.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/dashboards
openapi: 3.1.0
info:
  title: Sidenet API
  version: 1.0.0
  description: >-
    Sidenet HTTP endpoints exposed by the Sidenet Studio. All routes require an
    api key that can be generated through the studio in studio.sidenet.ai.
servers:
  - url: https://api.sidenet.ai
security:
  - bearerAuth: []
paths:
  /v1/dashboards:
    post:
      tags:
        - Dashboards
      summary: Create dashboard from spec
      description: >-
        Creates a dashboard for the caller's user from a spec — the `spec`
        object of `GET /v1/dashboards/{id}` (not the whole read model), or a
        template's. The network is named as `network_id` + `environment` (one
        copilot per environment of a network), so the same call moves between
        dev, staging and prod by changing one word. Sources and actions name
        tools by their agent-facing name and are resolved against the catalogue
        of that copilot (the read-only tools of its agents are sources, the
        write tools actions); a tool the copilot does not carry fails the call
        naming it. The dashboard is compiled, test-refreshed with the caller's
        credentials, published as version 1 and activated — the same path the
        dashboard agent takes, without a model. A session token creates for its
        own user; an API key names the user with X-User-Id and may send
        `runtimeAuth`. The per-user cap applies.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - network_id
                - environment
                - spec
              properties:
                network_id:
                  type: integer
                  description: >-
                    The network (`GET /v1/networks`) whose copilot resolves the
                    spec's sources and actions.
                  example: 12
                environment:
                  type: string
                  enum:
                    - dev
                    - staging
                    - prod
                  description: >-
                    Which environment of the network: its copilot's tool
                    catalogue is used.
                  example: prod
                spec:
                  type: object
                  description: >-
                    The dashboard spec: `name`, `filters`, `sources`, `panels`,
                    `views`, `actions` — exactly the `spec` of a dashboard read.
                timezone:
                  type: string
                  description: IANA timezone for date presets (default UTC).
                  example: Europe/Paris
                runtimeAuth:
                  type: object
                  description: >-
                    API key only: per-provider credentials for the test refresh,
                    over the user's stored ones.
                  additionalProperties:
                    type: object
      responses:
        '201':
          description: Created and refreshed once
          content:
            application/json:
              schema:
                type: object
                properties:
                  dashboard:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                      description:
                        type: string
                        nullable: true
                      timezone:
                        type: string
                      workflow_id:
                        type: string
                        format: uuid
                      active_version:
                        type: object
                        nullable: true
                        properties:
                          id:
                            type: string
                          number:
                            type: integer
                          created_at:
                            type: string
                            nullable: true
                      last_run_id:
                        type: string
                        nullable: true
                      last_refreshed_at:
                        type: string
                        nullable: true
                      last_refresh_status:
                        type: string
                        nullable: true
                      refresh_schedule_id:
                        type: string
                        nullable: true
                      created_at:
                        type: string
                      updated_at:
                        type: string
                  version:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                      number:
                        type: integer
                      created_at:
                        type: string
                        nullable: true
                  spec:
                    type: object
                    nullable: true
                    description: >-
                      The version's spec: `filters`, `sources`, `panels`
                      (layout: `span`, `height`, order; triggers: a stats
                      panel's `on_click`, a table's `row_key`, `cell_triggers`
                      (by column key: the cell value is a link), `on_row_click`,
                      `row_actions`), `views` (what a trigger opens: `kind`
                      table | stats | chart | form, `title`, `presentation`
                      drawer | modal, `context` keys; a form view carries
                      `tool`, `fields`, `initial`, `submit_label`, `on_success`,
                      `confirm` and `schema` — the JSON Schema of its fields)
                      and `actions` (toolbar buttons). A trigger is `{ view,
                      context }`; context values that are templates
                      ("{{row.id}}", "{{row}}", "{{stat.key}}",
                      "{{stat.value}}", "{{filters.<key>}}") are resolved by the
                      page before it calls the view.
                  filters:
                    type: object
                    properties:
                      schema:
                        type: array
                        items:
                          type: object
                        description: >-
                          The filter definitions (key, label, kind, options,
                          default).
                      values:
                        type: object
                        additionalProperties: true
                        description: >-
                          The values the page opens on (the last refresh's, else
                          the defaults).
                  data:
                    type: object
                    properties:
                      run_id:
                        type: string
                        format: uuid
                      status:
                        type: string
                        enum:
                          - running
                          - succeeded
                          - failed
                      started_at:
                        type: string
                        format: date-time
                      refreshed_at:
                        type: string
                        format: date-time
                        nullable: true
                      filters:
                        type: object
                        additionalProperties: true
                        description: The raw filter values of this run.
                      panels:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            kind:
                              type: string
                              enum:
                                - stats
                                - chart
                                - table
                                - text
                            title:
                              type: string
                            span:
                              type: integer
                              description: Columns of 12.
                            height:
                              type: string
                              enum:
                                - sm
                                - md
                                - lg
                            component:
                              type: object
                              nullable: true
                              description: >-
                                The rendered payload, in the chat tool-call part
                                shape: `{ toolCallId, toolName: "showStats" |
                                "showChart" | "showTable", args, result }`.
                                `args` is what the SDK renders.
                            markdown:
                              type: string
                              nullable: true
                              description: Text panels.
                      error:
                        type: string
                        nullable: true
                    nullable: true
                    description: >-
                      The latest refresh, or null when the dashboard was never
                      refreshed.
        '400':
          description: >-
            The spec did not compile — `issues` says where, naming the tool when
            one is not in the copilot's catalogue
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                  issues:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                        message:
                          type: string
                        code:
                          type: string
        '404':
          description: >-
            The network has no copilot for that environment in this
            organization, or (API key) no such user
        '422':
          description: >-
            The spec compiled but its first refresh failed (a source errored, a
            transform threw); nothing was created
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
                  test:
                    type: object
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Organization API key, generated in studio.sidenet.ai. Backend only —
        never in a browser.

````

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