Skip to main content
POST
JavaScript
The other half of archive. Unarchiving returns the widget to STATE_ACTIVE and its hostname serves traffic again, on the same DNS label it always had.

Sessions do not come back

Revocation is terminal. Sessions revoked by the archive stay STATE_REVOKED after unarchive; embedded widgets need new sessions from your backend before visitors can chat again. If your backend mints a session on page load, this happens on its own with the next visit.

Archive a widget

What got you here, and everything it revoked.

Create a widget session

The fresh sessions visitors need now.

Get a widget

Confirm the state and re-read info.host.

List widget sessions

?state=STATE_REVOKED shows the casualties.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspaceId
string
required

Workspace ID.

Example:

"workspace_01HXKD2E5NQM3T9AYWCF133E3Q"

id
string
required

Widget ID. Accepts the canonical wgt_… form or the external_id:<value> form.

Body

application/json

Unarchive widget request.

Response

OK

Widget is an embeddable chat surface bound to a single agent. Each widget owns a globally unique, immutable DNS label under the widgets domain (e.g. "k7m2xq9fp4wn.widgets.cadenya.com"): one widget = one hostname = one origin allowlist = one agent binding. Browsers talk to the widget host with session bearer tokens minted server-side via WidgetSessionService.

metadata
object
required

Standard metadata for persistent, named resources (e.g., agents, tools, prompts)

spec
object
required

WidgetSpec is the user-provided configuration for a widget.

state
enum<string>
required
read-only

The current lifecycle state of the widget. Output only. Widgets are created STATE_ACTIVE; use the :archive and :unarchive actions to transition between states.

Available options:
STATE_UNSPECIFIED,
STATE_ACTIVE,
STATE_ARCHIVED
info
object

WidgetInfo provides read-only server-derived data about a widget.