Create widget
Validates the SQL, registers the filter tokens it declares, and places the widget on tab_id or the board’s first tab.
Path parameters
org_id
Organization ID
workspace_id
Workspace ID
board_id
Headers
X-API-Key
Your workspace API key.
Request
This endpoint expects an object.
name
Widget display name
sql
Read-only SELECT against the workspace’s analytics views. Filter tokens use {{name}} for a required value and [[AND col = {{name}}]] for a clause that is dropped when the value is absent. Tenant scoping is enforced server-side.
viz_type
How the result is rendered
viz_config
Renderer options for viz_type
filters
Declarations for the filter tokens used in sql
tab_id
Target tab. Defaults to the board's first tab when absent.
Response
Successful Response
id
Widget identifier
board_id
Board this widget belongs to
name
Widget display name
sql
The widget's stored SQL, filter tokens unexpanded
viz_type
How the result is rendered
viz_config
Renderer options for viz_type
created_by
Actor that created the widget
created_at
Creation time, UTC, RFC 3339
updated_by
Actor that last changed the widget
updated_at
Last change time, UTC, RFC 3339
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error