List Widgets

Retrieve a paginated list of widgets (id, name, icon). When in mock mode, returns sample widget data.

GET https://developers.chatway.app/api/v1/widgets

Example request

curl -G "https://developers.chatway.app/api/v1/widgets" \
  -H "X-API-KEY: your_api_key" \
  --data-urlencode "limit=20" \
  --data-urlencode "page=1"

Parameters

NameInRequiredTypeDescription
limitqueryNointeger|null
pagequeryNointeger|null

Responses

200

application/json

422

Pagination

Paginated list responses include data, meta.pagination, and links. Use the page and limit query parameters to walk results. Follow links.next until it is null, or increment page until current_page >= total_pages.

FieldDescription
meta.pagination.totalTotal records across all pages
meta.pagination.countRecords returned on this page
meta.pagination.per_pagePage size used for this response (matches limit)
meta.pagination.current_pageCurrent page number (1-based)
meta.pagination.total_pagesTotal number of pages
links.nextURL for the next page, or null on the last page
links.first / links.lastFirst and last page URLs

Examples

Response 200 example

{
    "data": [
        {
            "type": "widget",
            "id": "eouqtiupanm6uvglwshy",
            "attributes": {
                "name": "Main Support Widget",
                "icon": "https://example.com/widget-icon.png"
            }
        }
    ],
    "meta": {
        "pagination": {
            "total": 10,
            "count": 10,
            "per_page": 10,
            "current_page": 1,
            "total_pages": 1
        }
    },
    "links": {
        "self": "self",
        "first": "first",
        "next": "next",
        "last": "last"
    }
}