> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pingback.live/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Widget

> Fetch widget configuration by ID for embedding in your website.

Returns the full configuration for a widget. This is a public endpoint — no authentication is required. Your embedded widget script calls this endpoint at load time to fetch branding, copy, and settings.

**Method**: `GET`  **URL**: `/api/v1/widget/{widget_id}`

<Note>
  This endpoint does not require an `Authorization` header. It is intentionally public so your website visitors' browsers can call it directly.
</Note>

### Path parameters

<ParamField path="widget_id" type="string" required>
  The UUID of the widget to retrieve.
</ParamField>

### Response

<ResponseField name="id" type="string" required>
  UUID of the widget.
</ResponseField>

<ResponseField name="business_id" type="string" required>
  UUID of the business that owns the widget.
</ResponseField>

<ResponseField name="name" type="string" required>
  Display name of the widget.
</ResponseField>

<ResponseField name="domain" type="string" required>
  The website domain this widget is configured for.
</ResponseField>

<ResponseField name="welcome_heading" type="string" required>
  The heading text shown on the widget's welcome screen.
</ResponseField>

<ResponseField name="welcome_tagline" type="string" required>
  The subheading or tagline shown below the welcome heading.
</ResponseField>

<ResponseField name="primary_color" type="string" required>
  The hex color used for the widget's primary UI elements (e.g., `#7650FF`).
</ResponseField>

<ResponseField name="show_online_badge" type="boolean" required>
  Whether to display an online/offline availability badge on the widget launcher.
</ResponseField>

<ResponseField name="logo_url" type="string">
  URL to your business logo displayed inside the widget. `null` if not set.
</ResponseField>

<ResponseField name="config" type="object" required>
  Additional widget configuration options.
</ResponseField>

<ResponseField name="created_at" type="string" required>
  ISO 8601 timestamp of when the widget was created.
</ResponseField>

<ResponseField name="updated_at" type="string" required>
  ISO 8601 timestamp of the most recent update.
</ResponseField>

### Example

<CodeGroup>
  ```bash curl theme={null}
  curl --request GET \
    --url https://api.pingback.live/api/v1/widget/9d8e7f6a-5b4c-3d2e-1f0a-9b8c7d6e5f4a
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.pingback.live/api/v1/widget/9d8e7f6a-5b4c-3d2e-1f0a-9b8c7d6e5f4a'
  );

  const widget = await response.json();
  ```
</CodeGroup>

### Response example

```json theme={null}
{
  "id": "9d8e7f6a-5b4c-3d2e-1f0a-9b8c7d6e5f4a",
  "business_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
  "name": "PingBack Support",
  "domain": "acme.com",
  "welcome_heading": "Hi there!",
  "welcome_tagline": "We make it simple to connect with us. Ask us anything, or share your feedback.",
  "primary_color": "#7650FF",
  "show_online_badge": true,
  "logo_url": "https://res.cloudinary.com/example/image/upload/v1/logos/acme.png",
  "config": {},
  "created_at": "2024-01-10T08:00:00Z",
  "updated_at": "2024-01-20T14:22:00Z"
}
```

***

## Get widget channels

**Method**: `GET`  **URL**: `/api/v1/widget/{widget_id}/channels`

Returns all active channels for the business associated with this widget. The embedded widget calls this endpoint to determine which channel options (WhatsApp, Telegram, etc.) to display to visitors.

<Note>
  This endpoint is also public and does not require authentication.
</Note>

### Path parameters

<ParamField path="widget_id" type="string" required>
  The UUID of the widget.
</ParamField>

### Example

<CodeGroup>
  ```bash curl theme={null}
  curl --request GET \
    --url https://api.pingback.live/api/v1/widget/9d8e7f6a-5b4c-3d2e-1f0a-9b8c7d6e5f4a/channels
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.pingback.live/api/v1/widget/9d8e7f6a-5b4c-3d2e-1f0a-9b8c7d6e5f4a/channels'
  );

  const channels = await response.json();
  ```
</CodeGroup>

### Response example

```json theme={null}
[
  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "business_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
    "type": "whatsapp",
    "config": {},
    "is_active": true,
    "created_at": "2024-01-15T10:30:00Z"
  },
  {
    "id": "7cb96e12-3a4b-4c5d-8e9f-0a1b2c3d4e5f",
    "business_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
    "type": "telegram",
    "config": {},
    "is_active": true,
    "created_at": "2024-01-12T09:15:00Z"
  }
]
```

### Errors

| Status | Meaning                                                    |
| ------ | ---------------------------------------------------------- |
| 404    | Widget not found — the provided `widget_id` does not exist |
