Dashboards-3
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
PATCH | |
DELETE | |
POST | |
POST | |
POST | |
POST | |
POST | |
PATCH | |
POST | |
GET | |
GET | |
POST | |
GET | |
POST | |
POST | |
POST | |
POST | |
POST | |
GET |
Update dashboards
Also available via the PostHog MCP server:
dashboard-update— Update dashboard
Required API key scopes
dashboard:writePath parameters
- idinteger
Query parameters
- formatstringOne of:
"json""txt"
Request parameters
- namestringnull
- descriptionstring
- pinnedboolean
- last_accessed_atstringnull
- deletedboolean
- breakdown_colors
- data_color_theme_idintegernull
- tagsarray
- restriction_level
- last_refreshstringnull
- quick_filter_idsarraynull
- use_templatestring
- use_dashboardintegernull
- delete_insightsbooleanDefault:
false - _create_in_folderstring
Response
Example request
PATCH /api /projects /:project_id /dashboards /:idExample response
Status 200
Delete dashboards
Also available via the PostHog MCP server:
dashboard-delete— Delete dashboard
Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true
Required API key scopes
dashboard:writePath parameters
- idinteger
Query parameters
- formatstringOne of:
"json""txt"
Example request
DELETE /api /projects /:project_id /dashboards /:idExample response
Status 405 No response body
Create dashboards analyze refresh result
Generate AI analysis comparing before/after dashboard refresh. Expects cache_key in request body pointing to the stored 'before' state.
Path parameters
- idinteger
Query parameters
- formatstringOne of:
"json""txt"
Request parameters
- namestringnull
- descriptionstring
- pinnedboolean
- last_accessed_atstringnull
- deletedboolean
- breakdown_colors
- data_color_theme_idintegernull
- tagsarray
- restriction_level
- last_refreshstringnull
- quick_filter_idsarraynull
- use_templatestring
- use_dashboardintegernull
- delete_insightsbooleanDefault:
false - _create_in_folderstring
Example request
POST /api /projects /:project_id /dashboards /:id /analyze_refresh_resultExample response
Status 200 No response body
Create dashboards copy tile
Copy an existing dashboard tile to another dashboard (insight, text card, or widget tile).
Required API key scopes
dashboard:writePath parameters
- idinteger
Query parameters
- formatstringOne of:
"json""txt"
Request parameters
- fromDashboardIdinteger
- tileIdinteger
Response
Example request
POST /api /projects /:project_id /dashboards /:id /copy_tileExample response
Status 200
Create dashboards create text tile
Add a markdown text tile to a dashboard.
Text tiles render as markdown blocks on the dashboard — useful as section headings, dividers, or annotations between insight tiles to give the dashboard structure.
Required API key scopes
dashboard:writePath parameters
- idinteger
Query parameters
- formatstringOne of:
"json""txt"
Request parameters
- bodystring
- layouts
- colorstringnull
Response
Example request
POST /api /projects /:project_id /dashboards /:id /create_text_tileExample response
Status 201
Create dashboards delete
Soft-delete a single tile from a dashboard.
Works for text, insight, and button tiles. The underlying Insight, Text, or ButtonTile object is preserved — only the dashboard tile is hidden. To delete the entire dashboard, use the dashboard delete endpoint instead.
Required API key scopes
dashboard:writePath parameters
- idinteger
Query parameters
- formatstringOne of:
"json""txt"
Request parameters
- tile_idinteger
Example request
POST /api /projects /:project_id /dashboards /:id /delete_tileExample response
Status 204 No response body
Create dashboards move tile
Required API key scopes
dashboard:writePath parameters
- idinteger
Query parameters
- formatstringOne of:
"json""txt"
Request parameters
- to_dashboardinteger
- tile
Response
Example request
POST /api /projects /:project_id /dashboards /:id /move_tileExample response
Status 200
Update dashboards move tile
Required API key scopes
dashboard:writePath parameters
- idinteger
Query parameters
- formatstringOne of:
"json""txt"
Request parameters
- to_dashboardinteger
- tile
Response
Example request
PATCH /api /projects /:project_id /dashboards /:id /move_tileExample response
Status 200
Create dashboards reorder tiles
Required API key scopes
dashboard:writePath parameters
- idinteger
Query parameters
- formatstringOne of:
"json""txt"
Request parameters
- tile_orderarray
- layoutDefault:
preserve
Response
Example request
POST /api /projects /:project_id /dashboards /:id /reorder_tilesExample response
Status 200
Retrieve dashboards run insights
Run all insights on a dashboard and return their results.
Required API key scopes
query:readPath parameters
- idinteger
Query parameters
- filters_overridestring
- formatstringOne of:
"json""txt" - output_formatstringOne of:
"json""optimized" - refreshstringOne of:
"blocking""force_blocking""force_cache" - variables_overridestring
Response
Example request
GET /api /projects /:project_id /dashboards /:id /run_insightsExample response
Status 200
Retrieve dashboards run widgets
Required API key scopes
dashboard:readPath parameters
- idinteger
Query parameters
- formatstringOne of:
"json""txt" - tile_idsstring
Response
Example request
GET /api /projects /:project_id /dashboards /:id /run_widgetsExample response
Status 200
Create dashboards snapshot
Snapshot the current dashboard state (from cache) for AI analysis. Returns a cache_key representing the 'before' state, to be used with analyze_refresh_result.
Path parameters
- idinteger
Query parameters
- formatstringOne of:
"json""txt"
Request parameters
- namestringnull
- descriptionstring
- pinnedboolean
- last_accessed_atstringnull
- deletedboolean
- breakdown_colors
- data_color_theme_idintegernull
- tagsarray
- restriction_level
- last_refreshstringnull
- quick_filter_idsarraynull
- use_templatestring
- use_dashboardintegernull
- delete_insightsbooleanDefault:
false - _create_in_folderstring
Example request
POST /api /projects /:project_id /dashboards /:id /snapshotExample response
Status 200 No response body
Retrieve dashboards stream tiles
Stream dashboard metadata and tiles via Server-Sent Events. Sends metadata first, then tiles as they are rendered.
Path parameters
- idinteger
Query parameters
- filters_overridestring
- formatstringOne of:
"json""txt" - layoutSizestringOne of:
"sm""xs" - variables_overridestring
Example request
GET /api /projects /:project_id /dashboards /:id /stream_tilesExample response
Status 200 No response body
Create dashboards update text tile
Update the markdown body, layout, or color of an existing text tile on a dashboard.
Required API key scopes
dashboard:writePath parameters
- idinteger
Query parameters
- formatstringOne of:
"json""txt"
Request parameters
- tile_idinteger
- bodystring
- layouts
- colorstringnull
Response
Example request
POST /api /projects /:project_id /dashboards /:id /update_text_tileExample response
Status 200
Create dashboards widgets batch
Add multiple widget tiles to a dashboard in one atomic request.
Required API key scopes
dashboard:writePath parameters
- idinteger
Query parameters
- formatstringOne of:
"json""txt"
Request parameters
- widgetsarray
Response
Example request
POST /api /projects /:project_id /dashboards /:id /widgets /batchExample response
Status 201
Create dashboards bulk update tags
Bulk update tags on multiple objects.
PAT access: this action has no required_scopes= on the decorator —
inheriting viewsets must add "bulk_update_tags" to their
scope_object_write_actions list to accept personal API keys.
Without that opt-in, APIScopePermission rejects PAT requests with
"This action does not support personal API key access". Done per-viewset
so granting <scope>:write for one resource doesn't leak access to
sibling resources that share this mixin.
Accepts:
- {"ids": [...], "action": "add"|"remove"|"set", "tags": ["tag1", "tag2"]}
Actions:
- "add": Add tags to existing tags on each object
- "remove": Remove specific tags from each object
- "set": Replace all tags on each object with the provided list
Query parameters
- formatstringOne of:
"json""txt"
Request parameters
- idsarray
- action
- tagsarray
Response
Example request
POST /api /projects /:project_id /dashboards /bulk_update_tagsExample response
Status 200
Create dashboards create from template json
Query parameters
- formatstringOne of:
"json""txt"
Request parameters
- namestringnull
- descriptionstring
- pinnedboolean
- last_accessed_atstringnull
- deletedboolean
- breakdown_colors
- data_color_theme_idintegernull
- tagsarray
- restriction_level
- last_refreshstringnull
- quick_filter_idsarraynull
- use_templatestring
- use_dashboardintegernull
- delete_insightsbooleanDefault:
false - _create_in_folderstring
Example request
POST /api /projects /:project_id /dashboards /create_from_template_jsonExample response
Status 200 No response body
Create dashboards create unlisted dashboard
Creates an unlisted dashboard from template by tag. Enforces uniqueness (one per tag per team). Returns 409 if unlisted dashboard with this tag already exists.
Query parameters
- formatstringOne of:
"json""txt"
Request parameters
- namestringnull
- descriptionstring
- pinnedboolean
- last_accessed_atstringnull
- deletedboolean
- breakdown_colors
- data_color_theme_idintegernull
- tagsarray
- restriction_level
- last_refreshstringnull
- quick_filter_idsarraynull
- use_templatestring
- use_dashboardintegernull
- delete_insightsbooleanDefault:
false - _create_in_folderstring
Example request
POST /api /projects /:project_id /dashboards /create_unlisted_dashboardExample response
Status 200 No response body
Retrieve dashboards widget catalog
List registered dashboard widget types and config hints for agents.
Required API key scopes
dashboard:readQuery parameters
- formatstringOne of:
"json""txt"
Response
Example request
GET /api /projects /:project_id /dashboards /widget_catalog