SynapSynapDocs
Hub REST API

Widgets

The Widgets operations of the Hub REST API (2 operations).

For BuildersOpen-source podSynap CloudGenerated from Synap-core/backend@c31e261ab (main)

List widget definitions

GET
/widget-definitions

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Query Parameters

workspaceId?string

Response Body

Widget definitions

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://pod.example.com/api/hub/widget-definitions'
Example Response
[  {    "id": "string",    "workspaceId": "string",    "kind": "string",    "name": "string",    "category": "string",    "config": {      "property1": null,      "property2": null    },    "schema": {      "property1": null,      "property2": null    },    "createdAt": "string",    "property1": null,    "property2": null  }]
POST
/widget-definitions

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Pod API key (Bearer) issued via /api/hub/setup/agent or pod admin tooling. Browser/web clients may use the X-Session-Token header instead. See GET /api/hub/auth/status to introspect the calling key.

Request Body

application/json
  1. body
userId?string
workspaceId?string|null
kind*string
name?string
category?string
config?
schema?
sourceMessageId?string
[key: string]?unknown

Response Body

Upserted widget definition

application/json
  1. response
id*string
workspaceId?string|null
kind*string
name?string
category?string
config?
schema?
createdAt?string|
[key: string]?unknown
Example Request
curl -X POST 'https://pod.example.com/api/hub/widget-definitions' \  -H 'Content-Type: application/json' \  -d '{  "kind": "string",  "property1": null,  "property2": null}'
Example Response
{  "id": "string",  "workspaceId": "string",  "kind": "string",  "name": "string",  "category": "string",  "config": {    "property1": null,    "property2": null  },  "schema": {    "property1": null,    "property2": null  },  "createdAt": "string",  "property1": null,  "property2": null}