TypeScript SDK
import { Configuration, ManagedUsersApi } from '@widgetic/api-sdk-ts';
const config = new Configuration({
apiKey: 'YOUR_API_KEY'
});
const managedUsersApi = new ManagedUsersApi(config);
try {
const response = await managedUsersApi.getAllManagedUsers({
page: 1,
size: 10
});
console.log('Managed users:', response.data);
console.log('Total:', response.meta?.total);
console.log('Current page:', response.meta?.page);
} catch (error) {
if (error.response?.status === 401) {
console.error('Authentication required');
} else {
console.error('Failed to fetch managed users:', error);
}
}curl --request GET \
--url https://api.widgetic.com/v1/managed-users \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.widgetic.com/v1/managed-users"
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/managed-users', 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/managed-users",
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/managed-users"
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/managed-users")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.widgetic.com/v1/managed-users")
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": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"managerId": "123e4567-e89b-12d3-a456-426614174001",
"externalId": "external-user-123",
"metadata": {
"firstName": "John",
"lastName": "Doe",
"role": "editor"
},
"isActive": true,
"createdAt": "2023-01-01T00:00:00Z",
"updatedAt": "2023-01-02T00:00:00Z"
}
],
"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"
}
}Managed Users
Get Managed Users
Retrieve the managed users you manage, with pagination support. (Admins see every partner’s managed users.)
GET
/
managed-users
TypeScript SDK
import { Configuration, ManagedUsersApi } from '@widgetic/api-sdk-ts';
const config = new Configuration({
apiKey: 'YOUR_API_KEY'
});
const managedUsersApi = new ManagedUsersApi(config);
try {
const response = await managedUsersApi.getAllManagedUsers({
page: 1,
size: 10
});
console.log('Managed users:', response.data);
console.log('Total:', response.meta?.total);
console.log('Current page:', response.meta?.page);
} catch (error) {
if (error.response?.status === 401) {
console.error('Authentication required');
} else {
console.error('Failed to fetch managed users:', error);
}
}curl --request GET \
--url https://api.widgetic.com/v1/managed-users \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.widgetic.com/v1/managed-users"
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/managed-users', 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/managed-users",
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/managed-users"
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/managed-users")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.widgetic.com/v1/managed-users")
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": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"managerId": "123e4567-e89b-12d3-a456-426614174001",
"externalId": "external-user-123",
"metadata": {
"firstName": "John",
"lastName": "Doe",
"role": "editor"
},
"isActive": true,
"createdAt": "2023-01-01T00:00:00Z",
"updatedAt": "2023-01-02T00:00:00Z"
}
],
"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"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Page number for pagination
Required range:
x >= 1Number of items per page
Required range:
1 <= x <= 100Sort field and direction, <field>:<asc|desc>. The field is createdAt, updatedAt or externalId (the snake_case spellings created_at, updated_at and external_id work too); asc or desc alone sorts by createdAt. Any other field is a 400.