Skip to main content
Widgets are individual components placed on dashboards. Each widget has a type, size, position, and optional configuration.

Widget Types

Supported widget types:
  • Bookmark - Quick links
  • Clock - Time display
  • Countdown - Countdown timer
  • Crypto - Cryptocurrency prices
  • Editor - Text editor
  • Frame - Embedded iframe
  • Github Heatmap - GitHub contribution heatmap
  • Github - GitHub statistics
  • Inbox - Email inbox
  • Kanban - Kanban board
  • Meetings - Calendar meetings
  • Todo - Todo list
  • Weather - Weather information

Create Widget

curl -X POST http://localhost:3000/api/widgets \
  -H "Content-Type: application/json" \
  -H "Cookie: session=your-session-token" \
  -d '{
    "dashboardId": "550e8400-e29b-41d4-a716-446655440000",
    "widgetType": "Todo",
    "height": 400,
    "width": 300,
    "positionX": 0,
    "positionY": 0,
    "config": {
      "title": "My Tasks"
    }
  }'

Request Body

dashboardId
string (uuid)
required
ID of the dashboard to add the widget to
widgetType
string
required
Type of widget (see Widget Types above)
height
number
required
Widget height in pixels
width
number
required
Widget width in pixels
positionX
number
required
Horizontal position on the dashboard
positionY
number
required
Vertical position on the dashboard
config
object
Widget-specific configuration (key-value pairs)

Response

id
string (uuid)
Unique widget identifier
userId
string
ID of the user who owns this widget
dashboardId
string (uuid)
ID of the parent dashboard
widgetType
string
Type of widget
height
number
Widget height in pixels
width
number
Widget width in pixels
positionX
number
Horizontal position
positionY
number
Vertical position
config
object
Widget configuration
createdAt
string (ISO 8601)
Creation timestamp
updatedAt
string (ISO 8601)
Last update timestamp
{
  "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
  "userId": "user123",
  "dashboardId": "550e8400-e29b-41d4-a716-446655440000",
  "widgetType": "Todo",
  "height": 400,
  "width": 300,
  "positionX": 0,
  "positionY": 0,
  "config": {
    "title": "My Tasks"
  },
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-15T10:30:00.000Z"
}

Get Widgets

Retrieve all widgets for the authenticated user, or widgets from a specific dashboard.
curl -X GET http://localhost:3000/api/widgets \
  -H "Cookie: session=your-session-token"

Query Parameters

dashboardId
string (uuid)
Dashboard ID to retrieve widgets from. If omitted, returns all user widgets.

Response

Returns an array of widget objects.
[
  {
    "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "userId": "user123",
    "dashboardId": "550e8400-e29b-41d4-a716-446655440000",
    "widgetType": "Todo",
    "height": 400,
    "width": 300,
    "positionX": 0,
    "positionY": 0,
    "config": {
      "title": "My Tasks"
    },
    "createdAt": "2024-01-15T10:30:00.000Z",
    "updatedAt": "2024-01-15T10:30:00.000Z"
  }
]

Update Widget

curl -X PUT http://localhost:3000/api/widgets \
  -H "Content-Type: application/json" \
  -H "Cookie: session=your-session-token" \
  -d '{
    "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "height": 500,
    "width": 350,
    "positionX": 100,
    "positionY": 50,
    "config": {
      "title": "Updated Tasks"
    }
  }'

Request Body

id
string (uuid)
required
Widget ID to update
height
number
New widget height in pixels
width
number
New widget width in pixels
positionX
number
New horizontal position
positionY
number
New vertical position
config
object
Updated widget configuration

Response

Returns the updated widget object.
{
  "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
  "userId": "user123",
  "dashboardId": "550e8400-e29b-41d4-a716-446655440000",
  "widgetType": "Todo",
  "height": 500,
  "width": 350,
  "positionX": 100,
  "positionY": 50,
  "config": {
    "title": "Updated Tasks"
  },
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-15T11:45:00.000Z"
}

Delete Widget

curl -X DELETE "http://localhost:3000/api/widgets?id=7c9e6679-7425-40de-944b-e07fc1f90ae7" \
  -H "Cookie: session=your-session-token"

Query Parameters

id
string (uuid)
required
Widget ID to delete

Response

Returns the deleted widget object.
{
  "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
  "userId": "user123",
  "dashboardId": "550e8400-e29b-41d4-a716-446655440000",
  "widgetType": "Todo",
  "height": 500,
  "width": 350,
  "positionX": 100,
  "positionY": 50,
  "config": {
    "title": "Updated Tasks"
  },
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-15T11:45:00.000Z"
}

Build docs developers (and LLMs) love