import { Configuration, CanvasesApi } from '@widgetic/api-sdk-ts';
const config = new Configuration({
apiKey: 'YOUR_API_KEY'
});
const canvasesApi = new CanvasesApi(config);
try {
const { data: list } = await canvasesApi.getAllCanvases({
page: 1,
size: 20
});
console.log(`Found ${list.total} canvases`);
} catch (error) {
console.error('Failed to fetch canvases:', error);
}
curl --request GET \
--url https://api.widgetic.com/v1/canvases \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.widgetic.com/v1/canvases"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.widgetic.com/v1/canvases', 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.widgetic.com/v1/canvases",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.widgetic.com/v1/canvases"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.widgetic.com/v1/canvases")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.widgetic.com/v1/canvases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"persistenceKey": "canvas_xyz123",
"canvasContent": {
"version": 1,
"elements": [],
"settings": {}
},
"creatorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"primaryWidgetId": "123e4567-e89b-12d3-a456-426614174099",
"managedUserId": "123e4567-e89b-12d3-a456-426614174077",
"createdAt": "2023-01-01T00:00:00Z",
"updatedAt": "2023-01-02T00:00:00Z"
}
],
"page": 1,
"size": 20,
"total": 50
},
"meta": {
"page": 1,
"size": 20,
"total": 135,
"limit": 20,
"offset": 0,
"hasNextPage": true,
"hasPreviousPage": false,
"nextCursor": "<string>",
"warnings": [
"<string>"
]
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}Get All Canvases
Retrieves all canvases with pagination support and filtering options.
Pass managedUserId (Widgetic’s id for one of your managed users) or managedUserExternalId (your own
identifier for the user) to list only the canvases made for that managed user. The canvases of your other
managed users, and your own, are left out. A managed user that is not yours, or does not exist, is answered
with 404 and MANAGED_USER_NOT_FOUND. Called with an editor session, the list is always the session’s
managed user’s.
import { Configuration, CanvasesApi } from '@widgetic/api-sdk-ts';
const config = new Configuration({
apiKey: 'YOUR_API_KEY'
});
const canvasesApi = new CanvasesApi(config);
try {
const { data: list } = await canvasesApi.getAllCanvases({
page: 1,
size: 20
});
console.log(`Found ${list.total} canvases`);
} catch (error) {
console.error('Failed to fetch canvases:', error);
}
curl --request GET \
--url https://api.widgetic.com/v1/canvases \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.widgetic.com/v1/canvases"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.widgetic.com/v1/canvases', 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.widgetic.com/v1/canvases",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.widgetic.com/v1/canvases"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.widgetic.com/v1/canvases")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.widgetic.com/v1/canvases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"persistenceKey": "canvas_xyz123",
"canvasContent": {
"version": 1,
"elements": [],
"settings": {}
},
"creatorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"primaryWidgetId": "123e4567-e89b-12d3-a456-426614174099",
"managedUserId": "123e4567-e89b-12d3-a456-426614174077",
"createdAt": "2023-01-01T00:00:00Z",
"updatedAt": "2023-01-02T00:00:00Z"
}
],
"page": 1,
"size": 20,
"total": 50
},
"meta": {
"page": 1,
"size": 20,
"total": 135,
"limit": 20,
"offset": 0,
"hasNextPage": true,
"hasPreviousPage": false,
"nextCursor": "<string>",
"warnings": [
"<string>"
]
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}{
"success": false,
"message": "<string>",
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Composition not found",
"timestamp": "2026-10-15T10:00:00.000Z",
"param": "name",
"docUrl": "<string>",
"suggestedAction": "<string>",
"retryAfter": 60,
"details": {},
"correlationId": "req_123e4567-e89b-12d3-a456-426614174000"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Page number for pagination
x >= 1Number of items per page
1 <= x <= 100Sort field and direction (e.g., "created_at:desc")
Filter canvases created after the specified date (ISO 8601 format)
Filter canvases created before the specified date (ISO 8601 format)
Filter canvases updated after the specified date (ISO 8601 format)
Filter canvases updated before the specified date (ISO 8601 format)
List only the canvases made for this managed user (Widgetic's id for the user). Send this or managedUserExternalId, not both.
List only the canvases made for the managed user you registered with this externalId (your own identifier for the user). Send this or managedUserId, not both.
255Response
List of canvases retrieved successfully