curl --request POST \
--url https://api.upsolve.ai/v2/api/projects/{projectId}/workspaces/{workspaceId}/canvases/{canvasId}/items \
--header 'Content-Type: application/json' \
--header 'authorization: <api-key>' \
--data '
{
"favorite_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"apiKey": "<string>",
"organizationId": "<string>",
"connectionId": "<string>",
"x": 0,
"y": 0,
"w": 1,
"h": 1,
"tabId": "<string>"
}
'import requests
url = "https://api.upsolve.ai/v2/api/projects/{projectId}/workspaces/{workspaceId}/canvases/{canvasId}/items"
payload = {
"favorite_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"apiKey": "<string>",
"organizationId": "<string>",
"connectionId": "<string>",
"x": 0,
"y": 0,
"w": 1,
"h": 1,
"tabId": "<string>"
}
headers = {
"authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
favorite_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
apiKey: '<string>',
organizationId: '<string>',
connectionId: '<string>',
x: 0,
y: 0,
w: 1,
h: 1,
tabId: '<string>'
})
};
fetch('https://api.upsolve.ai/v2/api/projects/{projectId}/workspaces/{workspaceId}/canvases/{canvasId}/items', 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.upsolve.ai/v2/api/projects/{projectId}/workspaces/{workspaceId}/canvases/{canvasId}/items",
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([
'favorite_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'apiKey' => '<string>',
'organizationId' => '<string>',
'connectionId' => '<string>',
'x' => 0,
'y' => 0,
'w' => 1,
'h' => 1,
'tabId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <api-key>"
],
]);
$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.upsolve.ai/v2/api/projects/{projectId}/workspaces/{workspaceId}/canvases/{canvasId}/items"
payload := strings.NewReader("{\n \"favorite_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"apiKey\": \"<string>\",\n \"organizationId\": \"<string>\",\n \"connectionId\": \"<string>\",\n \"x\": 0,\n \"y\": 0,\n \"w\": 1,\n \"h\": 1,\n \"tabId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<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(string(body))
}HttpResponse<String> response = Unirest.post("https://api.upsolve.ai/v2/api/projects/{projectId}/workspaces/{workspaceId}/canvases/{canvasId}/items")
.header("authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"favorite_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"apiKey\": \"<string>\",\n \"organizationId\": \"<string>\",\n \"connectionId\": \"<string>\",\n \"x\": 0,\n \"y\": 0,\n \"w\": 1,\n \"h\": 1,\n \"tabId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upsolve.ai/v2/api/projects/{projectId}/workspaces/{workspaceId}/canvases/{canvasId}/items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"favorite_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"apiKey\": \"<string>\",\n \"organizationId\": \"<string>\",\n \"connectionId\": \"<string>\",\n \"x\": 0,\n \"y\": 0,\n \"w\": 1,\n \"h\": 1,\n \"tabId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"item": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"canvas_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"favorite_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"x": 0,
"y": 0,
"w": 0,
"h": 0,
"created_at": "<unknown>",
"favorite": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by_project_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "sql",
"name": "<string>",
"thread_id": "<string>",
"chart_config": {},
"chart": {
"v": 3
},
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"thumbnail_url": "<string>",
"sql": "<string>",
"snapshot_data": [
{}
],
"is_archived": true,
"created_at": "<unknown>",
"updated_at": "<unknown>",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"copied_from_favorite_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tool_call": {
"connectorKind": "mcp",
"toolName": "<string>"
},
"row_transform": "<string>",
"row_columns": [
{
"name": "<string>",
"type": "<string>"
}
]
}
}
}
}{
"status": "error",
"error": {
"message": "<string>",
"code": "<string>",
"details": {}
}
}Add Canvas Item
Add a chart to a canvas from a saved favorite. It is placed in the next free slot unless a place is given.
curl --request POST \
--url https://api.upsolve.ai/v2/api/projects/{projectId}/workspaces/{workspaceId}/canvases/{canvasId}/items \
--header 'Content-Type: application/json' \
--header 'authorization: <api-key>' \
--data '
{
"favorite_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"apiKey": "<string>",
"organizationId": "<string>",
"connectionId": "<string>",
"x": 0,
"y": 0,
"w": 1,
"h": 1,
"tabId": "<string>"
}
'import requests
url = "https://api.upsolve.ai/v2/api/projects/{projectId}/workspaces/{workspaceId}/canvases/{canvasId}/items"
payload = {
"favorite_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"apiKey": "<string>",
"organizationId": "<string>",
"connectionId": "<string>",
"x": 0,
"y": 0,
"w": 1,
"h": 1,
"tabId": "<string>"
}
headers = {
"authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
favorite_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
apiKey: '<string>',
organizationId: '<string>',
connectionId: '<string>',
x: 0,
y: 0,
w: 1,
h: 1,
tabId: '<string>'
})
};
fetch('https://api.upsolve.ai/v2/api/projects/{projectId}/workspaces/{workspaceId}/canvases/{canvasId}/items', 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.upsolve.ai/v2/api/projects/{projectId}/workspaces/{workspaceId}/canvases/{canvasId}/items",
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([
'favorite_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'apiKey' => '<string>',
'organizationId' => '<string>',
'connectionId' => '<string>',
'x' => 0,
'y' => 0,
'w' => 1,
'h' => 1,
'tabId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <api-key>"
],
]);
$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.upsolve.ai/v2/api/projects/{projectId}/workspaces/{workspaceId}/canvases/{canvasId}/items"
payload := strings.NewReader("{\n \"favorite_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"apiKey\": \"<string>\",\n \"organizationId\": \"<string>\",\n \"connectionId\": \"<string>\",\n \"x\": 0,\n \"y\": 0,\n \"w\": 1,\n \"h\": 1,\n \"tabId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<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(string(body))
}HttpResponse<String> response = Unirest.post("https://api.upsolve.ai/v2/api/projects/{projectId}/workspaces/{workspaceId}/canvases/{canvasId}/items")
.header("authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"favorite_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"apiKey\": \"<string>\",\n \"organizationId\": \"<string>\",\n \"connectionId\": \"<string>\",\n \"x\": 0,\n \"y\": 0,\n \"w\": 1,\n \"h\": 1,\n \"tabId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upsolve.ai/v2/api/projects/{projectId}/workspaces/{workspaceId}/canvases/{canvasId}/items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"favorite_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"apiKey\": \"<string>\",\n \"organizationId\": \"<string>\",\n \"connectionId\": \"<string>\",\n \"x\": 0,\n \"y\": 0,\n \"w\": 1,\n \"h\": 1,\n \"tabId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"item": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"canvas_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"favorite_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"x": 0,
"y": 0,
"w": 0,
"h": 0,
"created_at": "<unknown>",
"favorite": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by_project_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "sql",
"name": "<string>",
"thread_id": "<string>",
"chart_config": {},
"chart": {
"v": 3
},
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"thumbnail_url": "<string>",
"sql": "<string>",
"snapshot_data": [
{}
],
"is_archived": true,
"created_at": "<unknown>",
"updated_at": "<unknown>",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"copied_from_favorite_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tool_call": {
"connectorKind": "mcp",
"toolName": "<string>"
},
"row_transform": "<string>",
"row_columns": [
{
"name": "<string>",
"type": "<string>"
}
]
}
}
}
}{
"status": "error",
"error": {
"message": "<string>",
"code": "<string>",
"details": {}
}
}Authorizations
Path Parameters
The project in the URL. The caller's project user is read from it.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$POST /v2/api/projects/:projectId/workspaces/:workspaceId/canvases/:canvasId/items Parameter
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$POST /v2/api/projects/:projectId/workspaces/:workspaceId/canvases/:canvasId/items Parameter
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$Body
POST /v2/api/projects/:projectId/workspaces/:workspaceId/canvases/:canvasId/items Request body
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$Upsolve API key, generated under Account → Developer settings in the Upsolve Hub. Keys are user-scoped: pass organizationId alongside the key to select which org to act on.
1The ID of the organization. Required when using Supabase JWT authentication.
The ID of the connection a guest has access to
-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 90071992547409911 <= x <= 90071992547409911 <= x <= 9007199254740991The tab of the canvas's page the tile goes in: the id of its . Without it, or on a page without that tab, the tile goes in the page's first grid.
^[A-Za-z0-9_-]{1,64}$Was this page helpful?