Skip to content

feat: add embeddable widget API#10

Merged
mpge merged 2 commits into
mainfrom
feat/embeddable-widget
Apr 8, 2026
Merged

feat: add embeddable widget API#10
mpge merged 2 commits into
mainfrom
feat/embeddable-widget

Conversation

@mpge

@mpge mpge commented Apr 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Add Widget_Controller with public REST API endpoints (no auth required):
    • GET /widget/config - widget appearance settings
    • GET /widget/articles - search KB articles
    • GET /widget/articles/{slug} - single article detail
    • POST /widget/tickets - create guest ticket via widget
    • GET /widget/tickets/{ref} - lookup ticket by reference
  • Widget settings stored in escalated_settings: widget_enabled, widget_color, widget_position, widget_greeting
  • IP-based rate limiting (30 requests/minute)
  • All endpoints guarded by widget_enabled setting

Test plan

  • Verify widget disabled returns 403
  • Verify config endpoint returns correct settings
  • Verify ticket creation via widget with guest data
  • Verify created ticket has 'widget' channel
  • Verify ticket lookup by reference
  • Verify nonexistent ticket returns 404
  • Verify articles endpoint returns array
  • Verify rate limiting allows within limit

mpge added 2 commits April 8, 2026 09:01
Add public REST API endpoints for an embeddable help widget at
/escalated/v1/widget/* with no auth required. Includes /config for
widget settings, /articles for KB search, /articles/{slug} for
article detail, /tickets POST for guest ticket creation, and
/tickets/{ref} GET for ticket lookup. Guarded by widget_enabled
setting and IP-based rate limiting (30 req/min). Includes PHPUnit
tests covering all endpoints, settings, and guards.
Merge main into widget branch, resolve API bootstrap conflict
to include all controllers. Apply Pint formatting fixes.
@mpge
mpge merged commit e08df25 into main Apr 8, 2026
1 of 3 checks passed
@mpge
mpge deleted the feat/embeddable-widget branch April 8, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant