> For clean Markdown of any page, append `.md` to the page URL. > For a complete documentation index, see https://docs.sarvam.ai/llms.txt. > For full documentation content in one file, see https://docs.sarvam.ai/llms-full.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server. # Duplicate board POST https://apps.sarvam.ai/api/analytics/v1/{org_id}/{workspace_id}/boards/{board_id}/duplicate Content-Type: application/json Deep-copies the board and returns the copy in full, in the same shape as a board read. Reference: https://docs.sarvam.ai/api-reference/boards/duplicate ## Request ### Path parameters - `org_id` (string, required) — Organization ID - `workspace_id` (string, required) — Workspace ID - `board_id` (string, required) ### Headers - `X-API-Key` (string, required) — Your workspace API key. ### Body (application/json) This endpoint expects a DuplicateBoardRequest. - `name` (string, optional, nullable) — Name for the copy. Defaults to ` (copy)`. - `tag` (string, optional, nullable) — Tag for the copy. Omit to inherit the source board's tag; send null to leave the copy untagged. ## Response ### 201 Successful Response - `id` (string, required) — Board identifier, used as `{board_id}` in every nested route - `name` (string, required) — Board display name - `created_by` (Actor, required) — Actor that created the board - `created_at` (datetime, required) — Creation time, UTC, RFC 3339 - `updated_by` (Actor, required) — Actor that last changed the board or anything on it - `updated_at` (datetime, required) — Last change time, UTC, RFC 3339 - `tabs` (list of TabDetail, required) — The board's tabs in position order, each with its widgets nested - `filters` (list of Filter, required) — Every filter token declared by this board's widgets, in display order - `tag` (string, optional, nullable) — The board's grouping tag, or null when untagged ## Errors ### 400 Bad Request Error Request failed validation - `error` (ErrorBody, required) — Details of the error that occurred. ### 401 Unauthorized Error Missing or invalid credentials - `error` (ErrorBody, required) — Details of the error that occurred. ### 403 Forbidden Error Credentials are not scoped to this org and workspace - `error` (ErrorBody, required) — Details of the error that occurred. ### 404 Not Found Error No such resource in this workspace - `error` (ErrorBody, required) — Details of the error that occurred. ### 422 Unprocessable Entity Error Validation Error - `detail` (list of ValidationError, optional) ### 429 Too Many Requests Error Rate limit exceeded. Honour the `Retry-After` response header before retrying. - `error` (ErrorBody, required) — Details of the error that occurred. ### 500 Internal Server Error Unexpected server error - `error` (ErrorBody, required) — Details of the error that occurred. ## Types ### Actor - `type` (enum, required) — Whether a user or an API key performed the action. - Allowed values: `user`, `api_key` - `id` (string, required) — User identifier for `user`; the key prefix for `api_key`. ### TabDetail A tab as it appears inside a board read, with its widgets. - `id` (string, required) — Tab identifier - `name` (string, required) — Tab display name - `position` (integer, required) — Zero-based left-to-right position on the board - `widgets` (list of Widget, required) — The tab's widgets, in creation order ### Filter - `id` (string, required) — Filter identifier - `internal_name` (string, required) — Token name as it appears in widget SQL, without the braces - `display_label` (string, required) — Human-facing label - `filter_type` (string, required) — Declared value type: `number`, `string`, `date` or `dropdown` - `is_required` (boolean, required) — True when a run must supply a value: at least one widget uses the token outside an optional `[[...]]` clause and it has no default. Omitting a required filter makes the run fail with `UNRESOLVED_TOKEN`. - `default_value` (string, optional, nullable) — Value used when a run supplies none. Null means the caller must supply one. - `dropdown_options` (list of DropdownOption, optional, nullable) — Allowed values, present only when `filter_type` is `dropdown` ### ErrorBody Details of the error that occurred. - `code` (string, required) — A service-specific error code. - `message` (string, required) — A human-readable description of the error. ### ValidationError - `loc` (list of ValidationErrorLocItems, required) - `msg` (string, required) - `type` (string, required) ### Widget - `id` (string, required) — Widget identifier - `board_id` (string, required) — Board this widget belongs to - `name` (string, required) — Widget display name - `sql` (string, required) — The widget's stored SQL, filter tokens unexpanded - `viz_type` (string, required) — How the result is rendered - `viz_config` (VizConfig, required) — Renderer options for `viz_type` - `created_by` (Actor, required) — Actor that created the widget - `created_at` (datetime, required) — Creation time, UTC, RFC 3339 - `updated_by` (Actor, required) — Actor that last changed the widget - `updated_at` (datetime, required) — Last change time, UTC, RFC 3339 ### DropdownOption - `label` (string, required) - `value` (string, required) ### ValidationErrorLocItems ### VizConfig Widget visualization options. Every field is optional so partial updates work, and unrecognised top-level keys are rejected. - `layout` (Layout, optional, nullable) — Position + size of a widget on the dashboard grid. - `x_axis` (string, optional, nullable) - `y_axis` (list of string, optional, nullable) - `series_breakout` (string, optional, nullable) ### Layout Position + size of a widget on the dashboard grid. - `x` (double, required) - `y` (double, required) - `w` (double, required) - `h` (double, required) ## Examples **Request** ```json { "name": "Campaign Overview (Q4)", "tag": "Quarterly reporting" } ``` **Response** ```json { "id": "0b7f2c9a-5e41-4d2a-9f3b-8c1d6e7a0b52", "name": "Campaign Overview", "created_by": { "type": "api_key", "id": "sk_live_a1b2c3" }, "created_at": "2026-09-01T09:15:00Z", "updated_by": { "type": "user", "id": "usr_8f21c4d0" }, "updated_at": "2026-09-12T11:42:08Z", "tabs": [ { "id": "6d1e84b3-9c07-4f52-b8ad-2e5f70c94a18", "name": "Connectivity", "position": 0, "widgets": [ { "id": "a4c9e0f7-31b8-4d6a-9e25-7f0b3c81d46e", "board_id": "0b7f2c9a-5e41-4d2a-9f3b-8c1d6e7a0b52", "name": "Daily connected calls", "sql": "SELECT\n toDate(effective_datetime) AS day,\n countIf(v2v_connectivity_status = 'connected') AS connected,\n count() AS total\nFROM EngagementFactsBoardsView\nWHERE effective_datetime >= {{start_date}}\n [[AND app_id = {{agent_id}}]]\nGROUP BY day\nORDER BY day", "viz_type": "line", "viz_config": { "x_axis": "day", "y_axis": [ "connected", "total" ] }, "created_by": { "type": "api_key", "id": "sk_live_a1b2c3" }, "created_at": "2026-09-01T09:22:31Z", "updated_by": { "type": "api_key", "id": "sk_live_a1b2c3" }, "updated_at": "2026-09-10T14:03:55Z" } ] } ], "filters": [ { "id": "f2a70c48-5b93-4e16-8d7a-0c4e19b6f235", "internal_name": "start_date", "display_label": "Start date", "filter_type": "date", "is_required": true, "default_value": "2026-09-01", "dropdown_options": null } ], "tag": "Weekly reporting" } ``` **SDK Code** ```python import requests url = "https://apps.sarvam.ai/api/analytics/v1/org_id/workspace_id/boards/board_id/duplicate" payload = { "name": "Campaign Overview (Q4)", "tag": "Quarterly reporting" } headers = { "X-API-Key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://apps.sarvam.ai/api/analytics/v1/org_id/workspace_id/boards/board_id/duplicate'; const options = { method: 'POST', headers: {'X-API-Key': '', 'Content-Type': 'application/json'}, body: '{"name":"Campaign Overview (Q4)","tag":"Quarterly reporting"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://apps.sarvam.ai/api/analytics/v1/org_id/workspace_id/boards/board_id/duplicate" payload := strings.NewReader("{\n \"name\": \"Campaign Overview (Q4)\",\n \"tag\": \"Quarterly reporting\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("X-API-Key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://apps.sarvam.ai/api/analytics/v1/org_id/workspace_id/boards/board_id/duplicate") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["X-API-Key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"name\": \"Campaign Overview (Q4)\",\n \"tag\": \"Quarterly reporting\"\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://apps.sarvam.ai/api/analytics/v1/org_id/workspace_id/boards/board_id/duplicate") .header("X-API-Key", "") .header("Content-Type", "application/json") .body("{\n \"name\": \"Campaign Overview (Q4)\",\n \"tag\": \"Quarterly reporting\"\n}") .asString(); ``` ```php request('POST', 'https://apps.sarvam.ai/api/analytics/v1/org_id/workspace_id/boards/board_id/duplicate', [ 'body' => '{ "name": "Campaign Overview (Q4)", "tag": "Quarterly reporting" }', 'headers' => [ 'Content-Type' => 'application/json', 'X-API-Key' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://apps.sarvam.ai/api/analytics/v1/org_id/workspace_id/boards/board_id/duplicate"); var request = new RestRequest(Method.POST); request.AddHeader("X-API-Key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"name\": \"Campaign Overview (Q4)\",\n \"tag\": \"Quarterly reporting\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "X-API-Key": "", "Content-Type": "application/json" ] let parameters = [ "name": "Campaign Overview (Q4)", "tag": "Quarterly reporting" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://apps.sarvam.ai/api/analytics/v1/org_id/workspace_id/boards/board_id/duplicate")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```