Duplicate a dashboard
curl --request POST \
--url https://app.formbricks.com/api/v3/dashboards/{dashboardId}/duplicate \
--header 'Content-Type: application/json' \
--cookie next-auth.session-token= \
--data '
{
"name": "<string>"
}
'import requests
url = "https://app.formbricks.com/api/v3/dashboards/{dashboardId}/duplicate"
payload = { "name": "<string>" }
headers = {
"cookie": "next-auth.session-token=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'next-auth.session-token=', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://app.formbricks.com/api/v3/dashboards/{dashboardId}/duplicate', 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://app.formbricks.com/api/v3/dashboards/{dashboardId}/duplicate",
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>'
]),
CURLOPT_COOKIE => "next-auth.session-token=",
CURLOPT_HTTPHEADER => [
"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://app.formbricks.com/api/v3/dashboards/{dashboardId}/duplicate"
payload := strings.NewReader("{\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "next-auth.session-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://app.formbricks.com/api/v3/dashboards/{dashboardId}/duplicate")
.header("cookie", "next-auth.session-token=")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.formbricks.com/api/v3/dashboards/{dashboardId}/duplicate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'next-auth.session-token='
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"workspaceId": "<string>",
"name": "<string>",
"creator": {
"name": "<string>"
},
"filters": [
{
"id": "<string>",
"field": "FeedbackRecords.sourceName",
"operator": "equals",
"label": "<string>",
"values": [
"Website"
]
}
],
"widgets": [
{
"id": "<string>",
"chartId": "<string>",
"layout": {
"x": 5,
"y": 500,
"w": 6,
"h": 4
},
"order": 1,
"chart": {
"id": "<string>",
"workspaceId": "<string>",
"datasetId": "<string>",
"name": "<string>",
"type": "area",
"query": {
"measures": [
"FeedbackRecords.npsScore"
],
"dimensions": [
"FeedbackRecords.sourceName"
],
"timeDimensions": [
{
"dimension": "FeedbackRecords.collectedAt",
"granularity": "hour",
"dateRange": "last 30 days"
}
],
"filters": [
{
"member": "FeedbackRecords.sourceType",
"operator": "equals",
"values": [
"<string>"
]
}
],
"order": [
[
"<string>",
"asc"
]
],
"limit": 2500,
"offset": 5000
},
"config": {
"barOrientation": "vertical",
"pieDisplay": "pie",
"areaDisplay": "filled",
"matrixCellValue": "percent",
"matrixColorScale": true,
"matrixShowTotals": true,
"matrixTranspose": true,
"colors": [
"<string>"
],
"xAxisLabel": "<string>",
"yAxisLabel": "<string>",
"showLegend": true,
"legendPosition": "top",
"stacked": true,
"showGrid": true,
"showValues": true,
"numberFormat": "<string>",
"dateFormat": "<string>",
"prefix": "<string>",
"suffix": "<string>"
},
"creator": {
"name": "<string>"
},
"dashboards": [
{
"id": "<string>",
"name": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}V3 Dashboards
Duplicate a dashboard
Copies a dashboard, in one transaction, with its layout. The copy shares the original’s
charts: its widgets point at the same charts, so editing one of them changes both dashboards. To
change a chart on the copy only, duplicate the chart and repoint the copy’s widget. Needs write
access to the dashboard’s workspace. A name already used in the workspace answers 409.
POST
/
api
/
v3
/
dashboards
/
{dashboardId}
/
duplicate
Duplicate a dashboard
curl --request POST \
--url https://app.formbricks.com/api/v3/dashboards/{dashboardId}/duplicate \
--header 'Content-Type: application/json' \
--cookie next-auth.session-token= \
--data '
{
"name": "<string>"
}
'import requests
url = "https://app.formbricks.com/api/v3/dashboards/{dashboardId}/duplicate"
payload = { "name": "<string>" }
headers = {
"cookie": "next-auth.session-token=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'next-auth.session-token=', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://app.formbricks.com/api/v3/dashboards/{dashboardId}/duplicate', 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://app.formbricks.com/api/v3/dashboards/{dashboardId}/duplicate",
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>'
]),
CURLOPT_COOKIE => "next-auth.session-token=",
CURLOPT_HTTPHEADER => [
"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://app.formbricks.com/api/v3/dashboards/{dashboardId}/duplicate"
payload := strings.NewReader("{\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "next-auth.session-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://app.formbricks.com/api/v3/dashboards/{dashboardId}/duplicate")
.header("cookie", "next-auth.session-token=")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.formbricks.com/api/v3/dashboards/{dashboardId}/duplicate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'next-auth.session-token='
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"workspaceId": "<string>",
"name": "<string>",
"creator": {
"name": "<string>"
},
"filters": [
{
"id": "<string>",
"field": "FeedbackRecords.sourceName",
"operator": "equals",
"label": "<string>",
"values": [
"Website"
]
}
],
"widgets": [
{
"id": "<string>",
"chartId": "<string>",
"layout": {
"x": 5,
"y": 500,
"w": 6,
"h": 4
},
"order": 1,
"chart": {
"id": "<string>",
"workspaceId": "<string>",
"datasetId": "<string>",
"name": "<string>",
"type": "area",
"query": {
"measures": [
"FeedbackRecords.npsScore"
],
"dimensions": [
"FeedbackRecords.sourceName"
],
"timeDimensions": [
{
"dimension": "FeedbackRecords.collectedAt",
"granularity": "hour",
"dateRange": "last 30 days"
}
],
"filters": [
{
"member": "FeedbackRecords.sourceType",
"operator": "equals",
"values": [
"<string>"
]
}
],
"order": [
[
"<string>",
"asc"
]
],
"limit": 2500,
"offset": 5000
},
"config": {
"barOrientation": "vertical",
"pieDisplay": "pie",
"areaDisplay": "filled",
"matrixCellValue": "percent",
"matrixColorScale": true,
"matrixShowTotals": true,
"matrixTranspose": true,
"colors": [
"<string>"
],
"xAxisLabel": "<string>",
"yAxisLabel": "<string>",
"showLegend": true,
"legendPosition": "top",
"stacked": true,
"showGrid": true,
"showValues": true,
"numberFormat": "<string>",
"dateFormat": "<string>",
"prefix": "<string>",
"suffix": "<string>"
},
"creator": {
"name": "<string>"
},
"dashboards": [
{
"id": "<string>",
"name": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"requestId": "<string>",
"type": "<string>",
"instance": "<string>",
"code": "ai_features_not_enabled",
"details": {},
"invalid_params": [
{
"name": "<string>",
"reason": "<string>",
"code": "dangling_reference",
"identifier": "<string>",
"referenceType": "block",
"missingId": "<string>",
"firstUsedAt": "<string>",
"conflictsWith": "<string>"
}
]
}Authorizations
sessionAuthapiKeyAuthbearerAuth
Body
application/json
Response
The copy
Was this page helpful?