> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.jelliu.co/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.jelliu.co/_mcp/server.

# List widgets

GET https://api.jelliu.co/api/widgets

Lists the widgets of your workspace, newest first (`created_at` descending). Deleted widgets are
never included. Use `GET /api/widgets/{id}` to read one and `POST /api/widgets` to add one.

Offset pagination: the response is a bare `data` array with no total and no cursor. Request the next
page with `offset` increased by `limit` until fewer than `limit` items come back. See
[Pagination](/pagination).

`api_key` in each item is the stored HMAC digest, not a usable key.

**Consistency.** Pages are cached per `limit`/`offset` for up to 120 seconds. Creating, updating or
deleting a widget clears that cache, so your own writes show up on the next read.

**Idempotency.** Read-only; safe to retry.

**Access**

* **Required scope:** `read` (or `write`).
* **Rate limit:** General API — 120 requests/min per workspace (200 on Growth, 300 on Business, 600 on Enterprise). See [Rate limits](/rate-limits).
* **Plan:** Available on every plan.

Reference: https://developer.jelliu.co/api-reference/widgets/get-widgets

## Authentication

- `Authorization` header (bearer token, required) — Workspace API key: `jl_` followed by 64 lowercase hex characters, created by the workspace owner in the dashboard (**Settings → API Keys**) and sent as `Authorization: Bearer jl_...`. The plaintext is shown once, at creation; Jelliu stores only a SHA-256 hash. A workspace can hold up to 25 active keys. | Scope | GET / HEAD | POST / PUT / PATCH / DELETE | Admin-only routes | | --- | --- | --- | --- | | `read` | Yes | No | No | | `write` | Yes | Yes | No | | `full` | Yes | Yes | Yes | Operations restricted to admins or owners reject keys without the `full` scope with `403`, and say so in their description. No key, whatever its scope, can mint or revoke API keys or rotate a webhook secret — that requires a signed-in owner session. A revoked key stops authenticating within about 10 seconds. See [Authentication](/authentication).

## Request

### Query parameters

- `limit` (integer, optional, default: 50) — Page size, 1 to 100. Default 50. A value outside the range or not a number returns 400 `Request validation failed`; it is not clamped.
- `offset` (integer, optional, default: 0) — Number of widgets to skip, 0 to 100000. Default 0. Out-of-range values return 400 `Request validation failed`.

## Response

### 200

A page of widgets. May be empty.

- `data` (list of object, required)
  - `id` (string, optional) — Widget id. Also the public credential used by the embed script (`x-widget-id` / `wid`).
  - `tenant_id` (string, optional) — Workspace that owns the widget.
  - `agent_id` (string, optional) — Agent that answers the widget's visitors (text and voice).
  - `name` (string, optional) — Internal name shown in the dashboard; visitors do not see it.
  - `allowed_origins` (list of string, optional) — Origins allowed to embed the widget. Runtime calls must send an `x-widget-parent-origin` that matches one entry: scheme and port exactly, hostname equal modulo one leading `www.`. `*` never matches.
  - `branding` (object, optional) — Widget look and copy. On write, `primary_color` is required whenever `branding` is sent, and the object REPLACES the stored branding (it is not merged). Widgets created without branding store `{}`, which is what `POST /widget/init` then returns.
    - `primary_color` (string, required) — Accent colour for the launcher and header, as `#RRGGBB` (error: `Must be a hex color like #FF0000`).
    - `logo_url` (string, optional) — Logo shown in the chat header.
    - `position` (enum, optional) — Corner for the launcher button. `bottom-right` puts it in the lower-right corner (the default when omitted); `bottom-left` in the lower-left corner.
      - Allowed values: `bottom-right`, `bottom-left`
    - `title` (string, optional) — Chat header title.
    - `subtitle` (string, optional) — Line under the title, such as expected reply time.
    - `quick_replies` (list of string, optional) — Up to 4 suggestion chips shown under the greeting (1 to 60 characters each).
    - `agent_names` (list of string, optional) — Display names (1 to 40 characters); the UI picks one per visitor and replies are signed with it.
    - `agent_avatars` (list of string, optional) — One picture per entry of `agent_names`, aligned by index. `https://` URLs or site-relative paths only (up to 500 characters); other values fail with `La imagen debe ser https o una ruta propia`.
    - `i18n` (map from string to object, optional) — Per-language greeting and quick replies, keyed by primary language subtag (`es`, `en`). The widget uses the block matching the visitor's language before falling back to `greeting_message`.
      - `greeting` (string, optional) — Greeting for this language.
      - `quick_replies` (list of string, optional) — Quick replies for this language.
  - `voice_enabled` (boolean, optional) — Whether visitors can talk to the agent by voice (`POST /widget/voice-session`).
  - `greeting_message` (string, optional, nullable) — First message the chat shows before the visitor writes; `null` when not set.
  - `rate_limit_rpm` (integer, optional) — Requests per minute allowed per widget credential on the public `/widget/*` endpoints (default 30). The widget id and the API key are counted separately.
  - `api_key` (string, optional) — HMAC-SHA256 digest (64 hex characters) of the widget API key as stored. It is NOT the key and cannot authenticate. The plaintext key is returned only once, as `plaintext_api_key`, in the `POST /api/widgets` response.
  - `is_active` (boolean, optional) — `false` once the widget is deleted. Cannot be changed through the API.
  - `created_at` (datetime, optional) — When the widget was created.
  - `updated_at` (datetime, optional) — When the widget was last updated.
  - `deleted_at` (datetime, optional, nullable) — Always `null` in API responses; deleted widgets are not returned.

## Errors

### 400 Bad Request Error

`limit` or `offset` is out of range or not a number.

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

### 401 Unauthorized Error

No usable credential. Either the `Authorization` header is missing or is not a well-formed `Bearer jl_…` key, or the key is unknown, revoked or expired. Do not retry with the same key. See [Authentication](/authentication#401-unauthorized).

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

### 403 Forbidden Error

The API key lacks the `read` scope, or the workspace is suspended.

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

### 429 Too Many Requests Error

Rate limit exceeded for the current 60-second window (`RATE_LIMIT_EXCEEDED`). Wait `Retry-After` seconds, then retry. The `message` differs per limiter; the code does not. See [Rate limits](/rate-limits).

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "84b5aa0e-f6d6-4d88-b3ad-cd7a5a2aeb9e",
      "tenant_id": "58ffb2a3-7704-4790-bf60-a7235e42d0e4",
      "agent_id": "efac2e32-c698-4018-974d-bbf4500916b5",
      "name": "Sitio web principal",
      "allowed_origins": [
        "https://www.clinicasonrisa.co"
      ],
      "branding": {
        "primary_color": "#1C1D2B",
        "position": "bottom-right",
        "title": "Habla con nosotros",
        "subtitle": "Respondemos en minutos",
        "quick_replies": [
          "Agendar una cita",
          "Ver precios"
        ]
      },
      "voice_enabled": true,
      "greeting_message": "¡Hola! ¿En qué te puedo ayudar hoy?",
      "rate_limit_rpm": 30,
      "api_key": "1dbac0de07f71908b42f2b1fb25f87f37073d231959ec319cb79296f14425645",
      "is_active": true,
      "created_at": "2026-09-10T14:22:05.418Z",
      "updated_at": "2026-09-12T09:03:41.207Z",
      "deleted_at": null
    },
    {
      "id": "2f7a9c1e-3b4d-4e6f-8a0b-1c2d3e4f5a6b",
      "tenant_id": "58ffb2a3-7704-4790-bf60-a7235e42d0e4",
      "agent_id": "efac2e32-c698-4018-974d-bbf4500916b5",
      "name": "Tienda Shopify",
      "allowed_origins": [
        "https://tienda.clinicasonrisa.co"
      ],
      "branding": {
        "primary_color": "#0E7C66"
      },
      "voice_enabled": false,
      "greeting_message": null,
      "rate_limit_rpm": 30,
      "api_key": "7c3e0b9a51d24f86a0e1b7c2d9f34a5b6c7d8e9f0a1b2c3d4e5f60718293a4b5",
      "is_active": true,
      "created_at": "2026-08-28T18:40:12.001Z",
      "updated_at": "2026-08-28T18:40:12.001Z",
      "deleted_at": null
    }
  ]
}
```

**SDK Code**

```python Widgets_getWidgets_example
import requests

url = "https://api.jelliu.co/api/widgets"

querystring = {"limit":"20","offset":"0"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Widgets_getWidgets_example
const url = 'https://api.jelliu.co/api/widgets?limit=20&offset=0';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Widgets_getWidgets_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.jelliu.co/api/widgets?limit=20&offset=0"

	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(res)
	fmt.Println(string(body))

}
```

```ruby Widgets_getWidgets_example
require 'uri'
require 'net/http'

url = URI("https://api.jelliu.co/api/widgets?limit=20&offset=0")

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
```

```java Widgets_getWidgets_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.jelliu.co/api/widgets?limit=20&offset=0")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Widgets_getWidgets_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.jelliu.co/api/widgets?limit=20&offset=0', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Widgets_getWidgets_example
using RestSharp;

var client = new RestClient("https://api.jelliu.co/api/widgets?limit=20&offset=0");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Widgets_getWidgets_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.jelliu.co/api/widgets?limit=20&offset=0")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```