Create a dashboard
curl --request POST \
--url https://api.example.com/dashboard-v2 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"conditions": {},
"widgets": [
{
"key": "<string>",
"x": 123,
"y": 123,
"w": 123,
"h": 123,
"title": "<string>",
"source": {
"type": "advancedExplorer",
"request": {
"period": {
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"forecastDays": 1
},
"queries": [
{
"type": "condition",
"expression": "<string>",
"name": "<string>",
"colorIndex": 123,
"alias": "<string>",
"visible": true
}
],
"bookmarkedEvents": [
"<string>"
],
"eventsFilter": {
"sources": [
"custom",
"api"
],
"githubSourceRepos": [],
"search": ""
},
"scopeId": "<string>",
"limitOverride": 500,
"displayOptions": {
"hideEmptyRows": true,
"topN": 50,
"showTotal": true,
"precision": 3
}
}
},
"description": ""
}
],
"description": "",
"teamId": "<string>",
"scopeId": "<string>",
"metricId": "<string>",
"groupBy": "<string>",
"startDate": "<string>",
"endDate": "<string>"
}
'import requests
url = "https://api.example.com/dashboard-v2"
payload = {
"name": "<string>",
"conditions": {},
"widgets": [
{
"key": "<string>",
"x": 123,
"y": 123,
"w": 123,
"h": 123,
"title": "<string>",
"source": {
"type": "advancedExplorer",
"request": {
"period": {
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"forecastDays": 1
},
"queries": [
{
"type": "condition",
"expression": "<string>",
"name": "<string>",
"colorIndex": 123,
"alias": "<string>",
"visible": True
}
],
"bookmarkedEvents": ["<string>"],
"eventsFilter": {
"sources": ["custom", "api"],
"githubSourceRepos": [],
"search": ""
},
"scopeId": "<string>",
"limitOverride": 500,
"displayOptions": {
"hideEmptyRows": True,
"topN": 50,
"showTotal": True,
"precision": 3
}
}
},
"description": ""
}
],
"description": "",
"teamId": "<string>",
"scopeId": "<string>",
"metricId": "<string>",
"groupBy": "<string>",
"startDate": "<string>",
"endDate": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
conditions: {},
widgets: [
{
key: '<string>',
x: 123,
y: 123,
w: 123,
h: 123,
title: '<string>',
source: {
type: 'advancedExplorer',
request: {
period: {
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
forecastDays: 1
},
queries: [
{
type: 'condition',
expression: '<string>',
name: '<string>',
colorIndex: 123,
alias: '<string>',
visible: true
}
],
bookmarkedEvents: ['<string>'],
eventsFilter: {sources: ['custom', 'api'], githubSourceRepos: [], search: ''},
scopeId: '<string>',
limitOverride: 500,
displayOptions: {hideEmptyRows: true, topN: 50, showTotal: true, precision: 3}
}
},
description: ''
}
],
description: '',
teamId: '<string>',
scopeId: '<string>',
metricId: '<string>',
groupBy: '<string>',
startDate: '<string>',
endDate: '<string>'
})
};
fetch('https://api.example.com/dashboard-v2', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/dashboard-v2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'conditions' => [
],
'widgets' => [
[
'key' => '<string>',
'x' => 123,
'y' => 123,
'w' => 123,
'h' => 123,
'title' => '<string>',
'source' => [
'type' => 'advancedExplorer',
'request' => [
'period' => [
'startDate' => '2023-11-07T05:31:56Z',
'endDate' => '2023-11-07T05:31:56Z',
'forecastDays' => 1
],
'queries' => [
[
'type' => 'condition',
'expression' => '<string>',
'name' => '<string>',
'colorIndex' => 123,
'alias' => '<string>',
'visible' => true
]
],
'bookmarkedEvents' => [
'<string>'
],
'eventsFilter' => [
'sources' => [
'custom',
'api'
],
'githubSourceRepos' => [
],
'search' => ''
],
'scopeId' => '<string>',
'limitOverride' => 500,
'displayOptions' => [
'hideEmptyRows' => true,
'topN' => 50,
'showTotal' => true,
'precision' => 3
]
]
],
'description' => ''
]
],
'description' => '',
'teamId' => '<string>',
'scopeId' => '<string>',
'metricId' => '<string>',
'groupBy' => '<string>',
'startDate' => '<string>',
'endDate' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/dashboard-v2"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"conditions\": {},\n \"widgets\": [\n {\n \"key\": \"<string>\",\n \"x\": 123,\n \"y\": 123,\n \"w\": 123,\n \"h\": 123,\n \"title\": \"<string>\",\n \"source\": {\n \"type\": \"advancedExplorer\",\n \"request\": {\n \"period\": {\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"forecastDays\": 1\n },\n \"queries\": [\n {\n \"type\": \"condition\",\n \"expression\": \"<string>\",\n \"name\": \"<string>\",\n \"colorIndex\": 123,\n \"alias\": \"<string>\",\n \"visible\": true\n }\n ],\n \"bookmarkedEvents\": [\n \"<string>\"\n ],\n \"eventsFilter\": {\n \"sources\": [\n \"custom\",\n \"api\"\n ],\n \"githubSourceRepos\": [],\n \"search\": \"\"\n },\n \"scopeId\": \"<string>\",\n \"limitOverride\": 500,\n \"displayOptions\": {\n \"hideEmptyRows\": true,\n \"topN\": 50,\n \"showTotal\": true,\n \"precision\": 3\n }\n }\n },\n \"description\": \"\"\n }\n ],\n \"description\": \"\",\n \"teamId\": \"<string>\",\n \"scopeId\": \"<string>\",\n \"metricId\": \"<string>\",\n \"groupBy\": \"<string>\",\n \"startDate\": \"<string>\",\n \"endDate\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/dashboard-v2")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"conditions\": {},\n \"widgets\": [\n {\n \"key\": \"<string>\",\n \"x\": 123,\n \"y\": 123,\n \"w\": 123,\n \"h\": 123,\n \"title\": \"<string>\",\n \"source\": {\n \"type\": \"advancedExplorer\",\n \"request\": {\n \"period\": {\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"forecastDays\": 1\n },\n \"queries\": [\n {\n \"type\": \"condition\",\n \"expression\": \"<string>\",\n \"name\": \"<string>\",\n \"colorIndex\": 123,\n \"alias\": \"<string>\",\n \"visible\": true\n }\n ],\n \"bookmarkedEvents\": [\n \"<string>\"\n ],\n \"eventsFilter\": {\n \"sources\": [\n \"custom\",\n \"api\"\n ],\n \"githubSourceRepos\": [],\n \"search\": \"\"\n },\n \"scopeId\": \"<string>\",\n \"limitOverride\": 500,\n \"displayOptions\": {\n \"hideEmptyRows\": true,\n \"topN\": 50,\n \"showTotal\": true,\n \"precision\": 3\n }\n }\n },\n \"description\": \"\"\n }\n ],\n \"description\": \"\",\n \"teamId\": \"<string>\",\n \"scopeId\": \"<string>\",\n \"metricId\": \"<string>\",\n \"groupBy\": \"<string>\",\n \"startDate\": \"<string>\",\n \"endDate\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/dashboard-v2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"conditions\": {},\n \"widgets\": [\n {\n \"key\": \"<string>\",\n \"x\": 123,\n \"y\": 123,\n \"w\": 123,\n \"h\": 123,\n \"title\": \"<string>\",\n \"source\": {\n \"type\": \"advancedExplorer\",\n \"request\": {\n \"period\": {\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"forecastDays\": 1\n },\n \"queries\": [\n {\n \"type\": \"condition\",\n \"expression\": \"<string>\",\n \"name\": \"<string>\",\n \"colorIndex\": 123,\n \"alias\": \"<string>\",\n \"visible\": true\n }\n ],\n \"bookmarkedEvents\": [\n \"<string>\"\n ],\n \"eventsFilter\": {\n \"sources\": [\n \"custom\",\n \"api\"\n ],\n \"githubSourceRepos\": [],\n \"search\": \"\"\n },\n \"scopeId\": \"<string>\",\n \"limitOverride\": 500,\n \"displayOptions\": {\n \"hideEmptyRows\": true,\n \"topN\": 50,\n \"showTotal\": true,\n \"precision\": 3\n }\n }\n },\n \"description\": \"\"\n }\n ],\n \"description\": \"\",\n \"teamId\": \"<string>\",\n \"scopeId\": \"<string>\",\n \"metricId\": \"<string>\",\n \"groupBy\": \"<string>\",\n \"startDate\": \"<string>\",\n \"endDate\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"dashboardId": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Dashboards
Create a dashboard
Creates a DashboardV2 from a bulk-save payload (metadata + widgets with explicit grid positions). Team/scope assignment is validated against membership.
POST
/
dashboard-v2
Create a dashboard
curl --request POST \
--url https://api.example.com/dashboard-v2 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"conditions": {},
"widgets": [
{
"key": "<string>",
"x": 123,
"y": 123,
"w": 123,
"h": 123,
"title": "<string>",
"source": {
"type": "advancedExplorer",
"request": {
"period": {
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"forecastDays": 1
},
"queries": [
{
"type": "condition",
"expression": "<string>",
"name": "<string>",
"colorIndex": 123,
"alias": "<string>",
"visible": true
}
],
"bookmarkedEvents": [
"<string>"
],
"eventsFilter": {
"sources": [
"custom",
"api"
],
"githubSourceRepos": [],
"search": ""
},
"scopeId": "<string>",
"limitOverride": 500,
"displayOptions": {
"hideEmptyRows": true,
"topN": 50,
"showTotal": true,
"precision": 3
}
}
},
"description": ""
}
],
"description": "",
"teamId": "<string>",
"scopeId": "<string>",
"metricId": "<string>",
"groupBy": "<string>",
"startDate": "<string>",
"endDate": "<string>"
}
'import requests
url = "https://api.example.com/dashboard-v2"
payload = {
"name": "<string>",
"conditions": {},
"widgets": [
{
"key": "<string>",
"x": 123,
"y": 123,
"w": 123,
"h": 123,
"title": "<string>",
"source": {
"type": "advancedExplorer",
"request": {
"period": {
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"forecastDays": 1
},
"queries": [
{
"type": "condition",
"expression": "<string>",
"name": "<string>",
"colorIndex": 123,
"alias": "<string>",
"visible": True
}
],
"bookmarkedEvents": ["<string>"],
"eventsFilter": {
"sources": ["custom", "api"],
"githubSourceRepos": [],
"search": ""
},
"scopeId": "<string>",
"limitOverride": 500,
"displayOptions": {
"hideEmptyRows": True,
"topN": 50,
"showTotal": True,
"precision": 3
}
}
},
"description": ""
}
],
"description": "",
"teamId": "<string>",
"scopeId": "<string>",
"metricId": "<string>",
"groupBy": "<string>",
"startDate": "<string>",
"endDate": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
conditions: {},
widgets: [
{
key: '<string>',
x: 123,
y: 123,
w: 123,
h: 123,
title: '<string>',
source: {
type: 'advancedExplorer',
request: {
period: {
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
forecastDays: 1
},
queries: [
{
type: 'condition',
expression: '<string>',
name: '<string>',
colorIndex: 123,
alias: '<string>',
visible: true
}
],
bookmarkedEvents: ['<string>'],
eventsFilter: {sources: ['custom', 'api'], githubSourceRepos: [], search: ''},
scopeId: '<string>',
limitOverride: 500,
displayOptions: {hideEmptyRows: true, topN: 50, showTotal: true, precision: 3}
}
},
description: ''
}
],
description: '',
teamId: '<string>',
scopeId: '<string>',
metricId: '<string>',
groupBy: '<string>',
startDate: '<string>',
endDate: '<string>'
})
};
fetch('https://api.example.com/dashboard-v2', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/dashboard-v2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'conditions' => [
],
'widgets' => [
[
'key' => '<string>',
'x' => 123,
'y' => 123,
'w' => 123,
'h' => 123,
'title' => '<string>',
'source' => [
'type' => 'advancedExplorer',
'request' => [
'period' => [
'startDate' => '2023-11-07T05:31:56Z',
'endDate' => '2023-11-07T05:31:56Z',
'forecastDays' => 1
],
'queries' => [
[
'type' => 'condition',
'expression' => '<string>',
'name' => '<string>',
'colorIndex' => 123,
'alias' => '<string>',
'visible' => true
]
],
'bookmarkedEvents' => [
'<string>'
],
'eventsFilter' => [
'sources' => [
'custom',
'api'
],
'githubSourceRepos' => [
],
'search' => ''
],
'scopeId' => '<string>',
'limitOverride' => 500,
'displayOptions' => [
'hideEmptyRows' => true,
'topN' => 50,
'showTotal' => true,
'precision' => 3
]
]
],
'description' => ''
]
],
'description' => '',
'teamId' => '<string>',
'scopeId' => '<string>',
'metricId' => '<string>',
'groupBy' => '<string>',
'startDate' => '<string>',
'endDate' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/dashboard-v2"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"conditions\": {},\n \"widgets\": [\n {\n \"key\": \"<string>\",\n \"x\": 123,\n \"y\": 123,\n \"w\": 123,\n \"h\": 123,\n \"title\": \"<string>\",\n \"source\": {\n \"type\": \"advancedExplorer\",\n \"request\": {\n \"period\": {\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"forecastDays\": 1\n },\n \"queries\": [\n {\n \"type\": \"condition\",\n \"expression\": \"<string>\",\n \"name\": \"<string>\",\n \"colorIndex\": 123,\n \"alias\": \"<string>\",\n \"visible\": true\n }\n ],\n \"bookmarkedEvents\": [\n \"<string>\"\n ],\n \"eventsFilter\": {\n \"sources\": [\n \"custom\",\n \"api\"\n ],\n \"githubSourceRepos\": [],\n \"search\": \"\"\n },\n \"scopeId\": \"<string>\",\n \"limitOverride\": 500,\n \"displayOptions\": {\n \"hideEmptyRows\": true,\n \"topN\": 50,\n \"showTotal\": true,\n \"precision\": 3\n }\n }\n },\n \"description\": \"\"\n }\n ],\n \"description\": \"\",\n \"teamId\": \"<string>\",\n \"scopeId\": \"<string>\",\n \"metricId\": \"<string>\",\n \"groupBy\": \"<string>\",\n \"startDate\": \"<string>\",\n \"endDate\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/dashboard-v2")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"conditions\": {},\n \"widgets\": [\n {\n \"key\": \"<string>\",\n \"x\": 123,\n \"y\": 123,\n \"w\": 123,\n \"h\": 123,\n \"title\": \"<string>\",\n \"source\": {\n \"type\": \"advancedExplorer\",\n \"request\": {\n \"period\": {\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"forecastDays\": 1\n },\n \"queries\": [\n {\n \"type\": \"condition\",\n \"expression\": \"<string>\",\n \"name\": \"<string>\",\n \"colorIndex\": 123,\n \"alias\": \"<string>\",\n \"visible\": true\n }\n ],\n \"bookmarkedEvents\": [\n \"<string>\"\n ],\n \"eventsFilter\": {\n \"sources\": [\n \"custom\",\n \"api\"\n ],\n \"githubSourceRepos\": [],\n \"search\": \"\"\n },\n \"scopeId\": \"<string>\",\n \"limitOverride\": 500,\n \"displayOptions\": {\n \"hideEmptyRows\": true,\n \"topN\": 50,\n \"showTotal\": true,\n \"precision\": 3\n }\n }\n },\n \"description\": \"\"\n }\n ],\n \"description\": \"\",\n \"teamId\": \"<string>\",\n \"scopeId\": \"<string>\",\n \"metricId\": \"<string>\",\n \"groupBy\": \"<string>\",\n \"startDate\": \"<string>\",\n \"endDate\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/dashboard-v2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"conditions\": {},\n \"widgets\": [\n {\n \"key\": \"<string>\",\n \"x\": 123,\n \"y\": 123,\n \"w\": 123,\n \"h\": 123,\n \"title\": \"<string>\",\n \"source\": {\n \"type\": \"advancedExplorer\",\n \"request\": {\n \"period\": {\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"forecastDays\": 1\n },\n \"queries\": [\n {\n \"type\": \"condition\",\n \"expression\": \"<string>\",\n \"name\": \"<string>\",\n \"colorIndex\": 123,\n \"alias\": \"<string>\",\n \"visible\": true\n }\n ],\n \"bookmarkedEvents\": [\n \"<string>\"\n ],\n \"eventsFilter\": {\n \"sources\": [\n \"custom\",\n \"api\"\n ],\n \"githubSourceRepos\": [],\n \"search\": \"\"\n },\n \"scopeId\": \"<string>\",\n \"limitOverride\": 500,\n \"displayOptions\": {\n \"hideEmptyRows\": true,\n \"topN\": 50,\n \"showTotal\": true,\n \"precision\": 3\n }\n }\n },\n \"description\": \"\"\n }\n ],\n \"description\": \"\",\n \"teamId\": \"<string>\",\n \"scopeId\": \"<string>\",\n \"metricId\": \"<string>\",\n \"groupBy\": \"<string>\",\n \"startDate\": \"<string>\",\n \"endDate\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"dashboardId": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Send Authorization: Bearer <credential> using either a Clerk session JWT or a Clerk API key (ak_*). API keys may identify a user (user_*) or organization (org_*) principal and are generated in the Clerk Dashboard under API keys.
Body
application/json
Available options:
PRIVATE, PUBLIC, TEMPLATE Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
TRAILING_90_DAYS, TRAILING_30_DAYS, TRAILING_45_DAYS, TRAILING_7_DAYS, TRAILING_3_DAYS, TRAILING_1_DAYS, TRAILING_14_WEEKS, MTD, QTD, YTD, CURRENT_MONTH, CURRENT_QUARTER, CURRENT_YEAR, LAST_WEEK, LAST_MONTH, LAST_6_MONTHS, LAST_12_MONTHS, LAST_4_YEARS, LAST_3_MONTHS, LAST_INVOICE_MONTH, null Available options:
USD, EUR, GBP, CNY, KRW, null Response
Dashboard created
Last modified on October 12, 2026
Was this page helpful?
