App Widgets
The agent app's home-screen widgets: HERO (image, GIF or video, 402x324), BANNER (320x180, every active one shown in rank order), INFO (logo + text) and EXPLORE (title, subtitle, CTA and image, 362x463), read by the app from crs GET /api/v1/app/widgets. The search screens, read from crs GET /api/v1/app/search-content: AI_SEARCH_POPUP (heading + CTA, with its example AI_SEARCH_PROMPTs as children), AI_SEARCH_PROMPT (image + prompt; with no parent it is a card on the Ask AI screen), SEARCH_SECTION (a suggestion heading) and SEARCH_SUGGESTION (a child of a section: image + title opening a PROPERTY or DESTINATION). Any widget can be limited to a startsAt/endsAt window.
📄️ List app widgets
Every widget, active or not, ordered by type then `rank` (lowest first).
📄️ Create an app widget
Required by type: HERO and BANNER need `mediaUrl`; INFO needs `body`; EXPLORE needs `title` and `mediaUrl`. `mediaType` (IMAGE, GIF, VIDEO) is worked out from the URL when left out, and only a HERO may be a video. AI_SEARCH_POPUP and SEARCH_SECTION need `title`; AI_SEARCH_PROMPT needs `body` and `mediaUrl` (and `parentId` of an AI_SEARCH_POPUP to be one of its examples); SEARCH_SUGGESTION needs `parentId` (a SEARCH_SECTION), `title`, `mediaUrl`, `targetType` (PROPERTY or DESTINATION) and `targetId`. `endsAt` must be after `startsAt`. `rank` defaults to 0, `active` to true.
📄️ Get an app widget
Get an app widget
📄️ Update an app widget
Replaces the widget; the same rules as create apply.
📄️ Delete an app widget
Delete an app widget
📄️ Get a presigned URL to upload a widget's picture, GIF, video or logo
Accepts `image/*` and `video/*`. Client flow: (1) POST here, (2) PUT the bytes to `uploadUrl` with the same `Content-Type`, (3) submit `objectUrl` as `mediaUrl` or `logoUrl`. Files are served from images.elivaas.com. URL expires after `expiresInSeconds` (3600).