Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/metabase/metabase/llms.txt

Use this file to discover all available pages before exploring further.

The Dashboard API manages dashboards in Metabase. Dashboards are collections of cards (questions) arranged with optional parameters for filtering. This API includes 20 endpoints.

List dashboards

Get all dashboards you have access to.
GET /api/dashboard
curl -X GET \
  https://your-metabase.com/api/dashboard \
  -H 'X-Metabase-Session: SESSION_TOKEN'

Response

[
  {
    "id": 1,
    "name": "Sales Overview",
    "description": "Key sales metrics",
    "collection_id": 5,
    "created_at": "2024-01-15T10:00:00Z",
    "updated_at": "2024-03-01T14:30:00Z"
  }
]

Get dashboard

Get details about a specific dashboard.
GET /api/dashboard/{id}
curl -X GET \
  https://your-metabase.com/api/dashboard/1 \
  -H 'X-Metabase-Session: SESSION_TOKEN'

Parameters

id
integer
required
Dashboard ID

Response

id
integer
Dashboard ID
name
string
Dashboard name
description
string
Dashboard description
dashcards
array
Array of cards on the dashboard with their positions and sizes
parameters
array
Dashboard-level parameters for filtering
tabs
array
Dashboard tabs if using tabbed layout
collection_id
integer
Collection containing this dashboard

Create dashboard

Create a new dashboard.
POST /api/dashboard
curl -X POST \
  https://your-metabase.com/api/dashboard \
  -H 'Content-Type: application/json' \
  -H 'X-Metabase-Session: SESSION_TOKEN' \
  -d '{
    "name": "New Dashboard",
    "description": "Dashboard description",
    "collection_id": 5
  }'

Request body

name
string
required
Dashboard name
description
string
Dashboard description
collection_id
integer
Collection to save the dashboard in
parameters
array
Dashboard parameters for filtering cards

Update dashboard

Update an existing dashboard.
PUT /api/dashboard/{id}
curl -X PUT \
  https://your-metabase.com/api/dashboard/1 \
  -H 'Content-Type: application/json' \
  -H 'X-Metabase-Session: SESSION_TOKEN' \
  -d '{
    "name": "Updated Dashboard Name",
    "description": "Updated description"
  }'

Parameters

id
integer
required
Dashboard ID

Request body

All fields are optional.
name
string
Updated dashboard name
description
string
Updated description
parameters
array
Updated dashboard parameters
dashcards
array
Updated cards, positions, and sizes
archived
boolean
Archive or unarchive the dashboard

Delete dashboard

Permanently delete a dashboard.
DELETE /api/dashboard/{id}
curl -X DELETE \
  https://your-metabase.com/api/dashboard/1 \
  -H 'X-Metabase-Session: SESSION_TOKEN'
This permanently deletes the dashboard. To soft delete, use PUT /api/dashboard/{id} with "archived": true.

Add card to dashboard

Add a card to a dashboard.
POST /api/dashboard/{dashboard-id}/cards
curl -X POST \
  https://your-metabase.com/api/dashboard/1/cards \
  -H 'Content-Type: application/json' \
  -H 'X-Metabase-Session: SESSION_TOKEN' \
  -d '{
    "cardId": 5,
    "row": 0,
    "col": 0,
    "sizeX": 4,
    "sizeY": 4
  }'

Request body

cardId
integer
required
ID of the card to add
row
integer
required
Row position (0-based)
col
integer
required
Column position (0-based, max 12)
sizeX
integer
required
Width in grid units (1-12)
sizeY
integer
required
Height in grid units
parameter_mappings
array
How dashboard parameters map to card parameters
visualization_settings
object
Card-specific visualization overrides

Update dashboard card

Update position, size, or settings for a card on a dashboard.
PUT /api/dashboard/{dashboard-id}/cards
curl -X PUT \
  https://your-metabase.com/api/dashboard/1/cards \
  -H 'Content-Type: application/json' \
  -H 'X-Metabase-Session: SESSION_TOKEN' \
  -d '{
    "cards": [
      {
        "id": 10,
        "row": 2,
        "col": 0,
        "sizeX": 6,
        "sizeY": 4
      }
    ]
  }'

Remove card from dashboard

Remove a card from a dashboard.
DELETE /api/dashboard/{dashboard-id}/cards
curl -X DELETE \
  https://your-metabase.com/api/dashboard/1/cards \
  -H 'Content-Type: application/json' \
  -H 'X-Metabase-Session: SESSION_TOKEN' \
  -d '{
    "dashcardId": 10
  }'

Execute dashboard card query

Run the query for a specific card on a dashboard.
POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query
curl -X POST \
  https://your-metabase.com/api/dashboard/1/dashcard/10/card/5/query \
  -H 'Content-Type: application/json' \
  -H 'X-Metabase-Session: SESSION_TOKEN' \
  -d '{
    "parameters": []
  }'

Parameters

dashboard-id
integer
required
Dashboard ID
dashcard-id
integer
required
Dashboard card ID
card-id
integer
required
Card ID

Request body

parameters
array
Dashboard parameter values to apply
ignore_cache
boolean
Skip cached results (default: false)

Download dashboard card results

Execute a dashboard card query and download results.
POST /api/dashboard/{dashboard-id}/dashcard/{dashcard-id}/card/{card-id}/query/{export-format}
curl -X POST \
  https://your-metabase.com/api/dashboard/1/dashcard/10/card/5/query/csv \
  -H 'Content-Type: application/json' \
  -H 'X-Metabase-Session: SESSION_TOKEN' \
  -d '{
    "parameters": [],
    "format_rows": true
  }' \
  -o results.csv

Parameters

export-format
string
required
Export format: csv, xlsx, or json

Public sharing

Generate a public sharing link for a dashboard.
POST /api/dashboard/{dashboard-id}/public_link
curl -X POST \
  https://your-metabase.com/api/dashboard/1/public_link \
  -H 'X-Metabase-Session: SESSION_TOKEN'
Requires public sharing to be enabled and admin permissions.

Response

{
  "uuid": "110c3d96-ff3a-4ec6-9a82-7c2d5e073fa2"
}
The dashboard can be accessed at /public/dashboard/{uuid}. Remove the public sharing link.
DELETE /api/dashboard/{dashboard-id}/public_link
curl -X DELETE \
  https://your-metabase.com/api/dashboard/1/public_link \
  -H 'X-Metabase-Session: SESSION_TOKEN'

Dashboard subscriptions

Create subscription

Create an email or Slack subscription for a dashboard.
POST /api/dashboard/{dashboard-id}/subscriptions

List subscriptions

Get all subscriptions for a dashboard.
GET /api/dashboard/{dashboard-id}/subscriptions

Save dashboard

Create a new dashboard from an existing one.
POST /api/dashboard/save
curl -X POST \
  https://your-metabase.com/api/dashboard/save \
  -H 'Content-Type: application/json' \
  -H 'X-Metabase-Session: SESSION_TOKEN' \
  -d '{
    "name": "Saved Dashboard",
    "description": "Description",
    "dashcards": [],
    "parameters": []
  }'

List embeddable dashboards

Get all dashboards that can be embedded.
GET /api/dashboard/embeddable
curl -X GET \
  https://your-metabase.com/api/dashboard/embeddable \
  -H 'X-Metabase-Session: SESSION_TOKEN'