Docs API reference
Extensions
A workspace’s own widget blocks (spec 46): a small sandboxed web page with the capabilities it DECLARES — network origins, records, an upstream with a server-held secret, camera, microphone. A version is uploaded switched off; only a signed-in owner switches it on, after seeing that list (the activate, rollback, deactivate and secrets calls take the member session, never an API key). On screens a widget holds at most a five-minute token for its own extension.
Every call needs an API key in the Authorization header. New to the API? Start with
the API overview.
- GET List extension widgets /extensions
- POST Upload an extension version (switched off) /extensions
- POST Switch a version on (owner, signed in) /extensions/{id}/activate
- POST Back to the version on before (owner, signed in) /extensions/{id}/rollback
- POST Switch an extension off (owner, signed in) /extensions/{id}/deactivate
- POST Exchange a member session for a widget token (RFC 8693; signed in) /extensions/token
- PUT Set an upstream secret (write-only; owner, signed in) /extensions/{id}/secrets/{name}
List extension widgets
/extensions extensionsResponses
- 200 The extensions.
- 401 Missing or invalid API key.
- 403 The key lacks the scope, or the role is read-only.
Response fields (200)
itemsobject[] required5 fields in
itemsext_idstringnamestringactiveobject or null{ version, sha256, caps, activated_by, activated_at, previous }active_wordsstring[]versionsobject[]
next_cursorstring or null requiredPass as
cursorfor the next page;nullon the last page.
curl "https://www.wunderframe.com/api/v1/extensions" \
-H "Authorization: Bearer $WUNDERFRAME_API_KEY"{
"items": [
{
"ext_id": "com.acme.door",
"name": "Door",
"active": null,
"active_words": [],
"versions": []
}
],
"next_cursor": null
}Error example
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key."
}
}Upload an extension version (switched off)
/extensions extensionsUpload JSON { manifest, entry, assets? }, multipart manifest + entry, or multipart package containing one ZIP (extension.json, entry.js, optional assets/). ZIP limits: 8 MiB packed, 16 MiB unpacked, 128 files. The code retains its 512 KiB limit. Assets are available offline through wf.asset(path).
Request body required
JSON, or the file itself as the body with one of multipart/form-data as its Content-Type.
manifestobject requiredextension.json
entrystring requiredentry.js, one bundled module ≤ 512 KB
assetsobjectOptional assets/ paths to { mime, data: base64 }; 16 MiB total.
Responses
- 201 The extension with the new version.
- 400 The request is invalid —
details.fieldnames the field when there is one. - 401 Missing or invalid API key.
- 403 The key lacks the scope, or the role is read-only.
- 409 Conflicts with the current state.
- 422 The submitted package or fields failed validation.
Response fields (201)
ext_idstringnamestringactiveobject or null{ version, sha256, caps, activated_by, activated_at, previous }active_wordsstring[]versionsobject[]
curl -X POST "https://www.wunderframe.com/api/v1/extensions" \
-H "Authorization: Bearer $WUNDERFRAME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"manifest": {
"id": "com.acme.door",
"version": "1.0.0",
"engine": "^1",
"name": "Door",
"blocks": [],
"capabilities": {}
},
"entry": "wf.ready();"
}'{
"ext_id": "com.acme.door",
"name": "Door",
"active": null,
"active_words": [],
"versions": []
}Error example
{
"error": {
"code": "invalid",
"message": "The request is invalid — `details.field` names the field when there is one."
}
}Switch a version on (owner, signed in)
/extensions/{id}/activate extensionsParameters
idstring required pathThe extension’s reverse-DNS id, e.g.
com.acme.door.
Request body required
sha256stringThe version to switch on.
Pattern
^[0-9a-f]{64}$ackstring[]The capability keys the owner was shown (every one the version declares).
Responses
- 200 The extension.
- 401 Missing or invalid API key.
- 403 The key lacks the scope, or the role is read-only.
- 404 Not found in this workspace.
- 409 Conflicts with the current state.
Response fields (200)
ext_idstringnamestringactiveobject or null{ version, sha256, caps, activated_by, activated_at, previous }active_wordsstring[]versionsobject[]
curl -X POST "https://www.wunderframe.com/api/v1/extensions/wkFRBzMq6POZ_qYJHvgQf/activate" \
-H "Authorization: Bearer $WUNDERFRAME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"ack": [
"network:https://api.acme.com",
"records"
]
}'{
"ext_id": "com.acme.door",
"name": "Door",
"active": null,
"active_words": [],
"versions": []
}Error example
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key."
}
}Back to the version on before (owner, signed in)
/extensions/{id}/rollback extensionsParameters
idstring required pathThe extension’s reverse-DNS id, e.g.
com.acme.door.
Request body required
sha256stringThe version to switch on.
Pattern
^[0-9a-f]{64}$ackstring[]The capability keys the owner was shown (every one the version declares).
Responses
- 200 The extension.
- 401 Missing or invalid API key.
- 403 The key lacks the scope, or the role is read-only.
- 404 Not found in this workspace.
- 409 Conflicts with the current state.
Response fields (200)
ext_idstringnamestringactiveobject or null{ version, sha256, caps, activated_by, activated_at, previous }active_wordsstring[]versionsobject[]
curl -X POST "https://www.wunderframe.com/api/v1/extensions/wkFRBzMq6POZ_qYJHvgQf/rollback" \
-H "Authorization: Bearer $WUNDERFRAME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"ack": [
"network:https://api.acme.com",
"records"
]
}'{
"ext_id": "com.acme.door",
"name": "Door",
"active": null,
"active_words": [],
"versions": []
}Error example
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key."
}
}Switch an extension off (owner, signed in)
/extensions/{id}/deactivate extensionsParameters
idstring required pathThe extension’s reverse-DNS id, e.g.
com.acme.door.
Responses
- 200 The extension.
- 401 Missing or invalid API key.
- 403 The key lacks the scope, or the role is read-only.
- 404 Not found in this workspace.
Response fields (200)
ext_idstringnamestringactiveobject or null{ version, sha256, caps, activated_by, activated_at, previous }active_wordsstring[]versionsobject[]
curl -X POST "https://www.wunderframe.com/api/v1/extensions/wkFRBzMq6POZ_qYJHvgQf/deactivate" \
-H "Authorization: Bearer $WUNDERFRAME_API_KEY"{
"ext_id": "com.acme.door",
"name": "Door",
"active": null,
"active_words": [],
"versions": []
}Error example
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key."
}
}Exchange a member session for a widget token (RFC 8693; signed in)
/extensions/token extensionsThe member half of the token exchange (spec 46 §5.1): a signed-in member previewing a widget trades their session for a five-minute token for one extension at its active version (sub: user:<id>). A screen exchanges its own bearer at /api/player/ext/token instead. JSON only; an API key is never accepted.
Request body required
grant_typestring requiredOne of
urn:ietf:params:oauth:grant-type:token-exchangesubject_token_typestringrequested_token_typestringOne of
urn:ietf:params:oauth:token-type:jwtaudiencestring requiredwf-ext:<extension id>scopestringSpace-separated, a subset of what the extension declares; empty = all of it.
ext_sha256string requiredblock_idstring required
Responses
- 200 The token.
- 400 The request is invalid —
details.fieldnames the field when there is one. - 401 Missing or invalid API key.
- 403 The key lacks the scope, or the role is read-only.
- 415 Unsupported media type.
- 429 Too many requests for this key: wait
details.retry_after_sseconds (also inRetry-After).
Response fields (200)
access_tokenstringissued_token_typestringtoken_typestringOne of
Bearerexpires_inintegerscopestring
curl -X POST "https://www.wunderframe.com/api/v1/extensions/token" \
-H "Authorization: Bearer $WUNDERFRAME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"grant_type": "urn:ietf:params:oauth:grant-type:token-exchange",
"subject_token_type": "urn:ietf:params:oauth:token-type:access_token",
"requested_token_type": "urn:ietf:params:oauth:token-type:jwt",
"audience": "wf-ext:acme-bell",
"scope": "records:read",
"ext_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"block_id": "blk_1"
}'{
"access_token": "string",
"issued_token_type": "string",
"token_type": "Bearer",
"expires_in": 0,
"scope": "string"
}Error example
{
"error": {
"code": "invalid",
"message": "The request is invalid — `details.field` names the field when there is one."
}
}Set an upstream secret (write-only; owner, signed in)
/extensions/{id}/secrets/{name} extensionsParameters
idstring required pathThe extension’s reverse-DNS id, e.g.
com.acme.door.namestring required pathThe secret’s name the manifest’s upstream names.
Request body required
valuestring required
Responses
- 200 Its name and a hint, never the value.
- 400 The request is invalid —
details.fieldnames the field when there is one. - 401 Missing or invalid API key.
- 403 The key lacks the scope, or the role is read-only.
- 404 Not found in this workspace.
- 503 A service this call needs is not available right now.
Response fields (200)
namestringhintstring
curl -X PUT "https://www.wunderframe.com/api/v1/extensions/wkFRBzMq6POZ_qYJHvgQf/secrets/string" \
-H "Authorization: Bearer $WUNDERFRAME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"value": "sk_live_…"
}'{
"name": "string",
"hint": "string"
}Error example
{
"error": {
"code": "invalid",
"message": "The request is invalid — `details.field` names the field when there is one."
}
}