Skip to main content
Get Agent Widget
Every agent has exactly one widget, prepared for you on first read — so this never 404s and there is nothing to create. There is nothing to delete either: you configure the one it has.
Singular, with no id in the path. This used to be a list at /widgets plus a read at /widgets/{widget_id}. Since an agent only ever has one, the id was a value you had to fetch before you could use any of the other routes, and could only ever be that one value. It is still on the body — useful in logs, and for telling one rotation from another.
The public key is what your website embeds, and it is shown once, when the key is rotated — never on a read. public_key_prefix is the safe-to-log half, for identifying which key a page is currently using. allowed_origins is the security boundary: the widget only runs on the sites you list.

Authorizations

Authorization
string
header
required

Your API key as a Bearer token, e.g. Authorization: Bearer vk_….

Path Parameters

agent_id
string
required

The agent's id, as GET /v1/agents returns it.

Response

The agent's widget. One is prepared on first read, so this never 404s.

id
string
agent_id
string
name
string
allowed_origins
string[]
enabled_modes
object
theme
object
default_variables
object
public_key_prefix
string
status
string
created_at
string<date-time>
updated_at
string<date-time>