import { Configuration, ManagedUsersApi } from '@widgetic/api-sdk-ts';const managedUsersApi = new ManagedUsersApi(new Configuration({ apiKey: 'YOUR_API_KEY' }));// On your server, when the page that hosts the editor opens for one of your users:const session = await managedUsersApi.createManagedUserEditorSession({ id: managedUserId, newEditorSession: { surfaces: ['files', 'editor'], expiresInSeconds: 3600, allowedOrigin: 'https://app.example.com', maxCredits: 20 }});// Send session.token to that user's browser, and nothing else of yours.
Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic’s editor
pieces, such as the File Browser and the composition editor, without your API key ever reaching that
browser. Call this from your server when the page that hosts the editor opens, and hand the token in
the answer to that page.
The token is shown once. It starts with wgt_ses_ and the browser sends it as
Authorization: Bearer <token>. It can do only what the surfaces you name allow, and only for this
managed user:
files: upload a file (uploadFile) and list the files uploaded for this user (listUploads). Every
file is filed for this user and stored in your own storage destination, never in Widgetic’s: a file a
customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not
optional, so no session, whatever its surfaces, can be made until you have set a destination
(setPartnerStorageDestination); until then it is refused with 409 and PARTNER_STORAGE_REQUIRED, and
when the destination cannot be used with 503 and STORAGE_DESTINATION_UNAVAILABLE. A destination you
remove after the session was made stops its uploads too (the same 409; the browser is only told that
the feature is not available right now). To keep a customer from uploading, leave files out of the
session and hand the editors your own media library instead (mediaLibrary).
editor: edit one of this user’s compositions: read it (getCompositionById, its content, design,
embed settings and schemas), check a content change (validateCompositionContent), and change its
name, content, design and embed settings (updateComposition, setDynamicContent). For a widget that
answers visitors’ questions from documents (the ai-answers adapter), it also lists those documents,
adds one as text or as a file (a text file or a picture; a PDF once PDFs are read), and removes one
(getAiAnswersKnowledge, addAiAnswersKnowledgeDocument, addAiAnswersKnowledgeFile,
removeAiAnswersKnowledgeDocument); adding costs no credits, and is limited for each of your users
separately. It can reach
only compositions you created for this managed user (tag them with managedUserId when you create
them); any other composition, including another of your users’, answers 404.
creator: use Widgetic’s widget creator for this user, including its AI. Draw on canvases and save
them (getAllCanvases, getCanvas, createCanvas, updateCanvas, previewDeleteCanvas,
deleteCanvas); make, change, copy and delete the widgets on them (createWidget, getWidgets,
getWidgetsBatch, updateWidget, uploadWidgetThumbnail, duplicateWidget, deleteWidget);
list and make the compositions of a widget it built (getAllCompositions, createComposition), which
is how it shows the widget with sample values; keep the
conversation of each widget (getConversationsByWidgetId, createConversationForWidget,
updateConversation, getMessages, createMessage, updateMessage, restoreCheckpoint); and read a
widget’s schemas and give it its repository (getWidgetContentSchema, getWidgetDesignSchema,
updateWidgetRepository). The AI that builds a widget is part of it: list the models
(listLlmModels), open the widget’s repository (createRepository,
getRepository), start a generation and follow or cancel it (generateCode,
streamOperationUpdates, getOperation, cancelOperation), build and preview the result
(getWidgetRepositoryHead, buildWidgetFromRepo, previewWidgetVersion), publish a
version of the widget and move between its versions (publishBuiltWidget,
getWidgetPublishHistory, setWidgetPublishHistoryLive, renameWidgetPublishHistoryTitle), and
turn a stroke or a sentence into a decision (recognizeShape, resolveDesignProperty). It can
also offer the customer your presets as starting points: read them and ask for a copy for this customer
(listMyPresets, copyMyPreset; you choose the presets with setPartnerPreset).
What the session makes is filed for this managed user, and the lists it reads hold only this user’s
canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories,
uploaded files and operations made for this managed user (tag the canvases and widgets you create
with managedUserId); any other canvas, widget, composition, conversation, message, repository, file
or operation, including another of your users’, answers 404. The creator also saves the composition
it is editing (updateComposition, from the editor surface) and attaches pictures to its chat
(uploadFile, from the files surface), and the surfaces do not imply one another: to open the
whole creator for a user, ask for creator, editor and files together. A generation or a build
one user starts can be followed and cancelled by that user and by you, never by another of your
users. The AI is paid for by your account, as your own calls are: its credits and allowances are
yours. A session cannot make a widget public (publishing a version does not), file one under a
project or an organization, or set anything the creator does not set: a body with another field is
refused with 403 and EDITOR_SESSION_FIELD_NOT_ALLOWED.
workflows: use Widgetic’s Workflows editor for this user. List their workflows and the compositions
a workflow of theirs can chain (listWorkspaceWorkflows, listWorkspaceWorkflowCompositionOptions);
list the starting points you offer them and make a workflow from one, which gives the user their own copy
of every widget it chains, a composition of their own on each copy, and a draft
(listWorkspaceWorkflowPresets, createWorkspaceWorkflowFromPreset; you offer them with
setPartnerWorkflowPreset);
make, open, change and delete one (createWorkspaceWorkflow, getWorkspaceWorkflow,
saveWorkspaceWorkflow, deleteWorkspaceWorkflow) and copy it (duplicateWorkspaceWorkflow); publish
it or discard the changes of its draft (publishWorkspaceWorkflow,
discardWorkspaceWorkflowChanges); read and restore its versions (listWorkspaceWorkflowVersions,
getWorkspaceWorkflowVersion, restoreWorkspaceWorkflowVersion); pause, resume, archive and unarchive it
(pauseWorkspaceWorkflow, resumeWorkspaceWorkflow, archiveWorkspaceWorkflow,
unarchiveWorkspaceWorkflow); and read its counts (getWorkspaceWorkflowStats). The workspace in each
path is personal: a session has no other, and a path that names an organization is refused. What the
session makes is filed for this managed user (managedUserId), the lists hold only this user’s workflows,
and it can reach only workflows made for this managed user; any other workflow, including one of yours
or of another of your users, answers 404. A workflow can chain only the compositions you made for this
managed user (tag them with managedUserId): one that belongs to anybody else is not available, and
publishing a workflow that uses it is refused. A customer can have at most 50 workflows, and what a
customer’s session reads never says who published a version. A session cannot set who a workflow belongs
to or which workspace it is in: a body with another field is refused with 403 and
EDITOR_SESSION_FIELD_NOT_ALLOWED.
Everything else is refused with 403 and EDITOR_SESSION_ROUTE_NOT_ALLOWED: a session cannot read your
account, make more sessions, change your presets or delete a composition, and a session without the creator surface cannot
create or list compositions. Create the composition yourself with your API key, then open the editor on it.
A session ends at expiresAt (at most four hours), when you end it (revokeManagedUserEditorSession),
or when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at
once (429 EDITOR_SESSION_LIMIT_REACHED). A session that is bound to a web page (allowedOrigin) is
refused from any other origin.
The AI the session runs is paid for with your credits. Set maxCredits to hold the session to a number
of them: once its generations have taken that many (a generation that fails is refunded and does not
count), the next one is refused with 402 and EDITOR_SESSION_CREDIT_LIMIT_REACHED, and the browser is told
only that the feature is not available right now. Without it, the limit Widgetic has set for your account
applies when it has set one (the same limit for every session you make, and maxCredits: null asks for
none), and otherwise the credits of your account are the only ceiling. What each of your users’ sessions
has spent is in getManagedUserUsage.
Each call makes a new session. It does not take an Idempotency-Key: the answer holds the token, and
the token is never stored where a retry could read it back. The answer is sent with
Cache-Control: no-store.
POST
/
managed-users
/
{id}
/
editor-sessions
TypeScript SDK
import { Configuration, ManagedUsersApi } from '@widgetic/api-sdk-ts';const managedUsersApi = new ManagedUsersApi(new Configuration({ apiKey: 'YOUR_API_KEY' }));// On your server, when the page that hosts the editor opens for one of your users:const session = await managedUsersApi.createManagedUserEditorSession({ id: managedUserId, newEditorSession: { surfaces: ['files', 'editor'], expiresInSeconds: 3600, allowedOrigin: 'https://app.example.com', maxCredits: 20 }});// Send session.token to that user's browser, and nothing else of yours.
The pieces of Widgetic's editor the session may drive. files is the media library (the File Browser: upload a file, list the files uploaded for this user); what a user uploads is kept in your own storage destination. Partner storage is not optional: a session of any surface can be made only once you have set a destination up (setPartnerStorageDestination), and is refused with 409 PARTNER_STORAGE_REQUIRED until then. editor is editing one of this user's compositions: read it, change its name, content, design and embed settings, read its schemas, and ask where to show it (getCompositionPreview: the widget's published page). creator is Widgetic's widget creator, with its drawing canvas and its AI: this user's canvases, the widgets on them and the conversation of each widget, the generation, build and publish calls that make a widget, and the compositions of those widgets (list, make). The surfaces do not imply one another: the whole creator also saves a composition (editor) and attaches pictures to its chat (files), so ask for ["creator", "editor", "files"]. workflows is the Workflows editor: this user's own workflows (list, make, make from one of your starting points, draw, publish, pause, resume, archive, delete, the version history and the counts) under /workspaces/personal/workflows, and the compositions made for this user, which are the only ones a workflow of theirs can chain. A workflow is filed under the user it was made for (managedUserId), and the session reaches nothing of another user's, nor of yours.
Bind the session to one web page origin, such as https://app.example.com (no path; http is accepted only for localhost). The session is then refused from any other origin, and from a request that carries no Origin header. Leave it out for a session that can be used from anywhere, which is what a server-side caller needs.
The most credits this session may spend on Widgetic's AI, one credit being one generation. Once the operations it ran have taken that many, the next one is refused (402, EDITOR_SESSION_CREDIT_LIMIT_REACHED) and the browser is only told that the feature is not available right now. A generation that fails is refunded and does not count. Leave it out to get the limit Widgetic has set for your account, if it has set one (it sets none unless you ask), and otherwise no limit of its own, which leaves the credits of your account as the only ceiling. Send null to ask for no limit of its own even when a default is set.
An editor session you have just made. token is shown once and cannot be read again: hand it to the browser of this one user and keep it out of logs and storage.
Extra information about the answer: where a page sits in a list, the cursor of the next page, or warnings about a call that succeeded with a caveat.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Widgetic","colors":{"primary":"#324E30","light":"#75A568","dark":"#0F210F"},"logo":{"light":"https://mintcdn.com/widgetic/Od-pD6ChvIzhY_fR/brand/logo-light.svg?fit=max\u0026auto=format\u0026n=Od-pD6ChvIzhY_fR\u0026q=85\u0026s=c80ce649cc12d9f206a4ea5d3d2d9d31","dark":"https://mintcdn.com/widgetic/Od-pD6ChvIzhY_fR/brand/logo-dark.svg?fit=max\u0026auto=format\u0026n=Od-pD6ChvIzhY_fR\u0026q=85\u0026s=46708e0c7194a1fa0844613fc8492364"},"favicon":"https://mintcdn.com/widgetic/Od-pD6ChvIzhY_fR/brand/favicon.svg?fit=max\u0026auto=format\u0026n=Od-pD6ChvIzhY_fR\u0026q=85\u0026s=94d26e3e8e9ecd316386c38057803c62","api":{},"footer":{"socials":{"x":"https://x.com/widgetic","github":"https://github.com/widgetic"}},"errors":{"404":{"redirect":false,"title":"Page not found","description":"We couldn't find the page you were looking for.\n\n\u003cCardGroup cols={2}>\n \u003cCard title=\"Documentation\" icon=\"book\" href=\"/docs/introduction\">\n Return to the home page\n \u003c/Card>\n \u003cCard title=\"Quickstart\" icon=\"rocket\" href=\"/docs/quickstart\">\n Get started in minutes\n \u003c/Card>\n \u003cCard title=\"API Reference\" icon=\"code\" href=\"/api-reference/introduction\">\n Explore API endpoints\n \u003c/Card>\n \u003cCard title=\"SDKs\" icon=\"cube\" href=\"/resources/sdks\">\n Explore our SDKs\n \u003c/Card>\n\u003c/CardGroup>\n\n\u003cInfo>\n Think this is a broken link? Email us at [support@widgetic.com](mailto:support@widgetic.com).\n\u003c/Info>"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"widgetic","hasAudioNarration":false,"actualSubdomain":"widgetic","customDomains":["widgetic.com"],"gitSource":{"type":"github","owner":"widgetic","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6af081e42ab4a0cc3d7f236c","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"API Reference","count":177},{"language":"default","tag":"Documentation","count":42},{"language":"default","tag":"Partners","count":41},{"language":"default","tag":"Compositions","count":39},{"language":"default","tag":"Workflows","count":19},{"language":"default","tag":"Managed Users","count":18},{"language":"default","tag":"CLI","count":16},{"language":"default","tag":"Partner Integration","count":13},{"language":"default","tag":"Users","count":13},{"language":"default","tag":"Resources","count":10}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/managed-users/create-an-editor-session-for-a-managed-user","slug":"/api-reference/managed-users/create-an-editor-session-for-a-managed-user","pageMetadata":{"title":"Create an editor session for a managed user","description":"Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic's editor\npieces, such as the File Browser and the composition editor, without your API key ever reaching that\nbrowser. Call this from your server when the page that hosts the editor opens, and hand the `token` in\nthe answer to that page.\n\nThe token is shown once. It starts with `wgt_ses_` and the browser sends it as\n`Authorization: Bearer \u003ctoken>`. It can do only what the `surfaces` you name allow, and only for this\nmanaged user:\n\n- `files`: upload a file (`uploadFile`) and list the files uploaded for this user (`listUploads`). Every\n file is filed for this user and stored in your own storage destination, never in Widgetic's: a file a\n customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not\n optional, so no session, whatever its surfaces, can be made until you have set a destination\n (`setPartnerStorageDestination`); until then it is refused with 409 and `PARTNER_STORAGE_REQUIRED`, and\n when the destination cannot be used with 503 and `STORAGE_DESTINATION_UNAVAILABLE`. A destination you\n remove after the session was made stops its uploads too (the same 409; the browser is only told that\n the feature is not available right now). To keep a customer from uploading, leave `files` out of the\n session and hand the editors your own media library instead (`mediaLibrary`).\n- `editor`: edit one of this user's compositions: read it (`getCompositionById`, its content, design,\n embed settings and schemas), check a content change (`validateCompositionContent`), and change its\n name, content, design and embed settings (`updateComposition`, `setDynamicContent`). For a widget that\n answers visitors' questions from documents (the `ai-answers` adapter), it also lists those documents,\n adds one as text or as a file (a text file or a picture; a PDF once PDFs are read), and removes one\n (`getAiAnswersKnowledge`, `addAiAnswersKnowledgeDocument`, `addAiAnswersKnowledgeFile`,\n `removeAiAnswersKnowledgeDocument`); adding costs no credits, and is limited for each of your users\n separately. It can reach\n only compositions you created for this managed user (tag them with `managedUserId` when you create\n them); any other composition, including another of your users', answers 404.\n- `creator`: use Widgetic's widget creator for this user, including its AI. Draw on canvases and save\n them (`getAllCanvases`, `getCanvas`, `createCanvas`, `updateCanvas`, `previewDeleteCanvas`,\n `deleteCanvas`); make, change, copy and delete the widgets on them (`createWidget`, `getWidgets`,\n `getWidgetsBatch`, `updateWidget`, `uploadWidgetThumbnail`, `duplicateWidget`, `deleteWidget`);\n list and make the compositions of a widget it built (`getAllCompositions`, `createComposition`), which\n is how it shows the widget with sample values; keep the\n conversation of each widget (`getConversationsByWidgetId`, `createConversationForWidget`,\n `updateConversation`, `getMessages`, `createMessage`, `updateMessage`, `restoreCheckpoint`); and read a\n widget's schemas and give it its repository (`getWidgetContentSchema`, `getWidgetDesignSchema`,\n `updateWidgetRepository`). The AI that builds a widget is part of it: list the models\n (`listLlmModels`), open the widget's repository (`createRepository`,\n `getRepository`), start a generation and follow or cancel it (`generateCode`,\n `streamOperationUpdates`, `getOperation`, `cancelOperation`), build and preview the result\n (`getWidgetRepositoryHead`, `buildWidgetFromRepo`, `previewWidgetVersion`), publish a\n version of the widget and move between its versions (`publishBuiltWidget`,\n `getWidgetPublishHistory`, `setWidgetPublishHistoryLive`, `renameWidgetPublishHistoryTitle`), and\n turn a stroke or a sentence into a decision (`recognizeShape`, `resolveDesignProperty`). It can\n also offer the customer your presets as starting points: read them and ask for a copy for this customer\n (`listMyPresets`, `copyMyPreset`; you choose the presets with `setPartnerPreset`).\n What the session makes is filed for this managed user, and the lists it reads hold only this user's\n canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories,\n uploaded files and operations made for this managed user (tag the canvases and widgets you create\n with `managedUserId`); any other canvas, widget, composition, conversation, message, repository, file\n or operation, including another of your users', answers 404. The creator also saves the composition\n it is editing (`updateComposition`, from the `editor` surface) and attaches pictures to its chat\n (`uploadFile`, from the `files` surface), and the surfaces do not imply one another: to open the\n whole creator for a user, ask for `creator`, `editor` and `files` together. A generation or a build\n one user starts can be followed and cancelled by that user and by you, never by another of your\n users. The AI is paid for by your account, as your own calls are: its credits and allowances are\n yours. A session cannot make a widget public (publishing a version does not), file one under a\n project or an organization, or set anything the creator does not set: a body with another field is\n refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`.\n- `workflows`: use Widgetic's Workflows editor for this user. List their workflows and the compositions\n a workflow of theirs can chain (`listWorkspaceWorkflows`, `listWorkspaceWorkflowCompositionOptions`);\n list the starting points you offer them and make a workflow from one, which gives the user their own copy\n of every widget it chains, a composition of their own on each copy, and a draft\n (`listWorkspaceWorkflowPresets`, `createWorkspaceWorkflowFromPreset`; you offer them with\n `setPartnerWorkflowPreset`);\n make, open, change and delete one (`createWorkspaceWorkflow`, `getWorkspaceWorkflow`,\n `saveWorkspaceWorkflow`, `deleteWorkspaceWorkflow`) and copy it (`duplicateWorkspaceWorkflow`); publish\n it or discard the changes of its draft (`publishWorkspaceWorkflow`,\n `discardWorkspaceWorkflowChanges`); read and restore its versions (`listWorkspaceWorkflowVersions`,\n `getWorkspaceWorkflowVersion`, `restoreWorkspaceWorkflowVersion`); pause, resume, archive and unarchive it\n (`pauseWorkspaceWorkflow`, `resumeWorkspaceWorkflow`, `archiveWorkspaceWorkflow`,\n `unarchiveWorkspaceWorkflow`); and read its counts (`getWorkspaceWorkflowStats`). The workspace in each\n path is `personal`: a session has no other, and a path that names an organization is refused. What the\n session makes is filed for this managed user (`managedUserId`), the lists hold only this user's workflows,\n and it can reach only workflows made for this managed user; any other workflow, including one of yours\n or of another of your users, answers 404. A workflow can chain only the compositions you made for this\n managed user (tag them with `managedUserId`): one that belongs to anybody else is not available, and\n publishing a workflow that uses it is refused. A customer can have at most 50 workflows, and what a\n customer's session reads never says who published a version. A session cannot set who a workflow belongs\n to or which workspace it is in: a body with another field is refused with 403 and\n `EDITOR_SESSION_FIELD_NOT_ALLOWED`.\n\nEverything else is refused with 403 and `EDITOR_SESSION_ROUTE_NOT_ALLOWED`: a session cannot read your\naccount, make more sessions, change your presets or delete a composition, and a session without the `creator` surface cannot\ncreate or list compositions. Create the composition yourself with your API key, then open the editor on it.\n\nA session ends at `expiresAt` (at most four hours), when you end it (`revokeManagedUserEditorSession`),\nor when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at\nonce (`429 EDITOR_SESSION_LIMIT_REACHED`). A session that is bound to a web page (`allowedOrigin`) is\nrefused from any other origin.\n\nThe AI the session runs is paid for with your credits. Set `maxCredits` to hold the session to a number\nof them: once its generations have taken that many (a generation that fails is refunded and does not\ncount), the next one is refused with 402 and `EDITOR_SESSION_CREDIT_LIMIT_REACHED`, and the browser is told\nonly that the feature is not available right now. Without it, the limit Widgetic has set for your account\napplies when it has set one (the same limit for every session you make, and `maxCredits: null` asks for\nnone), and otherwise the credits of your account are the only ceiling. What each of your users' sessions\nhas spent is in `getManagedUserUsage`.\n\nEach call makes a new session. It does not take an `Idempotency-Key`: the answer holds the token, and\nthe token is never stored where a retry could read it back. The answer is sent with\n`Cache-Control: no-store`.\n","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /managed-users/{id}/editor-sessions","href":"/api-reference/managed-users/create-an-editor-session-for-a-managed-user","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n li: \"li\",\n p: \"p\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic’s editor\\npieces, such as the File Browser and the composition editor, without your API key ever reaching that\\nbrowser. Call this from your server when the page that hosts the editor opens, and hand the \", _jsx(_components.code, {\n children: \"token\"\n }), \" in\\nthe answer to that page.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The token is shown once. It starts with \", _jsx(_components.code, {\n children: \"wgt_ses_\"\n }), \" and the browser sends it as\\n\", _jsx(_components.code, {\n children: \"Authorization: Bearer \u003ctoken>\"\n }), \". It can do only what the \", _jsx(_components.code, {\n children: \"surfaces\"\n }), \" you name allow, and only for this\\nmanaged user:\"]\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"files\"\n }), \": upload a file (\", _jsx(_components.code, {\n children: \"uploadFile\"\n }), \") and list the files uploaded for this user (\", _jsx(_components.code, {\n children: \"listUploads\"\n }), \"). Every\\nfile is filed for this user and stored in your own storage destination, never in Widgetic’s: a file a\\ncustomer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not\\noptional, so no session, whatever its surfaces, can be made until you have set a destination\\n(\", _jsx(_components.code, {\n children: \"setPartnerStorageDestination\"\n }), \"); until then it is refused with 409 and \", _jsx(_components.code, {\n children: \"PARTNER_STORAGE_REQUIRED\"\n }), \", and\\nwhen the destination cannot be used with 503 and \", _jsx(_components.code, {\n children: \"STORAGE_DESTINATION_UNAVAILABLE\"\n }), \". A destination you\\nremove after the session was made stops its uploads too (the same 409; the browser is only told that\\nthe feature is not available right now). To keep a customer from uploading, leave \", _jsx(_components.code, {\n children: \"files\"\n }), \" out of the\\nsession and hand the editors your own media library instead (\", _jsx(_components.code, {\n children: \"mediaLibrary\"\n }), \").\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"editor\"\n }), \": edit one of this user’s compositions: read it (\", _jsx(_components.code, {\n children: \"getCompositionById\"\n }), \", its content, design,\\nembed settings and schemas), check a content change (\", _jsx(_components.code, {\n children: \"validateCompositionContent\"\n }), \"), and change its\\nname, content, design and embed settings (\", _jsx(_components.code, {\n children: \"updateComposition\"\n }), \", \", _jsx(_components.code, {\n children: \"setDynamicContent\"\n }), \"). For a widget that\\nanswers visitors’ questions from documents (the \", _jsx(_components.code, {\n children: \"ai-answers\"\n }), \" adapter), it also lists those documents,\\nadds one as text or as a file (a text file or a picture; a PDF once PDFs are read), and removes one\\n(\", _jsx(_components.code, {\n children: \"getAiAnswersKnowledge\"\n }), \", \", _jsx(_components.code, {\n children: \"addAiAnswersKnowledgeDocument\"\n }), \", \", _jsx(_components.code, {\n children: \"addAiAnswersKnowledgeFile\"\n }), \",\\n\", _jsx(_components.code, {\n children: \"removeAiAnswersKnowledgeDocument\"\n }), \"); adding costs no credits, and is limited for each of your users\\nseparately. It can reach\\nonly compositions you created for this managed user (tag them with \", _jsx(_components.code, {\n children: \"managedUserId\"\n }), \" when you create\\nthem); any other composition, including another of your users’, answers 404.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"creator\"\n }), \": use Widgetic’s widget creator for this user, including its AI. Draw on canvases and save\\nthem (\", _jsx(_components.code, {\n children: \"getAllCanvases\"\n }), \", \", _jsx(_components.code, {\n children: \"getCanvas\"\n }), \", \", _jsx(_components.code, {\n children: \"createCanvas\"\n }), \", \", _jsx(_components.code, {\n children: \"updateCanvas\"\n }), \", \", _jsx(_components.code, {\n children: \"previewDeleteCanvas\"\n }), \",\\n\", _jsx(_components.code, {\n children: \"deleteCanvas\"\n }), \"); make, change, copy and delete the widgets on them (\", _jsx(_components.code, {\n children: \"createWidget\"\n }), \", \", _jsx(_components.code, {\n children: \"getWidgets\"\n }), \",\\n\", _jsx(_components.code, {\n children: \"getWidgetsBatch\"\n }), \", \", _jsx(_components.code, {\n children: \"updateWidget\"\n }), \", \", _jsx(_components.code, {\n children: \"uploadWidgetThumbnail\"\n }), \", \", _jsx(_components.code, {\n children: \"duplicateWidget\"\n }), \", \", _jsx(_components.code, {\n children: \"deleteWidget\"\n }), \");\\nlist and make the compositions of a widget it built (\", _jsx(_components.code, {\n children: \"getAllCompositions\"\n }), \", \", _jsx(_components.code, {\n children: \"createComposition\"\n }), \"), which\\nis how it shows the widget with sample values; keep the\\nconversation of each widget (\", _jsx(_components.code, {\n children: \"getConversationsByWidgetId\"\n }), \", \", _jsx(_components.code, {\n children: \"createConversationForWidget\"\n }), \",\\n\", _jsx(_components.code, {\n children: \"updateConversation\"\n }), \", \", _jsx(_components.code, {\n children: \"getMessages\"\n }), \", \", _jsx(_components.code, {\n children: \"createMessage\"\n }), \", \", _jsx(_components.code, {\n children: \"updateMessage\"\n }), \", \", _jsx(_components.code, {\n children: \"restoreCheckpoint\"\n }), \"); and read a\\nwidget’s schemas and give it its repository (\", _jsx(_components.code, {\n children: \"getWidgetContentSchema\"\n }), \", \", _jsx(_components.code, {\n children: \"getWidgetDesignSchema\"\n }), \",\\n\", _jsx(_components.code, {\n children: \"updateWidgetRepository\"\n }), \"). The AI that builds a widget is part of it: list the models\\n(\", _jsx(_components.code, {\n children: \"listLlmModels\"\n }), \"), open the widget’s repository (\", _jsx(_components.code, {\n children: \"createRepository\"\n }), \",\\n\", _jsx(_components.code, {\n children: \"getRepository\"\n }), \"), start a generation and follow or cancel it (\", _jsx(_components.code, {\n children: \"generateCode\"\n }), \",\\n\", _jsx(_components.code, {\n children: \"streamOperationUpdates\"\n }), \", \", _jsx(_components.code, {\n children: \"getOperation\"\n }), \", \", _jsx(_components.code, {\n children: \"cancelOperation\"\n }), \"), build and preview the result\\n(\", _jsx(_components.code, {\n children: \"getWidgetRepositoryHead\"\n }), \", \", _jsx(_components.code, {\n children: \"buildWidgetFromRepo\"\n }), \", \", _jsx(_components.code, {\n children: \"previewWidgetVersion\"\n }), \"), publish a\\nversion of the widget and move between its versions (\", _jsx(_components.code, {\n children: \"publishBuiltWidget\"\n }), \",\\n\", _jsx(_components.code, {\n children: \"getWidgetPublishHistory\"\n }), \", \", _jsx(_components.code, {\n children: \"setWidgetPublishHistoryLive\"\n }), \", \", _jsx(_components.code, {\n children: \"renameWidgetPublishHistoryTitle\"\n }), \"), and\\nturn a stroke or a sentence into a decision (\", _jsx(_components.code, {\n children: \"recognizeShape\"\n }), \", \", _jsx(_components.code, {\n children: \"resolveDesignProperty\"\n }), \"). It can\\nalso offer the customer your presets as starting points: read them and ask for a copy for this customer\\n(\", _jsx(_components.code, {\n children: \"listMyPresets\"\n }), \", \", _jsx(_components.code, {\n children: \"copyMyPreset\"\n }), \"; you choose the presets with \", _jsx(_components.code, {\n children: \"setPartnerPreset\"\n }), \").\\nWhat the session makes is filed for this managed user, and the lists it reads hold only this user’s\\ncanvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories,\\nuploaded files and operations made for this managed user (tag the canvases and widgets you create\\nwith \", _jsx(_components.code, {\n children: \"managedUserId\"\n }), \"); any other canvas, widget, composition, conversation, message, repository, file\\nor operation, including another of your users’, answers 404. The creator also saves the composition\\nit is editing (\", _jsx(_components.code, {\n children: \"updateComposition\"\n }), \", from the \", _jsx(_components.code, {\n children: \"editor\"\n }), \" surface) and attaches pictures to its chat\\n(\", _jsx(_components.code, {\n children: \"uploadFile\"\n }), \", from the \", _jsx(_components.code, {\n children: \"files\"\n }), \" surface), and the surfaces do not imply one another: to open the\\nwhole creator for a user, ask for \", _jsx(_components.code, {\n children: \"creator\"\n }), \", \", _jsx(_components.code, {\n children: \"editor\"\n }), \" and \", _jsx(_components.code, {\n children: \"files\"\n }), \" together. A generation or a build\\none user starts can be followed and cancelled by that user and by you, never by another of your\\nusers. The AI is paid for by your account, as your own calls are: its credits and allowances are\\nyours. A session cannot make a widget public (publishing a version does not), file one under a\\nproject or an organization, or set anything the creator does not set: a body with another field is\\nrefused with 403 and \", _jsx(_components.code, {\n children: \"EDITOR_SESSION_FIELD_NOT_ALLOWED\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"workflows\"\n }), \": use Widgetic’s Workflows editor for this user. List their workflows and the compositions\\na workflow of theirs can chain (\", _jsx(_components.code, {\n children: \"listWorkspaceWorkflows\"\n }), \", \", _jsx(_components.code, {\n children: \"listWorkspaceWorkflowCompositionOptions\"\n }), \");\\nlist the starting points you offer them and make a workflow from one, which gives the user their own copy\\nof every widget it chains, a composition of their own on each copy, and a draft\\n(\", _jsx(_components.code, {\n children: \"listWorkspaceWorkflowPresets\"\n }), \", \", _jsx(_components.code, {\n children: \"createWorkspaceWorkflowFromPreset\"\n }), \"; you offer them with\\n\", _jsx(_components.code, {\n children: \"setPartnerWorkflowPreset\"\n }), \");\\nmake, open, change and delete one (\", _jsx(_components.code, {\n children: \"createWorkspaceWorkflow\"\n }), \", \", _jsx(_components.code, {\n children: \"getWorkspaceWorkflow\"\n }), \",\\n\", _jsx(_components.code, {\n children: \"saveWorkspaceWorkflow\"\n }), \", \", _jsx(_components.code, {\n children: \"deleteWorkspaceWorkflow\"\n }), \") and copy it (\", _jsx(_components.code, {\n children: \"duplicateWorkspaceWorkflow\"\n }), \"); publish\\nit or discard the changes of its draft (\", _jsx(_components.code, {\n children: \"publishWorkspaceWorkflow\"\n }), \",\\n\", _jsx(_components.code, {\n children: \"discardWorkspaceWorkflowChanges\"\n }), \"); read and restore its versions (\", _jsx(_components.code, {\n children: \"listWorkspaceWorkflowVersions\"\n }), \",\\n\", _jsx(_components.code, {\n children: \"getWorkspaceWorkflowVersion\"\n }), \", \", _jsx(_components.code, {\n children: \"restoreWorkspaceWorkflowVersion\"\n }), \"); pause, resume, archive and unarchive it\\n(\", _jsx(_components.code, {\n children: \"pauseWorkspaceWorkflow\"\n }), \", \", _jsx(_components.code, {\n children: \"resumeWorkspaceWorkflow\"\n }), \", \", _jsx(_components.code, {\n children: \"archiveWorkspaceWorkflow\"\n }), \",\\n\", _jsx(_components.code, {\n children: \"unarchiveWorkspaceWorkflow\"\n }), \"); and read its counts (\", _jsx(_components.code, {\n children: \"getWorkspaceWorkflowStats\"\n }), \"). The workspace in each\\npath is \", _jsx(_components.code, {\n children: \"personal\"\n }), \": a session has no other, and a path that names an organization is refused. What the\\nsession makes is filed for this managed user (\", _jsx(_components.code, {\n children: \"managedUserId\"\n }), \"), the lists hold only this user’s workflows,\\nand it can reach only workflows made for this managed user; any other workflow, including one of yours\\nor of another of your users, answers 404. A workflow can chain only the compositions you made for this\\nmanaged user (tag them with \", _jsx(_components.code, {\n children: \"managedUserId\"\n }), \"): one that belongs to anybody else is not available, and\\npublishing a workflow that uses it is refused. A customer can have at most 50 workflows, and what a\\ncustomer’s session reads never says who published a version. A session cannot set who a workflow belongs\\nto or which workspace it is in: a body with another field is refused with 403 and\\n\", _jsx(_components.code, {\n children: \"EDITOR_SESSION_FIELD_NOT_ALLOWED\"\n }), \".\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Everything else is refused with 403 and \", _jsx(_components.code, {\n children: \"EDITOR_SESSION_ROUTE_NOT_ALLOWED\"\n }), \": a session cannot read your\\naccount, make more sessions, change your presets or delete a composition, and a session without the \", _jsx(_components.code, {\n children: \"creator\"\n }), \" surface cannot\\ncreate or list compositions. Create the composition yourself with your API key, then open the editor on it.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"A session ends at \", _jsx(_components.code, {\n children: \"expiresAt\"\n }), \" (at most four hours), when you end it (\", _jsx(_components.code, {\n children: \"revokeManagedUserEditorSession\"\n }), \"),\\nor when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at\\nonce (\", _jsx(_components.code, {\n children: \"429 EDITOR_SESSION_LIMIT_REACHED\"\n }), \"). A session that is bound to a web page (\", _jsx(_components.code, {\n children: \"allowedOrigin\"\n }), \") is\\nrefused from any other origin.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The AI the session runs is paid for with your credits. Set \", _jsx(_components.code, {\n children: \"maxCredits\"\n }), \" to hold the session to a number\\nof them: once its generations have taken that many (a generation that fails is refunded and does not\\ncount), the next one is refused with 402 and \", _jsx(_components.code, {\n children: \"EDITOR_SESSION_CREDIT_LIMIT_REACHED\"\n }), \", and the browser is told\\nonly that the feature is not available right now. Without it, the limit Widgetic has set for your account\\napplies when it has set one (the same limit for every session you make, and \", _jsx(_components.code, {\n children: \"maxCredits: null\"\n }), \" asks for\\nnone), and otherwise the credits of your account are the only ceiling. What each of your users’ sessions\\nhas spent is in \", _jsx(_components.code, {\n children: \"getManagedUserUsage\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Each call makes a new session. It does not take an \", _jsx(_components.code, {\n children: \"Idempotency-Key\"\n }), \": the answer holds the token, and\\nthe token is never stored where a retry could read it back. The answer is sent with\\n\", _jsx(_components.code, {\n children: \"Cache-Control: no-store\"\n }), \".\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create an editor session for a managed user","description":"Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic's editor\npieces, such as the File Browser and the composition editor, without your API key ever reaching that\nbrowser. Call this from your server when the page that hosts the editor opens, and hand the `token` in\nthe answer to that page.\n\nThe token is shown once. It starts with `wgt_ses_` and the browser sends it as\n`Authorization: Bearer \u003ctoken>`. It can do only what the `surfaces` you name allow, and only for this\nmanaged user:\n\n- `files`: upload a file (`uploadFile`) and list the files uploaded for this user (`listUploads`). Every\n file is filed for this user and stored in your own storage destination, never in Widgetic's: a file a\n customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not\n optional, so no session, whatever its surfaces, can be made until you have set a destination\n (`setPartnerStorageDestination`); until then it is refused with 409 and `PARTNER_STORAGE_REQUIRED`, and\n when the destination cannot be used with 503 and `STORAGE_DESTINATION_UNAVAILABLE`. A destination you\n remove after the session was made stops its uploads too (the same 409; the browser is only told that\n the feature is not available right now). To keep a customer from uploading, leave `files` out of the\n session and hand the editors your own media library instead (`mediaLibrary`).\n- `editor`: edit one of this user's compositions: read it (`getCompositionById`, its content, design,\n embed settings and schemas), check a content change (`validateCompositionContent`), and change its\n name, content, design and embed settings (`updateComposition`, `setDynamicContent`). For a widget that\n answers visitors' questions from documents (the `ai-answers` adapter), it also lists those documents,\n adds one as text or as a file (a text file or a picture; a PDF once PDFs are read), and removes one\n (`getAiAnswersKnowledge`, `addAiAnswersKnowledgeDocument`, `addAiAnswersKnowledgeFile`,\n `removeAiAnswersKnowledgeDocument`); adding costs no credits, and is limited for each of your users\n separately. It can reach\n only compositions you created for this managed user (tag them with `managedUserId` when you create\n them); any other composition, including another of your users', answers 404.\n- `creator`: use Widgetic's widget creator for this user, including its AI. Draw on canvases and save\n them (`getAllCanvases`, `getCanvas`, `createCanvas`, `updateCanvas`, `previewDeleteCanvas`,\n `deleteCanvas`); make, change, copy and delete the widgets on them (`createWidget`, `getWidgets`,\n `getWidgetsBatch`, `updateWidget`, `uploadWidgetThumbnail`, `duplicateWidget`, `deleteWidget`);\n list and make the compositions of a widget it built (`getAllCompositions`, `createComposition`), which\n is how it shows the widget with sample values; keep the\n conversation of each widget (`getConversationsByWidgetId`, `createConversationForWidget`,\n `updateConversation`, `getMessages`, `createMessage`, `updateMessage`, `restoreCheckpoint`); and read a\n widget's schemas and give it its repository (`getWidgetContentSchema`, `getWidgetDesignSchema`,\n `updateWidgetRepository`). The AI that builds a widget is part of it: list the models\n (`listLlmModels`), open the widget's repository (`createRepository`,\n `getRepository`), start a generation and follow or cancel it (`generateCode`,\n `streamOperationUpdates`, `getOperation`, `cancelOperation`), build and preview the result\n (`getWidgetRepositoryHead`, `buildWidgetFromRepo`, `previewWidgetVersion`), publish a\n version of the widget and move between its versions (`publishBuiltWidget`,\n `getWidgetPublishHistory`, `setWidgetPublishHistoryLive`, `renameWidgetPublishHistoryTitle`), and\n turn a stroke or a sentence into a decision (`recognizeShape`, `resolveDesignProperty`). It can\n also offer the customer your presets as starting points: read them and ask for a copy for this customer\n (`listMyPresets`, `copyMyPreset`; you choose the presets with `setPartnerPreset`).\n What the session makes is filed for this managed user, and the lists it reads hold only this user's\n canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories,\n uploaded files and operations made for this managed user (tag the canvases and widgets you create\n with `managedUserId`); any other canvas, widget, composition, conversation, message, repository, file\n or operation, including another of your users', answers 404. The creator also saves the composition\n it is editing (`updateComposition`, from the `editor` surface) and attaches pictures to its chat\n (`uploadFile`, from the `files` surface), and the surfaces do not imply one another: to open the\n whole creator for a user, ask for `creator`, `editor` and `files` together. A generation or a build\n one user starts can be followed and cancelled by that user and by you, never by another of your\n users. The AI is paid for by your account, as your own calls are: its credits and allowances are\n yours. A session cannot make a widget public (publishing a version does not), file one under a\n project or an organization, or set anything the creator does not set: a body with another field is\n refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`.\n- `workflows`: use Widgetic's Workflows editor for this user. List their workflows and the compositions\n a workflow of theirs can chain (`listWorkspaceWorkflows`, `listWorkspaceWorkflowCompositionOptions`);\n list the starting points you offer them and make a workflow from one, which gives the user their own copy\n of every widget it chains, a composition of their own on each copy, and a draft\n (`listWorkspaceWorkflowPresets`, `createWorkspaceWorkflowFromPreset`; you offer them with\n `setPartnerWorkflowPreset`);\n make, open, change and delete one (`createWorkspaceWorkflow`, `getWorkspaceWorkflow`,\n `saveWorkspaceWorkflow`, `deleteWorkspaceWorkflow`) and copy it (`duplicateWorkspaceWorkflow`); publish\n it or discard the changes of its draft (`publishWorkspaceWorkflow`,\n `discardWorkspaceWorkflowChanges`); read and restore its versions (`listWorkspaceWorkflowVersions`,\n `getWorkspaceWorkflowVersion`, `restoreWorkspaceWorkflowVersion`); pause, resume, archive and unarchive it\n (`pauseWorkspaceWorkflow`, `resumeWorkspaceWorkflow`, `archiveWorkspaceWorkflow`,\n `unarchiveWorkspaceWorkflow`); and read its counts (`getWorkspaceWorkflowStats`). The workspace in each\n path is `personal`: a session has no other, and a path that names an organization is refused. What the\n session makes is filed for this managed user (`managedUserId`), the lists hold only this user's workflows,\n and it can reach only workflows made for this managed user; any other workflow, including one of yours\n or of another of your users, answers 404. A workflow can chain only the compositions you made for this\n managed user (tag them with `managedUserId`): one that belongs to anybody else is not available, and\n publishing a workflow that uses it is refused. A customer can have at most 50 workflows, and what a\n customer's session reads never says who published a version. A session cannot set who a workflow belongs\n to or which workspace it is in: a body with another field is refused with 403 and\n `EDITOR_SESSION_FIELD_NOT_ALLOWED`.\n\nEverything else is refused with 403 and `EDITOR_SESSION_ROUTE_NOT_ALLOWED`: a session cannot read your\naccount, make more sessions, change your presets or delete a composition, and a session without the `creator` surface cannot\ncreate or list compositions. Create the composition yourself with your API key, then open the editor on it.\n\nA session ends at `expiresAt` (at most four hours), when you end it (`revokeManagedUserEditorSession`),\nor when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at\nonce (`429 EDITOR_SESSION_LIMIT_REACHED`). A session that is bound to a web page (`allowedOrigin`) is\nrefused from any other origin.\n\nThe AI the session runs is paid for with your credits. Set `maxCredits` to hold the session to a number\nof them: once its generations have taken that many (a generation that fails is refunded and does not\ncount), the next one is refused with 402 and `EDITOR_SESSION_CREDIT_LIMIT_REACHED`, and the browser is told\nonly that the feature is not available right now. Without it, the limit Widgetic has set for your account\napplies when it has set one (the same limit for every session you make, and `maxCredits: null` asks for\nnone), and otherwise the credits of your account are the only ceiling. What each of your users' sessions\nhas spent is in `getManagedUserUsage`.\n\nEach call makes a new session. It does not take an `Idempotency-Key`: the answer holds the token, and\nthe token is never stored where a retry could read it back. The answer is sent with\n`Cache-Control: no-store`.\n","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /managed-users/{id}/editor-sessions","href":"/api-reference/managed-users/create-an-editor-session-for-a-managed-user","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/widgetic/a06e02caee24c9e4/scripts/check-openapi-drift.js","/_mintlify/custom/widgetic/cfc959b865109f94/scripts/generate-code-samples.js","/_mintlify/custom/widgetic/4108e10153588825/scripts/sync-openapi.js","/_mintlify/custom/widgetic/0b8b2a5de38f31ba/scripts/validate-links.js","/_mintlify/custom/widgetic/f948d1cc9e974f48/scripts/__tests__/agentDocsDrift.test.js","/_mintlify/custom/widgetic/5e269cd2108b7191/scripts/check-agent-docs-drift.js","/_mintlify/custom/widgetic/5905b4748e7acd3e/scripts/lib/agentDocsDrift.js","/_mintlify/custom/widgetic/d772e7a3506ca340/scripts/__tests__/openApiServerAddress.test.js","/_mintlify/custom/widgetic/6a746d19cf42793e/scripts/lib/openApiServerAddress.js"],"openApiReferenceData":{"operation":{"operationId":"createManagedUserEditorSession","summary":"Create an editor session for a managed user","description":"Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic's editor\npieces, such as the File Browser and the composition editor, without your API key ever reaching that\nbrowser. Call this from your server when the page that hosts the editor opens, and hand the `token` in\nthe answer to that page.\n\nThe token is shown once. It starts with `wgt_ses_` and the browser sends it as\n`Authorization: Bearer \u003ctoken>`. It can do only what the `surfaces` you name allow, and only for this\nmanaged user:\n\n- `files`: upload a file (`uploadFile`) and list the files uploaded for this user (`listUploads`). Every\n file is filed for this user and stored in your own storage destination, never in Widgetic's: a file a\n customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not\n optional, so no session, whatever its surfaces, can be made until you have set a destination\n (`setPartnerStorageDestination`); until then it is refused with 409 and `PARTNER_STORAGE_REQUIRED`, and\n when the destination cannot be used with 503 and `STORAGE_DESTINATION_UNAVAILABLE`. A destination you\n remove after the session was made stops its uploads too (the same 409; the browser is only told that\n the feature is not available right now). To keep a customer from uploading, leave `files` out of the\n session and hand the editors your own media library instead (`mediaLibrary`).\n- `editor`: edit one of this user's compositions: read it (`getCompositionById`, its content, design,\n embed settings and schemas), check a content change (`validateCompositionContent`), and change its\n name, content, design and embed settings (`updateComposition`, `setDynamicContent`). For a widget that\n answers visitors' questions from documents (the `ai-answers` adapter), it also lists those documents,\n adds one as text or as a file (a text file or a picture; a PDF once PDFs are read), and removes one\n (`getAiAnswersKnowledge`, `addAiAnswersKnowledgeDocument`, `addAiAnswersKnowledgeFile`,\n `removeAiAnswersKnowledgeDocument`); adding costs no credits, and is limited for each of your users\n separately. It can reach\n only compositions you created for this managed user (tag them with `managedUserId` when you create\n them); any other composition, including another of your users', answers 404.\n- `creator`: use Widgetic's widget creator for this user, including its AI. Draw on canvases and save\n them (`getAllCanvases`, `getCanvas`, `createCanvas`, `updateCanvas`, `previewDeleteCanvas`,\n `deleteCanvas`); make, change, copy and delete the widgets on them (`createWidget`, `getWidgets`,\n `getWidgetsBatch`, `updateWidget`, `uploadWidgetThumbnail`, `duplicateWidget`, `deleteWidget`);\n list and make the compositions of a widget it built (`getAllCompositions`, `createComposition`), which\n is how it shows the widget with sample values; keep the\n conversation of each widget (`getConversationsByWidgetId`, `createConversationForWidget`,\n `updateConversation`, `getMessages`, `createMessage`, `updateMessage`, `restoreCheckpoint`); and read a\n widget's schemas and give it its repository (`getWidgetContentSchema`, `getWidgetDesignSchema`,\n `updateWidgetRepository`). The AI that builds a widget is part of it: list the models\n (`listLlmModels`), open the widget's repository (`createRepository`,\n `getRepository`), start a generation and follow or cancel it (`generateCode`,\n `streamOperationUpdates`, `getOperation`, `cancelOperation`), build and preview the result\n (`getWidgetRepositoryHead`, `buildWidgetFromRepo`, `previewWidgetVersion`), publish a\n version of the widget and move between its versions (`publishBuiltWidget`,\n `getWidgetPublishHistory`, `setWidgetPublishHistoryLive`, `renameWidgetPublishHistoryTitle`), and\n turn a stroke or a sentence into a decision (`recognizeShape`, `resolveDesignProperty`). It can\n also offer the customer your presets as starting points: read them and ask for a copy for this customer\n (`listMyPresets`, `copyMyPreset`; you choose the presets with `setPartnerPreset`).\n What the session makes is filed for this managed user, and the lists it reads hold only this user's\n canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories,\n uploaded files and operations made for this managed user (tag the canvases and widgets you create\n with `managedUserId`); any other canvas, widget, composition, conversation, message, repository, file\n or operation, including another of your users', answers 404. The creator also saves the composition\n it is editing (`updateComposition`, from the `editor` surface) and attaches pictures to its chat\n (`uploadFile`, from the `files` surface), and the surfaces do not imply one another: to open the\n whole creator for a user, ask for `creator`, `editor` and `files` together. A generation or a build\n one user starts can be followed and cancelled by that user and by you, never by another of your\n users. The AI is paid for by your account, as your own calls are: its credits and allowances are\n yours. A session cannot make a widget public (publishing a version does not), file one under a\n project or an organization, or set anything the creator does not set: a body with another field is\n refused with 403 and `EDITOR_SESSION_FIELD_NOT_ALLOWED`.\n- `workflows`: use Widgetic's Workflows editor for this user. List their workflows and the compositions\n a workflow of theirs can chain (`listWorkspaceWorkflows`, `listWorkspaceWorkflowCompositionOptions`);\n list the starting points you offer them and make a workflow from one, which gives the user their own copy\n of every widget it chains, a composition of their own on each copy, and a draft\n (`listWorkspaceWorkflowPresets`, `createWorkspaceWorkflowFromPreset`; you offer them with\n `setPartnerWorkflowPreset`);\n make, open, change and delete one (`createWorkspaceWorkflow`, `getWorkspaceWorkflow`,\n `saveWorkspaceWorkflow`, `deleteWorkspaceWorkflow`) and copy it (`duplicateWorkspaceWorkflow`); publish\n it or discard the changes of its draft (`publishWorkspaceWorkflow`,\n `discardWorkspaceWorkflowChanges`); read and restore its versions (`listWorkspaceWorkflowVersions`,\n `getWorkspaceWorkflowVersion`, `restoreWorkspaceWorkflowVersion`); pause, resume, archive and unarchive it\n (`pauseWorkspaceWorkflow`, `resumeWorkspaceWorkflow`, `archiveWorkspaceWorkflow`,\n `unarchiveWorkspaceWorkflow`); and read its counts (`getWorkspaceWorkflowStats`). The workspace in each\n path is `personal`: a session has no other, and a path that names an organization is refused. What the\n session makes is filed for this managed user (`managedUserId`), the lists hold only this user's workflows,\n and it can reach only workflows made for this managed user; any other workflow, including one of yours\n or of another of your users, answers 404. A workflow can chain only the compositions you made for this\n managed user (tag them with `managedUserId`): one that belongs to anybody else is not available, and\n publishing a workflow that uses it is refused. A customer can have at most 50 workflows, and what a\n customer's session reads never says who published a version. A session cannot set who a workflow belongs\n to or which workspace it is in: a body with another field is refused with 403 and\n `EDITOR_SESSION_FIELD_NOT_ALLOWED`.\n\nEverything else is refused with 403 and `EDITOR_SESSION_ROUTE_NOT_ALLOWED`: a session cannot read your\naccount, make more sessions, change your presets or delete a composition, and a session without the `creator` surface cannot\ncreate or list compositions. Create the composition yourself with your API key, then open the editor on it.\n\nA session ends at `expiresAt` (at most four hours), when you end it (`revokeManagedUserEditorSession`),\nor when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at\nonce (`429 EDITOR_SESSION_LIMIT_REACHED`). A session that is bound to a web page (`allowedOrigin`) is\nrefused from any other origin.\n\nThe AI the session runs is paid for with your credits. Set `maxCredits` to hold the session to a number\nof them: once its generations have taken that many (a generation that fails is refunded and does not\ncount), the next one is refused with 402 and `EDITOR_SESSION_CREDIT_LIMIT_REACHED`, and the browser is told\nonly that the feature is not available right now. Without it, the limit Widgetic has set for your account\napplies when it has set one (the same limit for every session you make, and `maxCredits: null` asks for\nnone), and otherwise the credits of your account are the only ceiling. What each of your users' sessions\nhas spent is in `getManagedUserUsage`.\n\nEach call makes a new session. It does not take an `Idempotency-Key`: the answer holds the token, and\nthe token is never stored where a retry could read it back. The answer is sent with\n`Cache-Control: no-store`.\n","tags":["Managed Users"],"security":["6006b8c7-6cca-45e8-8414-ef3b70ad779f"],"x-access-level":"partner","x-visibility":"public","parameters":["16dc675f-f7e0-4f93-a29b-5e06284ae5d3"],"requestBody":"14f5c340-4859-406e-85ce-8ee3a1c7edf1","responses":{"201":"7ca82feb-3ebc-450e-ab04-b72cb04d04ab","400":"6dcc8065-f071-4eb9-815b-38841665b272","401":"b4859813-77ec-445e-bf0c-a3e48e668d39","403":"2d7cdac4-e978-404f-9d7d-61fcf16363c5","404":"59e048a2-db6e-4ad9-a146-2bab925c2983","409":"521a9aca-c00e-4e4f-8440-6ab169970f9b","429":"81ecb6db-d8e1-4a10-b2e8-cdca0e5fe864","503":"95bf7968-77cd-4e39-8516-0a66c2bc74a4"},"x-code-samples":[{"lang":"TypeScript","label":"TypeScript SDK","source":"import { Configuration, ManagedUsersApi } from '@widgetic/api-sdk-ts';\n\nconst managedUsersApi = new ManagedUsersApi(new Configuration({ apiKey: 'YOUR_API_KEY' }));\n\n// On your server, when the page that hosts the editor opens for one of your users:\nconst session = await managedUsersApi.createManagedUserEditorSession({\n id: managedUserId,\n newEditorSession: {\n surfaces: ['files', 'editor'],\n expiresInSeconds: 3600,\n allowedOrigin: 'https://app.example.com',\n maxCredits: 20\n }\n});\n\n// Send session.token to that user's browser, and nothing else of yours.\n"}],"method":"post","type":"path","servers":["8cdad7e2-72d7-448d-a767-c0ce9882d766"],"path":"/managed-users/{id}/editor-sessions","baseUrlOptions":["https://api.widgetic.com/v1"],"title":"Create an editor session for a managed user","codeSamples":[{"label":"TypeScript SDK","lang":"TypeScript","source":"import { Configuration, ManagedUsersApi } from '@widgetic/api-sdk-ts';\n\nconst managedUsersApi = new ManagedUsersApi(new Configuration({ apiKey: 'YOUR_API_KEY' }));\n\n// On your server, when the page that hosts the editor opens for one of your users:\nconst session = await managedUsersApi.createManagedUserEditorSession({\n id: managedUserId,\n newEditorSession: {\n surfaces: ['files', 'editor'],\n expiresInSeconds: 3600,\n allowedOrigin: 'https://app.example.com',\n maxCredits: 20\n }\n});\n\n// Send session.token to that user's browser, and nothing else of yours.\n"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{"16dc675f-f7e0-4f93-a29b-5e06284ae5d3":{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid","isRequired":true,"description":"The managed user the session is for (Widgetic's id for the user)","uniqueKey":"","typeLabel":"string\u003cuuid>"},"description":"The managed user the session is for (Widgetic's id for the user)"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["surfaces"],"properties":{"surfaces":{"type":"array","minItems":1,"items":{"type":"string","enum":["files","editor","creator","workflows"],"uniqueKey":"surfaces.items.[INDEX]","typeLabel":"enum\u003cstring>"},"description":"The pieces of Widgetic's editor the session may drive. `files` is the media library (the File Browser: upload a file, list the files uploaded for this user); what a user uploads is kept in your own storage destination. Partner storage is not optional: a session of any surface can be made only once you have set a destination up (`setPartnerStorageDestination`), and is refused with `409 PARTNER_STORAGE_REQUIRED` until then. `editor` is editing one of this user's compositions: read it, change its name, content, design and embed settings, read its schemas, and ask where to show it (`getCompositionPreview`: the widget's published page). `creator` is Widgetic's widget creator, with its drawing canvas and its AI: this user's canvases, the widgets on them and the conversation of each widget, the generation, build and publish calls that make a widget, and the compositions of those widgets (list, make). The surfaces do not imply one another: the whole creator also saves a composition (`editor`) and attaches pictures to its chat (`files`), so ask for `[\"creator\", \"editor\", \"files\"]`. `workflows` is the Workflows editor: this user's own workflows (list, make, make from one of your starting points, draw, publish, pause, resume, archive, delete, the version history and the counts) under `/workspaces/personal/workflows`, and the compositions made for this user, which are the only ones a workflow of theirs can chain. A workflow is filed under the user it was made for (`managedUserId`), and the session reaches nothing of another user's, nor of yours.\n","example":["files","editor"],"isRequired":true,"uniqueKey":"surfaces","typeLabel":"enum\u003cstring>[]"},"expiresInSeconds":{"type":"integer","minimum":60,"maximum":14400,"default":3600,"description":"How long the session lasts, in seconds. It cannot be extended; make a new session when it ends.","example":3600,"uniqueKey":"expiresInSeconds","typeLabel":"integer"},"allowedOrigin":{"oneOf":[{"type":"string","description":"Bind the session to one web page origin, such as `https://app.example.com` (no path; `http` is accepted only for `localhost`). The session is then refused from any other origin, and from a request that carries no `Origin` header. Leave it out for a session that can be used from anywhere, which is what a server-side caller needs.\n","example":"https://app.example.com","uniqueKey":"allowedOrigin.oneOf.0","typeLabel":"string"},{"type":"null","description":"Bind the session to one web page origin, such as `https://app.example.com` (no path; `http` is accepted only for `localhost`). The session is then refused from any other origin, and from a request that carries no `Origin` header. Leave it out for a session that can be used from anywhere, which is what a server-side caller needs.\n","example":"https://app.example.com","uniqueKey":"allowedOrigin.oneOf.1","typeLabel":"null"}],"uniqueKey":"allowedOrigin","typeLabel":"string | null"},"maxCredits":{"type":"integer","minimum":1,"maximum":1000000,"description":"The most credits this session may spend on Widgetic's AI, one credit being one generation. Once the operations it ran have taken that many, the next one is refused (402, `EDITOR_SESSION_CREDIT_LIMIT_REACHED`) and the browser is only told that the feature is not available right now. A generation that fails is refunded and does not count. Leave it out to get the limit Widgetic has set for your account, if it has set one (it sets none unless you ask), and otherwise no limit of its own, which leaves the credits of your account as the only ceiling. Send `null` to ask for no limit of its own even when a default is set.\n","example":20,"uniqueKey":"maxCredits","typeLabel":"integer"}},"example":{"surfaces":["files","editor"],"expiresInSeconds":3600,"allowedOrigin":"https://app.example.com","maxCredits":20},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"surfaces":["files","editor"],"expiresInSeconds":3600,"allowedOrigin":"https://app.example.com","maxCredits":20}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"7ca82feb-3ebc-450e-ab04-b72cb04d04ab":{"description":"The session, with its token (shown once)","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","description":"Always `true` on a success.","example":true,"isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"data":{"type":"object","description":"An editor session you have just made. `token` is shown once and cannot be read again: hand it to the browser of this one user and keep it out of logs and storage.\n","required":["token","sessionId","managedUserId","managedUserExternalId","surfaces","expiresAt","createdAt"],"properties":{"token":{"type":"string","description":"The credential the browser sends as `Authorization: Bearer \u003ctoken>`. It starts with `wgt_ses_`. It works only for the calls of the session's surfaces, only for this managed user's content, and only until `expiresAt`.\n","example":"wgt_ses_3q2-7wA9vJm5cH1xT0uY8pZkR4nLd6BfGeSoVi2tMqE","isRequired":true,"uniqueKey":"data.token","typeLabel":"string"},"sessionId":{"type":"string","format":"uuid","description":"Identifies the session, so you can end it (`revokeManagedUserEditorSession`). It is not a credential.","isRequired":true,"uniqueKey":"data.sessionId","typeLabel":"string\u003cuuid>"},"managedUserId":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"data.managedUserId","typeLabel":"string\u003cuuid>"},"managedUserExternalId":{"type":"string","description":"Your own identifier for the managed user","isRequired":true,"uniqueKey":"data.managedUserExternalId","typeLabel":"string"},"surfaces":{"type":"array","items":{"type":"string","enum":["files","editor","creator","workflows"],"uniqueKey":"data.surfaces.items.[INDEX]","typeLabel":"enum\u003cstring>"},"isRequired":true,"uniqueKey":"data.surfaces","typeLabel":"enum\u003cstring>[]"},"expiresAt":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"data.expiresAt","typeLabel":"string\u003cdate-time>"},"createdAt":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"data.createdAt","typeLabel":"string\u003cdate-time>"},"allowedOrigin":{"oneOf":[{"type":"string","description":"The web page origin the session is bound to, or null when it is not bound","uniqueKey":"data.allowedOrigin.oneOf.0","typeLabel":"string"},{"type":"null","description":"The web page origin the session is bound to, or null when it is not bound","uniqueKey":"data.allowedOrigin.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.allowedOrigin","typeLabel":"string | null"},"maxCredits":{"oneOf":[{"type":"integer","description":"The most credits the session may spend on Widgetic's AI (`max_credits`), or null when it has no limit of its own","uniqueKey":"data.maxCredits.oneOf.0","typeLabel":"integer"},{"type":"null","description":"The most credits the session may spend on Widgetic's AI (`max_credits`), or null when it has no limit of its own","uniqueKey":"data.maxCredits.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.maxCredits","typeLabel":"integer | null"}},"example":{"token":"wgt_ses_3q2-7wA9vJm5cH1xT0uY8pZkR4nLd6BfGeSoVi2tMqE","sessionId":"3fa85f64-5717-4562-b3fc-2c963f66afa6","managedUserId":"3fa85f64-5717-4562-b3fc-2c963f66afa6","managedUserExternalId":"Example managedUserExternalId","surfaces":[],"allowedOrigin":"Example allowedOrigin","maxCredits":42,"expiresAt":"2026-01-15T09:30:00.000Z","createdAt":"2026-01-15T09:30:00.000Z"},"isRequired":true,"uniqueKey":"data","typeLabel":"object"},"meta":{"type":"object","description":"Extra information about the answer: where a page sits in a list, the cursor of the next page, or warnings about a call that succeeded with a caveat.","additionalProperties":true,"properties":{"page":{"type":"integer","description":"The page that was read, counting from 1.","example":1,"uniqueKey":"meta.page","typeLabel":"integer"},"size":{"type":"integer","description":"How many items one page holds.","example":20,"uniqueKey":"meta.size","typeLabel":"integer"},"total":{"type":"integer","description":"How many items the whole list has.","example":135,"uniqueKey":"meta.total","typeLabel":"integer"},"limit":{"type":"integer","description":"The same as `size`.","example":20,"uniqueKey":"meta.limit","typeLabel":"integer"},"offset":{"type":"integer","description":"How many items come before this page.","example":0,"uniqueKey":"meta.offset","typeLabel":"integer"},"hasNextPage":{"type":"boolean","example":true,"uniqueKey":"meta.hasNextPage","typeLabel":"boolean"},"hasPreviousPage":{"type":"boolean","example":false,"uniqueKey":"meta.hasPreviousPage","typeLabel":"boolean"},"nextCursor":{"oneOf":[{"type":"string","description":"Pass this as `cursor` to read the next page of a list that is read by cursor. `null` on the last page.","uniqueKey":"meta.nextCursor.oneOf.0","typeLabel":"string"},{"type":"null","description":"Pass this as `cursor` to read the next page of a list that is read by cursor. `null` on the last page.","uniqueKey":"meta.nextCursor.oneOf.1","typeLabel":"null"}],"uniqueKey":"meta.nextCursor","typeLabel":"string | null"},"warnings":{"type":"array","items":{"type":"string","uniqueKey":"meta.warnings.items.[INDEX]","typeLabel":"string"},"description":"Things the call did not do, though it succeeded (for example a table that could not be created just now).","uniqueKey":"meta.warnings","typeLabel":"string[]"}},"uniqueKey":"meta","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":true,"data":{"token":"wgt_ses_3q2-7wA9vJm5cH1xT0uY8pZkR4nLd6BfGeSoVi2tMqE","sessionId":"3fa85f64-5717-4562-b3fc-2c963f66afa6","managedUserId":"3fa85f64-5717-4562-b3fc-2c963f66afa6","managedUserExternalId":"Example managedUserExternalId","surfaces":[],"allowedOrigin":"Example allowedOrigin","maxCredits":42,"expiresAt":"2026-01-15T09:30:00.000Z","createdAt":"2026-01-15T09:30:00.000Z"},"meta":{"page":1,"size":20,"total":135,"limit":20,"offset":0,"hasNextPage":true,"hasPreviousPage":false,"nextCursor":"\u003cstring>","warnings":["\u003cstring>"]}}}},"exampleType":"generated"}},"exampleType":"generated"},"6dcc8065-f071-4eb9-815b-38841665b272":{"description":"A surface is not one that exists, `expiresInSeconds` or `maxCredits` is out of range, or `allowedOrigin` is not an origin","content":{"application/json":{"schema":{"type":"object","required":["success","message","error"],"additionalProperties":true,"properties":{"success":{"type":"boolean","description":"Always `false` on a failure.","example":false,"isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"message":{"type":"string","description":"The same text as `error.message`, for a caller that reads one line.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error":{"type":"object","required":["code","message","timestamp"],"properties":{"code":{"type":"string","description":"Machine-readable error code.","example":"RESOURCE_NOT_FOUND","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable explanation.","example":"Composition not found","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"timestamp":{"type":"string","format":"date-time","example":"2026-10-15T10:00:00.000Z","isRequired":true,"uniqueKey":"error.timestamp","typeLabel":"string\u003cdate-time>"},"param":{"type":"string","description":"The field that caused the error, when one did.","example":"name","uniqueKey":"error.param","typeLabel":"string"},"docUrl":{"type":"string","description":"Where this error is explained.","uniqueKey":"error.docUrl","typeLabel":"string"},"suggestedAction":{"type":"string","description":"What to do about it.","uniqueKey":"error.suggestedAction","typeLabel":"string"},"retryAfter":{"type":"integer","description":"Seconds to wait before trying again (rate limits). The same number is in the `Retry-After` header.","example":60,"uniqueKey":"error.retryAfter","typeLabel":"integer"},"details":{"type":"object","additionalProperties":true,"description":"More about the error: the fields that failed, a limit that was reached.","uniqueKey":"error.details","typeLabel":"object"},"correlationId":{"type":"string","description":"Quote this when you ask support about the call.","example":"req_123e4567-e89b-12d3-a456-426614174000","uniqueKey":"error.correlationId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"message":"\u003cstring>","error":{"code":"RESOURCE_NOT_FOUND","message":"Composition not found","timestamp":"2026-10-15T10:00:00.000Z","param":"name","docUrl":"\u003cstring>","suggestedAction":"\u003cstring>","retryAfter":60,"details":{},"correlationId":"req_123e4567-e89b-12d3-a456-426614174000"}}}},"exampleType":"generated"}},"exampleType":"generated"},"b4859813-77ec-445e-bf0c-a3e48e668d39":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["success","message","error"],"additionalProperties":true,"properties":{"success":{"type":"boolean","description":"Always `false` on a failure.","example":false,"isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"message":{"type":"string","description":"The same text as `error.message`, for a caller that reads one line.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error":{"type":"object","required":["code","message","timestamp"],"properties":{"code":{"type":"string","description":"Machine-readable error code.","example":"RESOURCE_NOT_FOUND","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable explanation.","example":"Composition not found","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"timestamp":{"type":"string","format":"date-time","example":"2026-10-15T10:00:00.000Z","isRequired":true,"uniqueKey":"error.timestamp","typeLabel":"string\u003cdate-time>"},"param":{"type":"string","description":"The field that caused the error, when one did.","example":"name","uniqueKey":"error.param","typeLabel":"string"},"docUrl":{"type":"string","description":"Where this error is explained.","uniqueKey":"error.docUrl","typeLabel":"string"},"suggestedAction":{"type":"string","description":"What to do about it.","uniqueKey":"error.suggestedAction","typeLabel":"string"},"retryAfter":{"type":"integer","description":"Seconds to wait before trying again (rate limits). The same number is in the `Retry-After` header.","example":60,"uniqueKey":"error.retryAfter","typeLabel":"integer"},"details":{"type":"object","additionalProperties":true,"description":"More about the error: the fields that failed, a limit that was reached.","uniqueKey":"error.details","typeLabel":"object"},"correlationId":{"type":"string","description":"Quote this when you ask support about the call.","example":"req_123e4567-e89b-12d3-a456-426614174000","uniqueKey":"error.correlationId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"message":"\u003cstring>","error":{"code":"RESOURCE_NOT_FOUND","message":"Composition not found","timestamp":"2026-10-15T10:00:00.000Z","param":"name","docUrl":"\u003cstring>","suggestedAction":"\u003cstring>","retryAfter":60,"details":{},"correlationId":"req_123e4567-e89b-12d3-a456-426614174000"}}}},"exampleType":"generated"}},"exampleType":"generated"},"2d7cdac4-e978-404f-9d7d-61fcf16363c5":{"description":"Forbidden - the caller is not a partner, or Widgetic has switched editor sessions off for your account (`EDITOR_SESSIONS_DISABLED_FOR_PARTNER`)","content":{"application/json":{"schema":{"type":"object","required":["success","message","error"],"additionalProperties":true,"properties":{"success":{"type":"boolean","description":"Always `false` on a failure.","example":false,"isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"message":{"type":"string","description":"The same text as `error.message`, for a caller that reads one line.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error":{"type":"object","required":["code","message","timestamp"],"properties":{"code":{"type":"string","description":"Machine-readable error code.","example":"RESOURCE_NOT_FOUND","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable explanation.","example":"Composition not found","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"timestamp":{"type":"string","format":"date-time","example":"2026-10-15T10:00:00.000Z","isRequired":true,"uniqueKey":"error.timestamp","typeLabel":"string\u003cdate-time>"},"param":{"type":"string","description":"The field that caused the error, when one did.","example":"name","uniqueKey":"error.param","typeLabel":"string"},"docUrl":{"type":"string","description":"Where this error is explained.","uniqueKey":"error.docUrl","typeLabel":"string"},"suggestedAction":{"type":"string","description":"What to do about it.","uniqueKey":"error.suggestedAction","typeLabel":"string"},"retryAfter":{"type":"integer","description":"Seconds to wait before trying again (rate limits). The same number is in the `Retry-After` header.","example":60,"uniqueKey":"error.retryAfter","typeLabel":"integer"},"details":{"type":"object","additionalProperties":true,"description":"More about the error: the fields that failed, a limit that was reached.","uniqueKey":"error.details","typeLabel":"object"},"correlationId":{"type":"string","description":"Quote this when you ask support about the call.","example":"req_123e4567-e89b-12d3-a456-426614174000","uniqueKey":"error.correlationId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"message":"\u003cstring>","error":{"code":"RESOURCE_NOT_FOUND","message":"Composition not found","timestamp":"2026-10-15T10:00:00.000Z","param":"name","docUrl":"\u003cstring>","suggestedAction":"\u003cstring>","retryAfter":60,"details":{},"correlationId":"req_123e4567-e89b-12d3-a456-426614174000"}}}},"exampleType":"generated"}},"exampleType":"generated"},"59e048a2-db6e-4ad9-a146-2bab925c2983":{"description":"No managed user with this id on your account (`MANAGED_USER_NOT_FOUND`). Another partner's managed user answers 404 as well.","content":{"application/json":{"schema":{"type":"object","required":["success","message","error"],"additionalProperties":true,"properties":{"success":{"type":"boolean","description":"Always `false` on a failure.","example":false,"isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"message":{"type":"string","description":"The same text as `error.message`, for a caller that reads one line.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error":{"type":"object","required":["code","message","timestamp"],"properties":{"code":{"type":"string","description":"Machine-readable error code.","example":"RESOURCE_NOT_FOUND","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable explanation.","example":"Composition not found","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"timestamp":{"type":"string","format":"date-time","example":"2026-10-15T10:00:00.000Z","isRequired":true,"uniqueKey":"error.timestamp","typeLabel":"string\u003cdate-time>"},"param":{"type":"string","description":"The field that caused the error, when one did.","example":"name","uniqueKey":"error.param","typeLabel":"string"},"docUrl":{"type":"string","description":"Where this error is explained.","uniqueKey":"error.docUrl","typeLabel":"string"},"suggestedAction":{"type":"string","description":"What to do about it.","uniqueKey":"error.suggestedAction","typeLabel":"string"},"retryAfter":{"type":"integer","description":"Seconds to wait before trying again (rate limits). The same number is in the `Retry-After` header.","example":60,"uniqueKey":"error.retryAfter","typeLabel":"integer"},"details":{"type":"object","additionalProperties":true,"description":"More about the error: the fields that failed, a limit that was reached.","uniqueKey":"error.details","typeLabel":"object"},"correlationId":{"type":"string","description":"Quote this when you ask support about the call.","example":"req_123e4567-e89b-12d3-a456-426614174000","uniqueKey":"error.correlationId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"message":"\u003cstring>","error":{"code":"RESOURCE_NOT_FOUND","message":"Composition not found","timestamp":"2026-10-15T10:00:00.000Z","param":"name","docUrl":"\u003cstring>","suggestedAction":"\u003cstring>","retryAfter":60,"details":{},"correlationId":"req_123e4567-e89b-12d3-a456-426614174000"}}}},"exampleType":"generated"}},"exampleType":"generated"},"521a9aca-c00e-4e4f-8440-6ab169970f9b":{"description":"The managed user is switched off, so no session can be made for it (`MANAGED_USER_INACTIVE`); or you have not set a storage destination (`PARTNER_STORAGE_REQUIRED`)","content":{"application/json":{"schema":{"type":"object","required":["success","message","error"],"additionalProperties":true,"properties":{"success":{"type":"boolean","description":"Always `false` on a failure.","example":false,"isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"message":{"type":"string","description":"The same text as `error.message`, for a caller that reads one line.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error":{"type":"object","required":["code","message","timestamp"],"properties":{"code":{"type":"string","description":"Machine-readable error code.","example":"RESOURCE_NOT_FOUND","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable explanation.","example":"Composition not found","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"timestamp":{"type":"string","format":"date-time","example":"2026-10-15T10:00:00.000Z","isRequired":true,"uniqueKey":"error.timestamp","typeLabel":"string\u003cdate-time>"},"param":{"type":"string","description":"The field that caused the error, when one did.","example":"name","uniqueKey":"error.param","typeLabel":"string"},"docUrl":{"type":"string","description":"Where this error is explained.","uniqueKey":"error.docUrl","typeLabel":"string"},"suggestedAction":{"type":"string","description":"What to do about it.","uniqueKey":"error.suggestedAction","typeLabel":"string"},"retryAfter":{"type":"integer","description":"Seconds to wait before trying again (rate limits). The same number is in the `Retry-After` header.","example":60,"uniqueKey":"error.retryAfter","typeLabel":"integer"},"details":{"type":"object","additionalProperties":true,"description":"More about the error: the fields that failed, a limit that was reached.","uniqueKey":"error.details","typeLabel":"object"},"correlationId":{"type":"string","description":"Quote this when you ask support about the call.","example":"req_123e4567-e89b-12d3-a456-426614174000","uniqueKey":"error.correlationId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"message":"\u003cstring>","error":{"code":"RESOURCE_NOT_FOUND","message":"Composition not found","timestamp":"2026-10-15T10:00:00.000Z","param":"name","docUrl":"\u003cstring>","suggestedAction":"\u003cstring>","retryAfter":60,"details":{},"correlationId":"req_123e4567-e89b-12d3-a456-426614174000"}}}},"exampleType":"generated"}},"exampleType":"generated"},"81ecb6db-d8e1-4a10-b2e8-cdca0e5fe864":{"description":"The managed user already has the most live sessions allowed (`EDITOR_SESSION_LIMIT_REACHED`)","content":{"application/json":{"schema":{"type":"object","required":["success","message","error"],"additionalProperties":true,"properties":{"success":{"type":"boolean","description":"Always `false` on a failure.","example":false,"isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"message":{"type":"string","description":"The same text as `error.message`, for a caller that reads one line.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error":{"type":"object","required":["code","message","timestamp"],"properties":{"code":{"type":"string","description":"Machine-readable error code.","example":"RESOURCE_NOT_FOUND","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable explanation.","example":"Composition not found","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"timestamp":{"type":"string","format":"date-time","example":"2026-10-15T10:00:00.000Z","isRequired":true,"uniqueKey":"error.timestamp","typeLabel":"string\u003cdate-time>"},"param":{"type":"string","description":"The field that caused the error, when one did.","example":"name","uniqueKey":"error.param","typeLabel":"string"},"docUrl":{"type":"string","description":"Where this error is explained.","uniqueKey":"error.docUrl","typeLabel":"string"},"suggestedAction":{"type":"string","description":"What to do about it.","uniqueKey":"error.suggestedAction","typeLabel":"string"},"retryAfter":{"type":"integer","description":"Seconds to wait before trying again (rate limits). The same number is in the `Retry-After` header.","example":60,"uniqueKey":"error.retryAfter","typeLabel":"integer"},"details":{"type":"object","additionalProperties":true,"description":"More about the error: the fields that failed, a limit that was reached.","uniqueKey":"error.details","typeLabel":"object"},"correlationId":{"type":"string","description":"Quote this when you ask support about the call.","example":"req_123e4567-e89b-12d3-a456-426614174000","uniqueKey":"error.correlationId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"message":"\u003cstring>","error":{"code":"RESOURCE_NOT_FOUND","message":"Composition not found","timestamp":"2026-10-15T10:00:00.000Z","param":"name","docUrl":"\u003cstring>","suggestedAction":"\u003cstring>","retryAfter":60,"details":{},"correlationId":"req_123e4567-e89b-12d3-a456-426614174000"}}}},"exampleType":"generated"}},"exampleType":"generated"},"95bf7968-77cd-4e39-8516-0a66c2bc74a4":{"description":"Editor sessions are switched off for the moment (`EDITOR_SESSIONS_DISABLED`), or your storage destination cannot be used (`STORAGE_DESTINATION_UNAVAILABLE`). Try again later.","content":{"application/json":{"schema":{"type":"object","required":["success","message","error"],"additionalProperties":true,"properties":{"success":{"type":"boolean","description":"Always `false` on a failure.","example":false,"isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"message":{"type":"string","description":"The same text as `error.message`, for a caller that reads one line.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error":{"type":"object","required":["code","message","timestamp"],"properties":{"code":{"type":"string","description":"Machine-readable error code.","example":"RESOURCE_NOT_FOUND","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable explanation.","example":"Composition not found","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"timestamp":{"type":"string","format":"date-time","example":"2026-10-15T10:00:00.000Z","isRequired":true,"uniqueKey":"error.timestamp","typeLabel":"string\u003cdate-time>"},"param":{"type":"string","description":"The field that caused the error, when one did.","example":"name","uniqueKey":"error.param","typeLabel":"string"},"docUrl":{"type":"string","description":"Where this error is explained.","uniqueKey":"error.docUrl","typeLabel":"string"},"suggestedAction":{"type":"string","description":"What to do about it.","uniqueKey":"error.suggestedAction","typeLabel":"string"},"retryAfter":{"type":"integer","description":"Seconds to wait before trying again (rate limits). The same number is in the `Retry-After` header.","example":60,"uniqueKey":"error.retryAfter","typeLabel":"integer"},"details":{"type":"object","additionalProperties":true,"description":"More about the error: the fields that failed, a limit that was reached.","uniqueKey":"error.details","typeLabel":"object"},"correlationId":{"type":"string","description":"Quote this when you ask support about the call.","example":"req_123e4567-e89b-12d3-a456-426614174000","uniqueKey":"error.correlationId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"message":"\u003cstring>","error":{"code":"RESOURCE_NOT_FOUND","message":"Composition not found","timestamp":"2026-10-15T10:00:00.000Z","param":"name","docUrl":"\u003cstring>","suggestedAction":"\u003cstring>","retryAfter":60,"details":{},"correlationId":"req_123e4567-e89b-12d3-a456-426614174000"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"6006b8c7-6cca-45e8-8414-ef3b70ad779f":{"apiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","scopes":[],"schemeName":"apiKeyAuth"}}},"servers":{"8cdad7e2-72d7-448d-a767-c0ce9882d766":{"url":"https://api.widgetic.com/v1","description":"Production server","variables":{"env":{"default":"production","description":"Environment"},"apiUrl":{"default":"https://api.widgetic.com","description":"API URL"},"apiVersion":{"default":"/v1","description":"API Version path prefix"}}}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","scopes":[],"schemeName":"apiKeyAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"apiKeyAuth","name":"Authorization"}],"title":"apiKeyAuth"}]},"originalFileLocation":"openapi/widgetic-api-public.json"},"subdomain":"widgetic","siteName":"Widgetic","title":"Create an editor session for a managed user - Widgetic","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-08T14:06:37.010Z","originalFileLocation":"api-reference/managed-users/create-an-editor-session-for-a-managed-user.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic\u0026#x27;s editor pieces, such as the File Browser and the composition editor, without your API key ever reaching that browser. Call this from your server when the page that hosts the editor opens, and hand the token in the answer to that page. The token is shown once. It starts with wgt_ses_ and the browser sends it as Authorization: Bearer . It can do only what the surfaces you name allow, and only for this managed user: - files: upload a file (uploadFile) and list the files uploaded for this user (listUploads). Every file is filed for this user and stored in your own storage destination, never in Widgetic\u0026#x27;s: a file a customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not optional, so no session, whatever its surfaces, can be made until you have set a destination (setPartnerStorageDestination); until then it is refused with 409 and PARTNER_STORAGE_REQUIRED, and when the destination cannot be used with 503 and STORAGE_DESTINATION_UNAVAILABLE. A destination you remove after the session was made stops its uploads too (the same 409; the browser is only told that the feature is not available right now). To keep a customer from uploading, leave files out of the session and hand the editors your own media library instead (mediaLibrary). - editor: edit one of this user\u0026#x27;s compositions: read it (getCompositionById, its content, design, embed settings and schemas), check a content change (validateCompositionContent), and change its name, content, design and embed settings (updateComposition, setDynamicContent). For a widget that answers visitors\u0026#x27; questions from documents (the ai-answers adapter), it also lists those documents, adds one as text or as a file (a text file or a picture; a PDF once PDFs are read), and removes one (getAiAnswersKnowledge, addAiAnswersKnowledgeDocument, addAiAnswersKnowledgeFile, removeAiAnswersKnowledgeDocument); adding costs no credits, and is limited for each of your users separately. It can reach only compositions you created for this managed user (tag them with managedUserId when you create them); any other composition, including another of your users\u0026#x27;, answers 404. - creator: use Widgetic\u0026#x27;s widget creator for this user, including its AI. Draw on canvases and save them (getAllCanvases, getCanvas, createCanvas, updateCanvas, previewDeleteCanvas, deleteCanvas); make, change, copy and delete the widgets on them (createWidget, getWidgets, getWidgetsBatch, updateWidget, uploadWidgetThumbnail, duplicateWidget, deleteWidget); list and make the compositions of a widget it built (getAllCompositions, createComposition), which is how it shows the widget with sample values; keep the conversation of each widget (getConversationsByWidgetId, createConversationForWidget, updateConversation, getMessages, createMessage, updateMessage, restoreCheckpoint); and read a widget\u0026#x27;s schemas and give it its repository (getWidgetContentSchema, getWidgetDesignSchema, updateWidgetRepository). The AI that builds a widget is part of it: list the models (listLlmModels), open the widget\u0026#x27;s repository (createRepository, getRepository), start a generation and follow or cancel it (generateCode, streamOperationUpdates, getOperation, cancelOperation), build and preview the result (getWidgetRepositoryHead, buildWidgetFromRepo, previewWidgetVersion), publish a version of the widget and move between its versions (publishBuiltWidget, getWidgetPublishHistory, setWidgetPublishHistoryLive, renameWidgetPublishHistoryTitle), and turn a stroke or a sentence into a decision (recognizeShape, resolveDesignProperty). It can also offer the customer your presets as starting points: read them and ask for a copy for this customer (listMyPresets, copyMyPreset; you choose the presets with setPartnerPreset). What the session makes is filed for this managed user, and the lists it reads hold only this user\u0026#x27;s canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories, uploaded files and operations made for this managed user (tag the canvases and widgets you create with managedUserId); any other canvas, widget, composition, conversation, message, repository, file or operation, including another of your users\u0026#x27;, answers 404. The creator also saves the composition it is editing (updateComposition, from the editor surface) and attaches pictures to its chat (uploadFile, from the files surface), and the surfaces do not imply one another: to open the whole creator for a user, ask for creator, editor and files together. A generation or a build one user starts can be followed and cancelled by that user and by you, never by another of your users. The AI is paid for by your account, as your own calls are: its credits and allowances are yours. A session cannot make a widget public (publishing a version does not), file one under a project or an organization, or set anything the creator does not set: a body with another field is refused with 403 and EDITOR_SESSION_FIELD_NOT_ALLOWED. - workflows: use Widgetic\u0026#x27;s Workflows editor for this user. List their workflows and the compositions a workflow of theirs can chain (listWorkspaceWorkflows, listWorkspaceWorkflowCompositionOptions); list the starting points you offer them and make a workflow from one, which gives the user their own copy of every widget it chains, a composition of their own on each copy, and a draft (listWorkspaceWorkflowPresets, createWorkspaceWorkflowFromPreset; you offer them with setPartnerWorkflowPreset); make, open, change and delete one (createWorkspaceWorkflow, getWorkspaceWorkflow, saveWorkspaceWorkflow, deleteWorkspaceWorkflow) and copy it (duplicateWorkspaceWorkflow); publish it or discard the changes of its draft (publishWorkspaceWorkflow, discardWorkspaceWorkflowChanges); read and restore its versions (listWorkspaceWorkflowVersions, getWorkspaceWorkflowVersion, restoreWorkspaceWorkflowVersion); pause, resume, archive and unarchive it (pauseWorkspaceWorkflow, resumeWorkspaceWorkflow, archiveWorkspaceWorkflow, unarchiveWorkspaceWorkflow); and read its counts (getWorkspaceWorkflowStats). The workspace in each path is personal: a session has no other, and a path that names an organization is refused. What the session makes is filed for this managed user (managedUserId), the lists hold only this user\u0026#x27;s workflows, and it can reach only workflows made for this managed user; any other workflow, including one of yours or of another of your users, answers 404. A workflow can chain only the compositions you made for this managed user (tag them with managedUserId): one that belongs to anybody else is not available, and publishing a workflow that uses it is refused. A customer can have at most 50 workflows, and what a customer\u0026#x27;s session reads never says who published a version. A session cannot set who a workflow belongs to or which workspace it is in: a body with another field is refused with 403 and EDITOR_SESSION_FIELD_NOT_ALLOWED. Everything else is refused with 403 and EDITOR_SESSION_ROUTE_NOT_ALLOWED: a session cannot read your account, make more sessions, change your presets or delete a composition, and a session without the creator surface cannot create or list compositions. Create the composition yourself with your API key, then open the editor on it. A session ends at expiresAt (at most four hours), when you end it (revokeManagedUserEditorSession), or when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at once (429 EDITOR_SESSION_LIMIT_REACHED). A session that is bound to a web page (allowedOrigin) is refused from any other origin. The AI the session runs is paid for with your credits. Set maxCredits to hold the session to a number of them: once its generations have taken that many (a generation that fails is refunded and does not count), the next one is refused with 402 and EDITOR_SESSION_CREDIT_LIMIT_REACHED, and the browser is told only that the feature is not available right now. Without it, the limit Widgetic has set for your account applies when it has set one (the same limit for every session you make, and maxCredits: null asks for none), and otherwise the credits of your account are the only ceiling. What each of your users\u0026#x27; sessions has spent is in getManagedUserUsage. Each call makes a new session. It does not take an Idempotency-Key: the answer holds the token, and the token is never stored where a retry could read it back. The answer is sent with Cache-Control: no-store.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Widgetic\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/widgetic/U_OgbihBw7xJOURr/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/widgetic/U_OgbihBw7xJOURr/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/widgetic/U_OgbihBw7xJOURr/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/widgetic/U_OgbihBw7xJOURr/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/widgetic/U_OgbihBw7xJOURr/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/widgetic/U_OgbihBw7xJOURr/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/widgetic/U_OgbihBw7xJOURr/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/widgetic/U_OgbihBw7xJOURr/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/widgetic/U_OgbihBw7xJOURr/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create an editor session for a managed user - Widgetic\">\u003cmeta data-mint-head property=\"og:description\" content=\"Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic\u0026#x27;s editor pieces, such as the File Browser and the composition editor, without your API key ever reaching that browser. Call this from your server when the page that hosts the editor opens, and hand the token in the answer to that page. The token is shown once. It starts with wgt_ses_ and the browser sends it as Authorization: Bearer . It can do only what the surfaces you name allow, and only for this managed user: - files: upload a file (uploadFile) and list the files uploaded for this user (listUploads). Every file is filed for this user and stored in your own storage destination, never in Widgetic\u0026#x27;s: a file a customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not optional, so no session, whatever its surfaces, can be made until you have set a destination (setPartnerStorageDestination); until then it is refused with 409 and PARTNER_STORAGE_REQUIRED, and when the destination cannot be used with 503 and STORAGE_DESTINATION_UNAVAILABLE. A destination you remove after the session was made stops its uploads too (the same 409; the browser is only told that the feature is not available right now). To keep a customer from uploading, leave files out of the session and hand the editors your own media library instead (mediaLibrary). - editor: edit one of this user\u0026#x27;s compositions: read it (getCompositionById, its content, design, embed settings and schemas), check a content change (validateCompositionContent), and change its name, content, design and embed settings (updateComposition, setDynamicContent). For a widget that answers visitors\u0026#x27; questions from documents (the ai-answers adapter), it also lists those documents, adds one as text or as a file (a text file or a picture; a PDF once PDFs are read), and removes one (getAiAnswersKnowledge, addAiAnswersKnowledgeDocument, addAiAnswersKnowledgeFile, removeAiAnswersKnowledgeDocument); adding costs no credits, and is limited for each of your users separately. It can reach only compositions you created for this managed user (tag them with managedUserId when you create them); any other composition, including another of your users\u0026#x27;, answers 404. - creator: use Widgetic\u0026#x27;s widget creator for this user, including its AI. Draw on canvases and save them (getAllCanvases, getCanvas, createCanvas, updateCanvas, previewDeleteCanvas, deleteCanvas); make, change, copy and delete the widgets on them (createWidget, getWidgets, getWidgetsBatch, updateWidget, uploadWidgetThumbnail, duplicateWidget, deleteWidget); list and make the compositions of a widget it built (getAllCompositions, createComposition), which is how it shows the widget with sample values; keep the conversation of each widget (getConversationsByWidgetId, createConversationForWidget, updateConversation, getMessages, createMessage, updateMessage, restoreCheckpoint); and read a widget\u0026#x27;s schemas and give it its repository (getWidgetContentSchema, getWidgetDesignSchema, updateWidgetRepository). The AI that builds a widget is part of it: list the models (listLlmModels), open the widget\u0026#x27;s repository (createRepository, getRepository), start a generation and follow or cancel it (generateCode, streamOperationUpdates, getOperation, cancelOperation), build and preview the result (getWidgetRepositoryHead, buildWidgetFromRepo, previewWidgetVersion), publish a version of the widget and move between its versions (publishBuiltWidget, getWidgetPublishHistory, setWidgetPublishHistoryLive, renameWidgetPublishHistoryTitle), and turn a stroke or a sentence into a decision (recognizeShape, resolveDesignProperty). It can also offer the customer your presets as starting points: read them and ask for a copy for this customer (listMyPresets, copyMyPreset; you choose the presets with setPartnerPreset). What the session makes is filed for this managed user, and the lists it reads hold only this user\u0026#x27;s canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories, uploaded files and operations made for this managed user (tag the canvases and widgets you create with managedUserId); any other canvas, widget, composition, conversation, message, repository, file or operation, including another of your users\u0026#x27;, answers 404. The creator also saves the composition it is editing (updateComposition, from the editor surface) and attaches pictures to its chat (uploadFile, from the files surface), and the surfaces do not imply one another: to open the whole creator for a user, ask for creator, editor and files together. A generation or a build one user starts can be followed and cancelled by that user and by you, never by another of your users. The AI is paid for by your account, as your own calls are: its credits and allowances are yours. A session cannot make a widget public (publishing a version does not), file one under a project or an organization, or set anything the creator does not set: a body with another field is refused with 403 and EDITOR_SESSION_FIELD_NOT_ALLOWED. - workflows: use Widgetic\u0026#x27;s Workflows editor for this user. List their workflows and the compositions a workflow of theirs can chain (listWorkspaceWorkflows, listWorkspaceWorkflowCompositionOptions); list the starting points you offer them and make a workflow from one, which gives the user their own copy of every widget it chains, a composition of their own on each copy, and a draft (listWorkspaceWorkflowPresets, createWorkspaceWorkflowFromPreset; you offer them with setPartnerWorkflowPreset); make, open, change and delete one (createWorkspaceWorkflow, getWorkspaceWorkflow, saveWorkspaceWorkflow, deleteWorkspaceWorkflow) and copy it (duplicateWorkspaceWorkflow); publish it or discard the changes of its draft (publishWorkspaceWorkflow, discardWorkspaceWorkflowChanges); read and restore its versions (listWorkspaceWorkflowVersions, getWorkspaceWorkflowVersion, restoreWorkspaceWorkflowVersion); pause, resume, archive and unarchive it (pauseWorkspaceWorkflow, resumeWorkspaceWorkflow, archiveWorkspaceWorkflow, unarchiveWorkspaceWorkflow); and read its counts (getWorkspaceWorkflowStats). The workspace in each path is personal: a session has no other, and a path that names an organization is refused. What the session makes is filed for this managed user (managedUserId), the lists hold only this user\u0026#x27;s workflows, and it can reach only workflows made for this managed user; any other workflow, including one of yours or of another of your users, answers 404. A workflow can chain only the compositions you made for this managed user (tag them with managedUserId): one that belongs to anybody else is not available, and publishing a workflow that uses it is refused. A customer can have at most 50 workflows, and what a customer\u0026#x27;s session reads never says who published a version. A session cannot set who a workflow belongs to or which workspace it is in: a body with another field is refused with 403 and EDITOR_SESSION_FIELD_NOT_ALLOWED. Everything else is refused with 403 and EDITOR_SESSION_ROUTE_NOT_ALLOWED: a session cannot read your account, make more sessions, change your presets or delete a composition, and a session without the creator surface cannot create or list compositions. Create the composition yourself with your API key, then open the editor on it. A session ends at expiresAt (at most four hours), when you end it (revokeManagedUserEditorSession), or when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at once (429 EDITOR_SESSION_LIMIT_REACHED). A session that is bound to a web page (allowedOrigin) is refused from any other origin. The AI the session runs is paid for with your credits. Set maxCredits to hold the session to a number of them: once its generations have taken that many (a generation that fails is refunded and does not count), the next one is refused with 402 and EDITOR_SESSION_CREDIT_LIMIT_REACHED, and the browser is told only that the feature is not available right now. Without it, the limit Widgetic has set for your account applies when it has set one (the same limit for every session you make, and maxCredits: null asks for none), and otherwise the credits of your account are the only ceiling. What each of your users\u0026#x27; sessions has spent is in getManagedUserUsage. Each call makes a new session. It does not take an Idempotency-Key: the answer holds the token, and the token is never stored where a retry could read it back. The answer is sent with Cache-Control: no-store.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Widgetic\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://widgetic.com/api-reference/managed-users/create-an-editor-session-for-a-managed-user\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://widgetic.mintlify.site/_mintlify/api/og/v2?division=Managed+Users\u0026amp;title=Create+an+editor+session+for+a+managed+user\u0026amp;description=Makes+a+short-lived+credential+that+lets+the+browser+of+ONE+of+your+managed+users+use+Widgetic%27s+editor%0Apieces%2C+such+as+the+File+Browser+and+the+composition+edi\u0026amp;theme=7fb55fb4aca22bb80111c88a\u0026amp;signature=8d4da02ae5258aa9e1942d74de529fc01db3ef57c7477e9ce41f7eb3c7a5384d\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create an editor session for a managed user - Widgetic\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic\u0026#x27;s editor pieces, such as the File Browser and the composition editor, without your API key ever reaching that browser. Call this from your server when the page that hosts the editor opens, and hand the token in the answer to that page. The token is shown once. It starts with wgt_ses_ and the browser sends it as Authorization: Bearer . It can do only what the surfaces you name allow, and only for this managed user: - files: upload a file (uploadFile) and list the files uploaded for this user (listUploads). Every file is filed for this user and stored in your own storage destination, never in Widgetic\u0026#x27;s: a file a customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not optional, so no session, whatever its surfaces, can be made until you have set a destination (setPartnerStorageDestination); until then it is refused with 409 and PARTNER_STORAGE_REQUIRED, and when the destination cannot be used with 503 and STORAGE_DESTINATION_UNAVAILABLE. A destination you remove after the session was made stops its uploads too (the same 409; the browser is only told that the feature is not available right now). To keep a customer from uploading, leave files out of the session and hand the editors your own media library instead (mediaLibrary). - editor: edit one of this user\u0026#x27;s compositions: read it (getCompositionById, its content, design, embed settings and schemas), check a content change (validateCompositionContent), and change its name, content, design and embed settings (updateComposition, setDynamicContent). For a widget that answers visitors\u0026#x27; questions from documents (the ai-answers adapter), it also lists those documents, adds one as text or as a file (a text file or a picture; a PDF once PDFs are read), and removes one (getAiAnswersKnowledge, addAiAnswersKnowledgeDocument, addAiAnswersKnowledgeFile, removeAiAnswersKnowledgeDocument); adding costs no credits, and is limited for each of your users separately. It can reach only compositions you created for this managed user (tag them with managedUserId when you create them); any other composition, including another of your users\u0026#x27;, answers 404. - creator: use Widgetic\u0026#x27;s widget creator for this user, including its AI. Draw on canvases and save them (getAllCanvases, getCanvas, createCanvas, updateCanvas, previewDeleteCanvas, deleteCanvas); make, change, copy and delete the widgets on them (createWidget, getWidgets, getWidgetsBatch, updateWidget, uploadWidgetThumbnail, duplicateWidget, deleteWidget); list and make the compositions of a widget it built (getAllCompositions, createComposition), which is how it shows the widget with sample values; keep the conversation of each widget (getConversationsByWidgetId, createConversationForWidget, updateConversation, getMessages, createMessage, updateMessage, restoreCheckpoint); and read a widget\u0026#x27;s schemas and give it its repository (getWidgetContentSchema, getWidgetDesignSchema, updateWidgetRepository). The AI that builds a widget is part of it: list the models (listLlmModels), open the widget\u0026#x27;s repository (createRepository, getRepository), start a generation and follow or cancel it (generateCode, streamOperationUpdates, getOperation, cancelOperation), build and preview the result (getWidgetRepositoryHead, buildWidgetFromRepo, previewWidgetVersion), publish a version of the widget and move between its versions (publishBuiltWidget, getWidgetPublishHistory, setWidgetPublishHistoryLive, renameWidgetPublishHistoryTitle), and turn a stroke or a sentence into a decision (recognizeShape, resolveDesignProperty). It can also offer the customer your presets as starting points: read them and ask for a copy for this customer (listMyPresets, copyMyPreset; you choose the presets with setPartnerPreset). What the session makes is filed for this managed user, and the lists it reads hold only this user\u0026#x27;s canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories, uploaded files and operations made for this managed user (tag the canvases and widgets you create with managedUserId); any other canvas, widget, composition, conversation, message, repository, file or operation, including another of your users\u0026#x27;, answers 404. The creator also saves the composition it is editing (updateComposition, from the editor surface) and attaches pictures to its chat (uploadFile, from the files surface), and the surfaces do not imply one another: to open the whole creator for a user, ask for creator, editor and files together. A generation or a build one user starts can be followed and cancelled by that user and by you, never by another of your users. The AI is paid for by your account, as your own calls are: its credits and allowances are yours. A session cannot make a widget public (publishing a version does not), file one under a project or an organization, or set anything the creator does not set: a body with another field is refused with 403 and EDITOR_SESSION_FIELD_NOT_ALLOWED. - workflows: use Widgetic\u0026#x27;s Workflows editor for this user. List their workflows and the compositions a workflow of theirs can chain (listWorkspaceWorkflows, listWorkspaceWorkflowCompositionOptions); list the starting points you offer them and make a workflow from one, which gives the user their own copy of every widget it chains, a composition of their own on each copy, and a draft (listWorkspaceWorkflowPresets, createWorkspaceWorkflowFromPreset; you offer them with setPartnerWorkflowPreset); make, open, change and delete one (createWorkspaceWorkflow, getWorkspaceWorkflow, saveWorkspaceWorkflow, deleteWorkspaceWorkflow) and copy it (duplicateWorkspaceWorkflow); publish it or discard the changes of its draft (publishWorkspaceWorkflow, discardWorkspaceWorkflowChanges); read and restore its versions (listWorkspaceWorkflowVersions, getWorkspaceWorkflowVersion, restoreWorkspaceWorkflowVersion); pause, resume, archive and unarchive it (pauseWorkspaceWorkflow, resumeWorkspaceWorkflow, archiveWorkspaceWorkflow, unarchiveWorkspaceWorkflow); and read its counts (getWorkspaceWorkflowStats). The workspace in each path is personal: a session has no other, and a path that names an organization is refused. What the session makes is filed for this managed user (managedUserId), the lists hold only this user\u0026#x27;s workflows, and it can reach only workflows made for this managed user; any other workflow, including one of yours or of another of your users, answers 404. A workflow can chain only the compositions you made for this managed user (tag them with managedUserId): one that belongs to anybody else is not available, and publishing a workflow that uses it is refused. A customer can have at most 50 workflows, and what a customer\u0026#x27;s session reads never says who published a version. A session cannot set who a workflow belongs to or which workspace it is in: a body with another field is refused with 403 and EDITOR_SESSION_FIELD_NOT_ALLOWED. Everything else is refused with 403 and EDITOR_SESSION_ROUTE_NOT_ALLOWED: a session cannot read your account, make more sessions, change your presets or delete a composition, and a session without the creator surface cannot create or list compositions. Create the composition yourself with your API key, then open the editor on it. A session ends at expiresAt (at most four hours), when you end it (revokeManagedUserEditorSession), or when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at once (429 EDITOR_SESSION_LIMIT_REACHED). A session that is bound to a web page (allowedOrigin) is refused from any other origin. The AI the session runs is paid for with your credits. Set maxCredits to hold the session to a number of them: once its generations have taken that many (a generation that fails is refunded and does not count), the next one is refused with 402 and EDITOR_SESSION_CREDIT_LIMIT_REACHED, and the browser is told only that the feature is not available right now. Without it, the limit Widgetic has set for your account applies when it has set one (the same limit for every session you make, and maxCredits: null asks for none), and otherwise the credits of your account are the only ceiling. What each of your users\u0026#x27; sessions has spent is in getManagedUserUsage. Each call makes a new session. It does not take an Idempotency-Key: the answer holds the token, and the token is never stored where a retry could read it back. The answer is sent with Cache-Control: no-store.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://widgetic.mintlify.site/_mintlify/api/og/v2?division=Managed+Users\u0026amp;title=Create+an+editor+session+for+a+managed+user\u0026amp;description=Makes+a+short-lived+credential+that+lets+the+browser+of+ONE+of+your+managed+users+use+Widgetic%27s+editor%0Apieces%2C+such+as+the+File+Browser+and+the+composition+edi\u0026amp;theme=7fb55fb4aca22bb80111c88a\u0026amp;signature=8d4da02ae5258aa9e1942d74de529fc01db3ef57c7477e9ce41f7eb3c7a5384d\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/widgetic/U_OgbihBw7xJOURr/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Widgetic\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#324E30\">\u003clink data-mint-head rel=\"canonical\" href=\"https://widgetic.com/api-reference/managed-users/create-an-editor-session-for-a-managed-user\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/managed-users/create-an-editor-session-for-a-managed-user.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://widgetic.com/#organization\",\"name\":\"Widgetic\",\"url\":\"https://widgetic.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/widgetic/Od-pD6ChvIzhY_fR/brand/logo-light.svg?fit=max\u0026auto=format\u0026n=Od-pD6ChvIzhY_fR\u0026q=85\u0026s=c80ce649cc12d9f206a4ea5d3d2d9d31\"}},{\"@type\":\"WebSite\",\"@id\":\"https://widgetic.com#website\",\"name\":\"Widgetic\",\"url\":\"https://widgetic.com\",\"publisher\":{\"@id\":\"https://widgetic.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://widgetic.com/api-reference/managed-users/create-an-editor-session-for-a-managed-user#webpage\",\"url\":\"https://widgetic.com/api-reference/managed-users/create-an-editor-session-for-a-managed-user\",\"name\":\"Create an editor session for a managed user\",\"description\":\"Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic's editor pieces, such as the File Browser and the composition editor, without your API key ever reaching that browser. Call this from your server when the page that hosts the editor opens, and hand the token in the answer to that page. The token is shown once. It starts with wgt_ses_ and the browser sends it as Authorization: Bearer . It can do only what the surfaces you name allow, and only for this managed user: - files: upload a file (uploadFile) and list the files uploaded for this user (listUploads). Every file is filed for this user and stored in your own storage destination, never in Widgetic's: a file a customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not optional, so no session, whatever its surfaces, can be made until you have set a destination (setPartnerStorageDestination); until then it is refused with 409 and PARTNER_STORAGE_REQUIRED, and when the destination cannot be used with 503 and STORAGE_DESTINATION_UNAVAILABLE. A destination you remove after the session was made stops its uploads too (the same 409; the browser is only told that the feature is not available right now). To keep a customer from uploading, leave files out of the session and hand the editors your own media library instead (mediaLibrary). - editor: edit one of this user's compositions: read it (getCompositionById, its content, design, embed settings and schemas), check a content change (validateCompositionContent), and change its name, content, design and embed settings (updateComposition, setDynamicContent). For a widget that answers visitors' questions from documents (the ai-answers adapter), it also lists those documents, adds one as text or as a file (a text file or a picture; a PDF once PDFs are read), and removes one (getAiAnswersKnowledge, addAiAnswersKnowledgeDocument, addAiAnswersKnowledgeFile, removeAiAnswersKnowledgeDocument); adding costs no credits, and is limited for each of your users separately. It can reach only compositions you created for this managed user (tag them with managedUserId when you create them); any other composition, including another of your users', answers 404. - creator: use Widgetic's widget creator for this user, including its AI. Draw on canvases and save them (getAllCanvases, getCanvas, createCanvas, updateCanvas, previewDeleteCanvas, deleteCanvas); make, change, copy and delete the widgets on them (createWidget, getWidgets, getWidgetsBatch, updateWidget, uploadWidgetThumbnail, duplicateWidget, deleteWidget); list and make the compositions of a widget it built (getAllCompositions, createComposition), which is how it shows the widget with sample values; keep the conversation of each widget (getConversationsByWidgetId, createConversationForWidget, updateConversation, getMessages, createMessage, updateMessage, restoreCheckpoint); and read a widget's schemas and give it its repository (getWidgetContentSchema, getWidgetDesignSchema, updateWidgetRepository). The AI that builds a widget is part of it: list the models (listLlmModels), open the widget's repository (createRepository, getRepository), start a generation and follow or cancel it (generateCode, streamOperationUpdates, getOperation, cancelOperation), build and preview the result (getWidgetRepositoryHead, buildWidgetFromRepo, previewWidgetVersion), publish a version of the widget and move between its versions (publishBuiltWidget, getWidgetPublishHistory, setWidgetPublishHistoryLive, renameWidgetPublishHistoryTitle), and turn a stroke or a sentence into a decision (recognizeShape, resolveDesignProperty). It can also offer the customer your presets as starting points: read them and ask for a copy for this customer (listMyPresets, copyMyPreset; you choose the presets with setPartnerPreset). What the session makes is filed for this managed user, and the lists it reads hold only this user's canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories, uploaded files and operations made for this managed user (tag the canvases and widgets you create with managedUserId); any other canvas, widget, composition, conversation, message, repository, file or operation, including another of your users', answers 404. The creator also saves the composition it is editing (updateComposition, from the editor surface) and attaches pictures to its chat (uploadFile, from the files surface), and the surfaces do not imply one another: to open the whole creator for a user, ask for creator, editor and files together. A generation or a build one user starts can be followed and cancelled by that user and by you, never by another of your users. The AI is paid for by your account, as your own calls are: its credits and allowances are yours. A session cannot make a widget public (publishing a version does not), file one under a project or an organization, or set anything the creator does not set: a body with another field is refused with 403 and EDITOR_SESSION_FIELD_NOT_ALLOWED. - workflows: use Widgetic's Workflows editor for this user. List their workflows and the compositions a workflow of theirs can chain (listWorkspaceWorkflows, listWorkspaceWorkflowCompositionOptions); list the starting points you offer them and make a workflow from one, which gives the user their own copy of every widget it chains, a composition of their own on each copy, and a draft (listWorkspaceWorkflowPresets, createWorkspaceWorkflowFromPreset; you offer them with setPartnerWorkflowPreset); make, open, change and delete one (createWorkspaceWorkflow, getWorkspaceWorkflow, saveWorkspaceWorkflow, deleteWorkspaceWorkflow) and copy it (duplicateWorkspaceWorkflow); publish it or discard the changes of its draft (publishWorkspaceWorkflow, discardWorkspaceWorkflowChanges); read and restore its versions (listWorkspaceWorkflowVersions, getWorkspaceWorkflowVersion, restoreWorkspaceWorkflowVersion); pause, resume, archive and unarchive it (pauseWorkspaceWorkflow, resumeWorkspaceWorkflow, archiveWorkspaceWorkflow, unarchiveWorkspaceWorkflow); and read its counts (getWorkspaceWorkflowStats). The workspace in each path is personal: a session has no other, and a path that names an organization is refused. What the session makes is filed for this managed user (managedUserId), the lists hold only this user's workflows, and it can reach only workflows made for this managed user; any other workflow, including one of yours or of another of your users, answers 404. A workflow can chain only the compositions you made for this managed user (tag them with managedUserId): one that belongs to anybody else is not available, and publishing a workflow that uses it is refused. A customer can have at most 50 workflows, and what a customer's session reads never says who published a version. A session cannot set who a workflow belongs to or which workspace it is in: a body with another field is refused with 403 and EDITOR_SESSION_FIELD_NOT_ALLOWED. Everything else is refused with 403 and EDITOR_SESSION_ROUTE_NOT_ALLOWED: a session cannot read your account, make more sessions, change your presets or delete a composition, and a session without the creator surface cannot create or list compositions. Create the composition yourself with your API key, then open the editor on it. A session ends at expiresAt (at most four hours), when you end it (revokeManagedUserEditorSession), or when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at once (429 EDITOR_SESSION_LIMIT_REACHED). A session that is bound to a web page (allowedOrigin) is refused from any other origin. The AI the session runs is paid for with your credits. Set maxCredits to hold the session to a number of them: once its generations have taken that many (a generation that fails is refunded and does not count), the next one is refused with 402 and EDITOR_SESSION_CREDIT_LIMIT_REACHED, and the browser is told only that the feature is not available right now. Without it, the limit Widgetic has set for your account applies when it has set one (the same limit for every session you make, and maxCredits: null asks for none), and otherwise the credits of your account are the only ceiling. What each of your users' sessions has spent is in getManagedUserUsage. Each call makes a new session. It does not take an Idempotency-Key: the answer holds the token, and the token is never stored where a retry could read it back. The answer is sent with Cache-Control: no-store.\",\"dateModified\":\"2026-11-08T14:06:37.010Z\",\"isPartOf\":{\"@id\":\"https://widgetic.com#website\"},\"breadcrumb\":{\"@id\":\"https://widgetic.com/api-reference/managed-users/create-an-editor-session-for-a-managed-user#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://widgetic.com/api-reference/managed-users/create-an-editor-session-for-a-managed-user#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Managed Users\",\"item\":\"https://widgetic.com/api-reference/managed-users/get-managed-users\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create an editor session for a managed user\",\"item\":\"https://widgetic.com/api-reference/managed-users/create-an-editor-session-for-a-managed-user\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://widgetic.com/api-reference/managed-users/create-an-editor-session-for-a-managed-user#apireference\",\"headline\":\"Create an editor session for a managed user\",\"name\":\"Create an editor session for a managed user\",\"description\":\"Makes a short-lived credential that lets the browser of ONE of your managed users use Widgetic's editor pieces, such as the File Browser and the composition editor, without your API key ever reaching that browser. Call this from your server when the page that hosts the editor opens, and hand the token in the answer to that page. The token is shown once. It starts with wgt_ses_ and the browser sends it as Authorization: Bearer . It can do only what the surfaces you name allow, and only for this managed user: - files: upload a file (uploadFile) and list the files uploaded for this user (listUploads). Every file is filed for this user and stored in your own storage destination, never in Widgetic's: a file a customer uploads is yours to keep, and takes none of your storage allowance. Partner storage is not optional, so no session, whatever its surfaces, can be made until you have set a destination (setPartnerStorageDestination); until then it is refused with 409 and PARTNER_STORAGE_REQUIRED, and when the destination cannot be used with 503 and STORAGE_DESTINATION_UNAVAILABLE. A destination you remove after the session was made stops its uploads too (the same 409; the browser is only told that the feature is not available right now). To keep a customer from uploading, leave files out of the session and hand the editors your own media library instead (mediaLibrary). - editor: edit one of this user's compositions: read it (getCompositionById, its content, design, embed settings and schemas), check a content change (validateCompositionContent), and change its name, content, design and embed settings (updateComposition, setDynamicContent). For a widget that answers visitors' questions from documents (the ai-answers adapter), it also lists those documents, adds one as text or as a file (a text file or a picture; a PDF once PDFs are read), and removes one (getAiAnswersKnowledge, addAiAnswersKnowledgeDocument, addAiAnswersKnowledgeFile, removeAiAnswersKnowledgeDocument); adding costs no credits, and is limited for each of your users separately. It can reach only compositions you created for this managed user (tag them with managedUserId when you create them); any other composition, including another of your users', answers 404. - creator: use Widgetic's widget creator for this user, including its AI. Draw on canvases and save them (getAllCanvases, getCanvas, createCanvas, updateCanvas, previewDeleteCanvas, deleteCanvas); make, change, copy and delete the widgets on them (createWidget, getWidgets, getWidgetsBatch, updateWidget, uploadWidgetThumbnail, duplicateWidget, deleteWidget); list and make the compositions of a widget it built (getAllCompositions, createComposition), which is how it shows the widget with sample values; keep the conversation of each widget (getConversationsByWidgetId, createConversationForWidget, updateConversation, getMessages, createMessage, updateMessage, restoreCheckpoint); and read a widget's schemas and give it its repository (getWidgetContentSchema, getWidgetDesignSchema, updateWidgetRepository). The AI that builds a widget is part of it: list the models (listLlmModels), open the widget's repository (createRepository, getRepository), start a generation and follow or cancel it (generateCode, streamOperationUpdates, getOperation, cancelOperation), build and preview the result (getWidgetRepositoryHead, buildWidgetFromRepo, previewWidgetVersion), publish a version of the widget and move between its versions (publishBuiltWidget, getWidgetPublishHistory, setWidgetPublishHistoryLive, renameWidgetPublishHistoryTitle), and turn a stroke or a sentence into a decision (recognizeShape, resolveDesignProperty). It can also offer the customer your presets as starting points: read them and ask for a copy for this customer (listMyPresets, copyMyPreset; you choose the presets with setPartnerPreset). What the session makes is filed for this managed user, and the lists it reads hold only this user's canvases, widgets and compositions. It can reach only canvases, widgets, compositions, repositories, uploaded files and operations made for this managed user (tag the canvases and widgets you create with managedUserId); any other canvas, widget, composition, conversation, message, repository, file or operation, including another of your users', answers 404. The creator also saves the composition it is editing (updateComposition, from the editor surface) and attaches pictures to its chat (uploadFile, from the files surface), and the surfaces do not imply one another: to open the whole creator for a user, ask for creator, editor and files together. A generation or a build one user starts can be followed and cancelled by that user and by you, never by another of your users. The AI is paid for by your account, as your own calls are: its credits and allowances are yours. A session cannot make a widget public (publishing a version does not), file one under a project or an organization, or set anything the creator does not set: a body with another field is refused with 403 and EDITOR_SESSION_FIELD_NOT_ALLOWED. - workflows: use Widgetic's Workflows editor for this user. List their workflows and the compositions a workflow of theirs can chain (listWorkspaceWorkflows, listWorkspaceWorkflowCompositionOptions); list the starting points you offer them and make a workflow from one, which gives the user their own copy of every widget it chains, a composition of their own on each copy, and a draft (listWorkspaceWorkflowPresets, createWorkspaceWorkflowFromPreset; you offer them with setPartnerWorkflowPreset); make, open, change and delete one (createWorkspaceWorkflow, getWorkspaceWorkflow, saveWorkspaceWorkflow, deleteWorkspaceWorkflow) and copy it (duplicateWorkspaceWorkflow); publish it or discard the changes of its draft (publishWorkspaceWorkflow, discardWorkspaceWorkflowChanges); read and restore its versions (listWorkspaceWorkflowVersions, getWorkspaceWorkflowVersion, restoreWorkspaceWorkflowVersion); pause, resume, archive and unarchive it (pauseWorkspaceWorkflow, resumeWorkspaceWorkflow, archiveWorkspaceWorkflow, unarchiveWorkspaceWorkflow); and read its counts (getWorkspaceWorkflowStats). The workspace in each path is personal: a session has no other, and a path that names an organization is refused. What the session makes is filed for this managed user (managedUserId), the lists hold only this user's workflows, and it can reach only workflows made for this managed user; any other workflow, including one of yours or of another of your users, answers 404. A workflow can chain only the compositions you made for this managed user (tag them with managedUserId): one that belongs to anybody else is not available, and publishing a workflow that uses it is refused. A customer can have at most 50 workflows, and what a customer's session reads never says who published a version. A session cannot set who a workflow belongs to or which workspace it is in: a body with another field is refused with 403 and EDITOR_SESSION_FIELD_NOT_ALLOWED. Everything else is refused with 403 and EDITOR_SESSION_ROUTE_NOT_ALLOWED: a session cannot read your account, make more sessions, change your presets or delete a composition, and a session without the creator surface cannot create or list compositions. Create the composition yourself with your API key, then open the editor on it. A session ends at expiresAt (at most four hours), when you end it (revokeManagedUserEditorSession), or when the managed user is switched off or deleted. A managed user can have at most 100 live sessions at once (429 EDITOR_SESSION_LIMIT_REACHED). A session that is bound to a web page (allowedOrigin) is refused from any other origin. The AI the session runs is paid for with your credits. Set maxCredits to hold the session to a number of them: once its generations have taken that many (a generation that fails is refunded and does not count), the next one is refused with 402 and EDITOR_SESSION_CREDIT_LIMIT_REACHED, and the browser is told only that the feature is not available right now. Without it, the limit Widgetic has set for your account applies when it has set one (the same limit for every session you make, and maxCredits: null asks for none), and otherwise the credits of your account are the only ceiling. What each of your users' sessions has spent is in getManagedUserUsage. Each call makes a new session. It does not take an Idempotency-Key: the answer holds the token, and the token is never stored where a retry could read it back. The answer is sent with Cache-Control: no-store.\",\"url\":\"https://widgetic.com/api-reference/managed-users/create-an-editor-session-for-a-managed-user\",\"mainEntityOfPage\":{\"@id\":\"https://widgetic.com/api-reference/managed-users/create-an-editor-session-for-a-managed-user#webpage\"},\"dateModified\":\"2026-11-08T14:06:37.010Z\",\"publisher\":{\"@id\":\"https://widgetic.com/#organization\"},\"isPartOf\":{\"@id\":\"https://widgetic.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Widgetic\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Widgetic\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/managed-users/create-an-editor-session-for-a-managed-user.md","siteName":"Widgetic","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/docs/introduction"}]},{"tab":"API Reference","groups":[{"group":"API Reference","pages":[{"title":"API Reference Introduction","href":"/api-reference/introduction"},{"title":"Pagination","href":"/api-reference/pagination"},{"title":"Usage Limits","href":"/api-reference/usage-limits"},{"title":"Errors","href":"/api-reference/errors"}]},{"group":"Public Embed","pages":[{"title":"Append a visitor entry through the gateway","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /embed/compositions/{compositionId}/entries/{table}","href":"/api-reference/public-embed/append-a-visitor-entry-through-the-gateway"},{"title":"Read the published Workflow of an embed","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /embed/workflows/{workflowId}","href":"/api-reference/public-embed/read-the-published-workflow-of-an-embed"},{"title":"Read one published version of a Workflow","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /embed/workflows/{workflowId}/versions/{versionId}","href":"/api-reference/public-embed/read-one-published-version-of-a-workflow"},{"title":"Report what visitors did in a Workflow, as counts","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /embed/workflows/{workflowId}/events","href":"/api-reference/public-embed/report-what-visitors-did-in-a-workflow-as-counts"},{"title":"Show a published Workflow in a page of its own","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /embed/workflows/{workflowId}/frame","href":"/api-reference/public-embed/show-a-published-workflow-in-a-page-of-its-own"},{"title":"Resolve a composition UUID to a published widget URL","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /embed/compositions/{compositionId}","href":"/api-reference/public-embed/resolve-a-composition-uuid-to-a-published-widget-url"},{"title":"Embed a published composition with its saved values","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /embed/compositions/{compositionId}/frame","href":"/api-reference/public-embed/embed-a-published-composition-with-its-saved-values"},{"title":"Batch-check whether compositions are currently served for embed","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /embed/compositions/status","href":"/api-reference/public-embed/batch-check-whether-compositions-are-currently-served-for-embed"},{"title":"Call a gateway operation of an adapter a published widget uses","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /embed/compositions/{compositionId}/adapters/{adapterId}/{operation}","href":"/api-reference/public-embed/call-a-gateway-operation-of-an-adapter-a-published-widget-uses"},{"title":"Send the file a visitor chose through the upload adapter of a published widget","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /embed/compositions/{compositionId}/adapters/upload/files/{ticket}","href":"/api-reference/public-embed/send-the-file-a-visitor-chose-through-the-upload-adapter-of-a-published-widget"}]},{"group":"Workflows","pages":[{"title":"List the compositions a workflow can show, and what each can do","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /workspaces/{workspaceId}/workflows/composition-options","href":"/api-reference/workflows/list-the-compositions-a-workflow-can-show-and-what-each-can-do"},{"title":"List the starting points for a new Workflow","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /workspaces/{workspaceId}/workflows/presets","href":"/api-reference/workflows/list-the-starting-points-for-a-new-workflow"},{"title":"Start a Workflow from a starting point","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /workspaces/{workspaceId}/workflows/from-preset","href":"/api-reference/workflows/start-a-workflow-from-a-starting-point"},{"title":"List the Workflows of a Workspace","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /workspaces/{workspaceId}/workflows","href":"/api-reference/workflows/list-the-workflows-of-a-workspace"},{"title":"Create a Workflow","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /workspaces/{workspaceId}/workflows","href":"/api-reference/workflows/create-a-workflow"},{"title":"Get a Workflow","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /workspaces/{workspaceId}/workflows/{workflowId}","href":"/api-reference/workflows/get-a-workflow"},{"title":"Save the Draft of a Workflow","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /workspaces/{workspaceId}/workflows/{workflowId}","href":"/api-reference/workflows/save-the-draft-of-a-workflow"},{"title":"Delete a Workflow","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json delete /workspaces/{workspaceId}/workflows/{workflowId}","href":"/api-reference/workflows/delete-a-workflow"},{"title":"Duplicate a Workflow","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /workspaces/{workspaceId}/workflows/{workflowId}/duplicate","href":"/api-reference/workflows/duplicate-a-workflow"},{"title":"Publish the Draft of a Workflow","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /workspaces/{workspaceId}/workflows/{workflowId}/publish","href":"/api-reference/workflows/publish-the-draft-of-a-workflow"},{"title":"Discard the Unpublished Changes of a Workflow","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /workspaces/{workspaceId}/workflows/{workflowId}/discard","href":"/api-reference/workflows/discard-the-unpublished-changes-of-a-workflow"},{"title":"List the Published Versions of a Workflow","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /workspaces/{workspaceId}/workflows/{workflowId}/versions","href":"/api-reference/workflows/list-the-published-versions-of-a-workflow"},{"title":"Get a Published Version of a Workflow","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /workspaces/{workspaceId}/workflows/{workflowId}/versions/{versionId}","href":"/api-reference/workflows/get-a-published-version-of-a-workflow"},{"title":"Restore a Version of a Workflow into the Draft","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /workspaces/{workspaceId}/workflows/{workflowId}/versions/{versionId}/restore","href":"/api-reference/workflows/restore-a-version-of-a-workflow-into-the-draft"},{"title":"Pause a Workflow","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /workspaces/{workspaceId}/workflows/{workflowId}/pause","href":"/api-reference/workflows/pause-a-workflow"},{"title":"Resume a Paused Workflow","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /workspaces/{workspaceId}/workflows/{workflowId}/resume","href":"/api-reference/workflows/resume-a-paused-workflow"},{"title":"Archive a Workflow","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /workspaces/{workspaceId}/workflows/{workflowId}/archive","href":"/api-reference/workflows/archive-a-workflow"},{"title":"Unarchive a Workflow","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /workspaces/{workspaceId}/workflows/{workflowId}/unarchive","href":"/api-reference/workflows/unarchive-a-workflow"},{"title":"Get what Visitors Did in a Workflow","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /workspaces/{workspaceId}/workflows/{workflowId}/stats","href":"/api-reference/workflows/get-what-visitors-did-in-a-workflow"}]},{"group":"Partners","pages":[{"title":"List the workflows a partner offers as places to start","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /partners/{partnerId}/workflow-presets","href":"/api-reference/partners/list-the-workflows-a-partner-offers-as-places-to-start"},{"title":"Offer a workflow as a place to start, or replace what a key offers","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /partners/{partnerId}/workflow-presets/{key}","href":"/api-reference/partners/offer-a-workflow-as-a-place-to-start-or-replace-what-a-key-offers"},{"title":"Stop offering a workflow as a place to start","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json delete /partners/{partnerId}/workflow-presets/{key}","href":"/api-reference/partners/stop-offering-a-workflow-as-a-place-to-start"},{"title":"Find the partner you administer","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /partners/mine","href":"/api-reference/partners/find-the-partner-you-administer"},{"title":"Get partner credit balance","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /partners/{partnerId}/credits/balance","href":"/api-reference/partners/get-partner-credit-balance"},{"title":"Get partner credit transaction history","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /partners/{partnerId}/credits/transactions","href":"/api-reference/partners/get-partner-credit-transaction-history"},{"title":"Buy extra credits for a partner","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /partners/{partnerId}/credits/extra-invoice","href":"/api-reference/partners/buy-extra-credits-for-a-partner"},{"title":"Get comprehensive partner billing overview","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /partners/{partnerId}/billing-overview","href":"/api-reference/partners/get-comprehensive-partner-billing-overview"},{"title":"Get a partner's contract","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /partners/{partnerId}/contract","href":"/api-reference/partners/get-a-partners-contract"},{"title":"Get where a partner's uploaded files are stored","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /partners/{partnerId}/storage","href":"/api-reference/partners/get-where-a-partners-uploaded-files-are-stored"},{"title":"Set where a partner's uploaded files are stored","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /partners/{partnerId}/storage","href":"/api-reference/partners/set-where-a-partners-uploaded-files-are-stored"},{"title":"Stop storing a partner's uploaded files in its own bucket","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json delete /partners/{partnerId}/storage","href":"/api-reference/partners/stop-storing-a-partners-uploaded-files-in-its-own-bucket"},{"title":"Check that a partner's storage destination still works","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /partners/{partnerId}/storage/verify","href":"/api-reference/partners/check-that-a-partners-storage-destination-still-works"},{"title":"List the widgets a partner offers as presets","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /partners/{partnerId}/presets","href":"/api-reference/partners/list-the-widgets-a-partner-offers-as-presets"},{"title":"Make a widget a preset, or replace a preset","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /partners/{partnerId}/presets/{key}","href":"/api-reference/partners/make-a-widget-a-preset-or-replace-a-preset"},{"title":"Take a widget off the partner's presets","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json delete /partners/{partnerId}/presets/{key}","href":"/api-reference/partners/take-a-widget-off-the-partners-presets"},{"title":"Read partner-wide design defaults","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /partners/{partnerId}/design-defaults","href":"/api-reference/partners/read-partner-wide-design-defaults"},{"title":"Set or clear partner-wide design defaults","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /partners/{partnerId}/design-defaults","href":"/api-reference/partners/set-or-clear-partner-wide-design-defaults"},{"title":"What a partner's customers store","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /partners/{partnerId}/storage/usage","href":"/api-reference/partners/what-a-partners-customers-store"},{"title":"What was done with a partner's published widgets","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /partners/{partnerId}/analytics/summary","href":"/api-reference/partners/what-was-done-with-a-partners-published-widgets"},{"title":"What each managed user's widgets did","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /partners/{partnerId}/analytics/managed-users","href":"/api-reference/partners/what-each-managed-users-widgets-did"},{"title":"Which widgets were viewed the most","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /partners/{partnerId}/analytics/top-widgets","href":"/api-reference/partners/which-widgets-were-viewed-the-most"},{"title":"What was done with a partner's widgets, day by day","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /partners/{partnerId}/analytics/timeline","href":"/api-reference/partners/what-was-done-with-a-partners-widgets-day-by-day"},{"title":"What your partner account was told","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /partners/{partnerId}/notifications","href":"/api-reference/partners/what-your-partner-account-was-told"},{"title":"How your notifications reached you","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /partners/{partnerId}/notifications/deliveries","href":"/api-reference/partners/how-your-notifications-reached-you"},{"title":"Where your notifications go","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /partners/{partnerId}/notifications/settings","href":"/api-reference/partners/where-your-notifications-go"},{"title":"Choose where your notifications go","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /partners/{partnerId}/notifications/settings","href":"/api-reference/partners/choose-where-your-notifications-go"},{"title":"Make a new secret for your webhook","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /partners/{partnerId}/notifications/webhook-secret","href":"/api-reference/partners/make-a-new-secret-for-your-webhook"},{"title":"Send a webhook delivery again","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /partners/{partnerId}/notifications/deliveries/{deliveryId}/replay","href":"/api-reference/partners/send-a-webhook-delivery-again"},{"title":"Send a test event to your webhook","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /partners/{partnerId}/notifications/test-event","href":"/api-reference/partners/send-a-test-event-to-your-webhook"},{"title":"See how the context of your embeds is signed","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /partners/{partnerId}/entry-context-signing","href":"/api-reference/partners/see-how-the-context-of-your-embeds-is-signed"},{"title":"Require a signed context, or stop requiring it","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /partners/{partnerId}/entry-context-signing","href":"/api-reference/partners/require-a-signed-context-or-stop-requiring-it"},{"title":"Make a secret to sign the context of your embeds","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /partners/{partnerId}/entry-context-signing/secret","href":"/api-reference/partners/make-a-secret-to-sign-the-context-of-your-embeds"},{"title":"See the Neon database a partner keeps the data of its compositions in","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /partners/{partnerId}/data-database","href":"/api-reference/partners/see-the-neon-database-a-partner-keeps-the-data-of-its-compositions-in"},{"title":"Keep the data of a partner's compositions in a Neon database of its own","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /partners/{partnerId}/data-database","href":"/api-reference/partners/keep-the-data-of-a-partners-compositions-in-a-neon-database-of-its-own"},{"title":"Stop keeping the data of a partner's compositions in its own database","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json delete /partners/{partnerId}/data-database","href":"/api-reference/partners/stop-keeping-the-data-of-a-partners-compositions-in-its-own-database"},{"title":"Check that a partner's own database still works","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /partners/{partnerId}/data-database/verify","href":"/api-reference/partners/check-that-a-partners-own-database-still-works"},{"title":"See which adapter keys a partner has connected","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /partners/{partnerId}/adapter-connections","href":"/api-reference/partners/see-which-adapter-keys-a-partner-has-connected"},{"title":"Connect an adapter key to a partner","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /partners/{partnerId}/adapter-connections/{adapterId}/{credentialKey}","href":"/api-reference/partners/connect-an-adapter-key-to-a-partner"},{"title":"Remove an adapter key from a partner","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json delete /partners/{partnerId}/adapter-connections/{adapterId}/{credentialKey}","href":"/api-reference/partners/remove-an-adapter-key-from-a-partner"},{"title":"Confirm a partner's adapter address with the code that was emailed to it","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /partners/{partnerId}/adapter-connections/{adapterId}/{credentialKey}/confirm","href":"/api-reference/partners/confirm-a-partners-adapter-address-with-the-code-that-was-emailed-to-it"}]},{"group":"Widgets","pages":[{"title":"List Widgets","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /widgets","href":"/api-reference/widgets/list-widgets"},{"title":"Create Widget","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /widgets","href":"/api-reference/widgets/create-widget"},{"title":"Create a composition for a widget in one call","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /widgets/{id}/composition","href":"/api-reference/widgets/create-a-composition-for-a-widget-in-one-call"},{"title":"Get Widgets Batch","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /widgets/batch","href":"/api-reference/widgets/get-widgets-batch"}]},{"group":"Users","pages":[{"title":"List the websites allowed to show your widgets","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /users/{id}/workspace/domains","href":"/api-reference/users/list-the-websites-allowed-to-show-your-widgets"},{"title":"Allow a website to show your widgets","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /users/{id}/workspace/domains","href":"/api-reference/users/allow-a-website-to-show-your-widgets"},{"title":"Change a website on your list","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /users/{id}/workspace/domains/{domainId}","href":"/api-reference/users/change-a-website-on-your-list"},{"title":"Stop allowing a website to show your widgets","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json delete /users/{id}/workspace/domains/{domainId}","href":"/api-reference/users/stop-allowing-a-website-to-show-your-widgets"},{"title":"List the API keys of an account","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /users/{id}/keys","href":"/api-reference/users/list-the-api-keys-of-an-account"},{"title":"Create an API key","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /users/{id}/keys","href":"/api-reference/users/create-an-api-key"},{"title":"Rename an API key, or switch it off or on","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /users/{id}/keys/{keyId}","href":"/api-reference/users/rename-an-api-key-or-switch-it-off-or-on"},{"title":"Delete an API key","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json delete /users/{id}/keys/{keyId}","href":"/api-reference/users/delete-an-api-key"},{"title":"Read what an API key was used for","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /users/{id}/api-keys/{keyId}/logs","href":"/api-reference/users/read-what-an-api-key-was-used-for"},{"title":"See which adapter keys an account has connected","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /users/{userId}/adapter-connections","href":"/api-reference/users/see-which-adapter-keys-an-account-has-connected"},{"title":"Connect an adapter key to an account","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /users/{userId}/adapter-connections/{adapterId}/{credentialKey}","href":"/api-reference/users/connect-an-adapter-key-to-an-account"},{"title":"Remove an adapter key from an account","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json delete /users/{userId}/adapter-connections/{adapterId}/{credentialKey}","href":"/api-reference/users/remove-an-adapter-key-from-an-account"},{"title":"Confirm an adapter address with the code that was emailed to it","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /users/{userId}/adapter-connections/{adapterId}/{credentialKey}/confirm","href":"/api-reference/users/confirm-an-adapter-address-with-the-code-that-was-emailed-to-it"}]},{"group":"Uploads","pages":[{"title":"List the account's uploads","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /uploads","href":"/api-reference/uploads/list-the-accounts-uploads"},{"title":"Upload a file","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /uploads","href":"/api-reference/uploads/upload-a-file"},{"title":"Upload size limits and accepted file types","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /uploads/limits","href":"/api-reference/uploads/upload-size-limits-and-accepted-file-types"},{"title":"Get an upload by id","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /uploads/{id}","href":"/api-reference/uploads/get-an-upload-by-id"},{"title":"Delete an upload","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json delete /uploads/{id}","href":"/api-reference/uploads/delete-an-upload"}]},{"group":"Tokens","pages":[{"title":"Validate current authentication token","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /tokens/validate","href":"/api-reference/tokens/validate-current-authentication-token"}]},{"group":"Operations","pages":[{"title":"Get operation status","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /operations/{id}","href":"/api-reference/operations/get-operation-status"}]},{"group":"Managed Users","pages":[{"title":"Get Managed Users","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /managed-users","href":"/api-reference/managed-users/get-managed-users"},{"title":"Create Managed User","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /managed-users","href":"/api-reference/managed-users/create-managed-user"},{"title":"Get Managed Users By Manager","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /users/{managerId}/managed-users","href":"/api-reference/managed-users/get-managed-users-by-manager"},{"title":"Get Managed User By ID","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /managed-users/{id}","href":"/api-reference/managed-users/get-managed-user-by-id"},{"title":"Update Managed User","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /managed-users/{id}","href":"/api-reference/managed-users/update-managed-user"},{"title":"Delete Managed User","description":"Deletes a managed user by ID. Its editor sessions end with it. What was filed under it (compositions, widgets, uploads) stays in your account, untagged.","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json delete /managed-users/{id}","href":"/api-reference/managed-users/delete-managed-user"},{"title":"Create an editor session for a managed user","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /managed-users/{id}/editor-sessions","href":"/api-reference/managed-users/create-an-editor-session-for-a-managed-user"},{"title":"End every editor session of a managed user","description":"Ends all of the managed user's live editor sessions at once, for example when the user signs out of your\nplatform. Their tokens stop working on the next request (on another server of ours, within a few seconds).\nIt is fine to call it for a user who has none.\n","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json delete /managed-users/{id}/editor-sessions","href":"/api-reference/managed-users/end-every-editor-session-of-a-managed-user"},{"title":"End one editor session of a managed user","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json delete /managed-users/{id}/editor-sessions/{sessionId}","href":"/api-reference/managed-users/end-one-editor-session-of-a-managed-user"},{"title":"What a managed user's editor sessions spent","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /managed-users/{id}/usage","href":"/api-reference/managed-users/what-a-managed-users-editor-sessions-spent"},{"title":"Give a managed user a copy of one of your presets","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /managed-users/{id}/presets/{key}/copy","href":"/api-reference/managed-users/give-a-managed-user-a-copy-of-one-of-your-presets"},{"title":"Create a composition from one of your presets in one call","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /managed-users/{id}/presets/{key}/composition","href":"/api-reference/managed-users/create-a-composition-from-one-of-your-presets-in-one-call"},{"title":"Read monthly credit cap and usage for one managed user","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /managed-users/{id}/limits","href":"/api-reference/managed-users/read-monthly-credit-cap-and-usage-for-one-managed-user"},{"title":"Set or clear the monthly credit cap for one managed user","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /managed-users/{id}/limits","href":"/api-reference/managed-users/set-or-clear-the-monthly-credit-cap-for-one-managed-user"},{"title":"Storage used by one managed user's uploads","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /managed-users/{id}/storage-usage","href":"/api-reference/managed-users/storage-used-by-one-managed-users-uploads"},{"title":"List entries across a managed user's compositions","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /managed-users/{id}/entries","href":"/api-reference/managed-users/list-entries-across-a-managed-users-compositions"},{"title":"Read design defaults for one managed user","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /managed-users/{id}/design-defaults","href":"/api-reference/managed-users/read-design-defaults-for-one-managed-user"},{"title":"Set or clear design defaults for one managed user","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /managed-users/{id}/design-defaults","href":"/api-reference/managed-users/set-or-clear-design-defaults-for-one-managed-user"}]},{"group":"Invoices","pages":[{"title":"List a partner's invoices","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /invoices/partner/{partnerId}","href":"/api-reference/invoices/list-a-partners-invoices"}]},{"group":"Entitlements","pages":[{"title":"Get partner entitlements","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /entitlements/partners/{partnerId}","href":"/api-reference/entitlements/get-partner-entitlements"},{"title":"Get managed user entitlements","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /entitlements/managed-users/{managedUserId}","href":"/api-reference/entitlements/get-managed-user-entitlements"}]},{"group":"Credits","pages":[{"title":"Get an account's credit balance","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /credits/user/{userId}/balance","href":"/api-reference/credits/get-an-accounts-credit-balance"},{"title":"List an account's credit ledger","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /credits/user/{userId}/transactions","href":"/api-reference/credits/list-an-accounts-credit-ledger"}]},{"group":"Compositions","pages":[{"title":"Get All Compositions","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /compositions","href":"/api-reference/compositions/get-all-compositions"},{"title":"Create Composition","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /compositions","href":"/api-reference/compositions/create-composition"},{"title":"Duplicate Composition","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /compositions/{id}/duplicate","href":"/api-reference/compositions/duplicate-composition"},{"title":"Get Composition Versions","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /compositions/{id}/versions","href":"/api-reference/compositions/get-composition-versions"},{"title":"Update Composition Status","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /compositions/{id}/status","href":"/api-reference/compositions/update-composition-status"},{"title":"Get Composition","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /compositions/{id}","href":"/api-reference/compositions/get-composition"},{"title":"Update Composition","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /compositions/{id}","href":"/api-reference/compositions/update-composition"},{"title":"Delete Composition","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json delete /compositions/{id}","href":"/api-reference/compositions/delete-composition"},{"title":"Get Composition Design","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /compositions/{id}/design","href":"/api-reference/compositions/get-composition-design"},{"title":"Get Current Content","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /compositions/{id}/content","href":"/api-reference/compositions/get-current-content"},{"title":"Set Dynamic Content","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /compositions/{id}/content","href":"/api-reference/compositions/set-dynamic-content"},{"title":"Get Composition Embed Settings","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /compositions/{id}/embed-settings","href":"/api-reference/compositions/get-composition-embed-settings"},{"title":"Get Composition Preview","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /compositions/{id}/preview","href":"/api-reference/compositions/get-composition-preview"},{"title":"Get All Records From Composition Database Table","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /compositions/{id}/database/{table}","href":"/api-reference/compositions/get-all-records-from-composition-database-table"},{"title":"Create Record In Composition Database","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /compositions/{id}/database/{table}","href":"/api-reference/compositions/create-record-in-composition-database"},{"title":"Get Record From Composition Database","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /compositions/{id}/database/{table}/{recordId}","href":"/api-reference/compositions/get-record-from-composition-database"},{"title":"Update Record In Composition Database","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /compositions/{id}/database/{table}/{recordId}","href":"/api-reference/compositions/update-record-in-composition-database"},{"title":"Delete Record From Composition Database","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json delete /compositions/{id}/database/{table}/{recordId}","href":"/api-reference/compositions/delete-record-from-composition-database"},{"title":"Describe What a Composition Keeps","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /compositions/{id}/entries","href":"/api-reference/compositions/describe-what-a-composition-keeps"},{"title":"Read the Entries of a Composition's Table","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /compositions/{id}/entries/{table}","href":"/api-reference/compositions/read-the-entries-of-a-compositions-table"},{"title":"Add a content list item","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /compositions/{id}/content/{list}/items","href":"/api-reference/compositions/add-a-content-list-item"},{"title":"Delete a content list item","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json delete /compositions/{id}/content/{list}/items/{itemId}","href":"/api-reference/compositions/delete-a-content-list-item"},{"title":"Update a content list item","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json patch /compositions/{id}/content/{list}/items/{itemId}","href":"/api-reference/compositions/update-a-content-list-item"},{"title":"Read the composition data source binding","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /compositions/{id}/data-source","href":"/api-reference/compositions/read-the-composition-data-source-binding"},{"title":"Bind a public JSON data source for embed refresh","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /compositions/{id}/data-source","href":"/api-reference/compositions/bind-a-public-json-data-source-for-embed-refresh"},{"title":"Remove the composition data source binding","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json delete /compositions/{id}/data-source","href":"/api-reference/compositions/remove-the-composition-data-source-binding"},{"title":"Validate Content","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /compositions/{id}/content/validate","href":"/api-reference/compositions/validate-content"},{"title":"Get Content Schema","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /compositions/{id}/schema/content","href":"/api-reference/compositions/get-content-schema"},{"title":"Get Design Schema","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /compositions/{id}/schema/design","href":"/api-reference/compositions/get-design-schema"},{"title":"Get Embed Schema","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /compositions/{id}/schema/embed","href":"/api-reference/compositions/get-embed-schema"},{"title":"Check Composition Access","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /compositions/{id}/access","href":"/api-reference/compositions/check-composition-access"},{"title":"Get Compositions Batch","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /compositions/batch","href":"/api-reference/compositions/get-compositions-batch"},{"title":"List composition entry items with paging and filters","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /compositions/{id}/entries/{table}/items","href":"/api-reference/compositions/list-composition-entry-items-with-paging-and-filters"},{"title":"Delete composition entry items by id or host context","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json delete /compositions/{id}/entries/{table}/items","href":"/api-reference/compositions/delete-composition-entry-items-by-id-or-host-context"},{"title":"Export composition entry items","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /compositions/{id}/entries/{table}/export","href":"/api-reference/compositions/export-composition-entry-items"},{"title":"See the documents a widget's AI answers from","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /compositions/{id}/adapters/ai-answers/knowledge","href":"/api-reference/compositions/see-the-documents-a-widgets-ai-answers-from"},{"title":"Add a document for a widget's AI to answer from","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /compositions/{id}/adapters/ai-answers/knowledge/documents","href":"/api-reference/compositions/add-a-document-for-a-widgets-ai-to-answer-from"},{"title":"Add a text file or a picture of a document (a PDF once PDFs are read) for a widget's AI to answer from","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /compositions/{id}/adapters/ai-answers/knowledge/documents/file","href":"/api-reference/compositions/add-a-text-file-or-a-picture-of-a-document-a-pdf-once-pdfs-are-read-for-a-widgets-ai-to-answer-from"},{"title":"Remove a document from a widget's knowledge base","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json delete /compositions/{id}/adapters/ai-answers/knowledge/documents/{documentId}","href":"/api-reference/compositions/remove-a-document-from-a-widgets-knowledge-base"}]},{"group":"Canvases","pages":[{"title":"Get All Canvases","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /canvases","href":"/api-reference/canvases/get-all-canvases"},{"title":"Create Canvas","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /canvases","href":"/api-reference/canvases/create-canvas"},{"title":"Get Canvas","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /canvases/{id}","href":"/api-reference/canvases/get-canvas"},{"title":"Update Canvas","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /canvases/{id}","href":"/api-reference/canvases/update-canvas"},{"title":"Delete Canvas","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json delete /canvases/{id}","href":"/api-reference/canvases/delete-canvas"}]},{"group":"Brand Kit","pages":[{"title":"The Brand Kit of the current workspace","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json get /brand-kit","href":"/api-reference/brand-kit/the-brand-kit-of-the-current-workspace"},{"title":"Save Brand Kit tokens","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json put /brand-kit","href":"/api-reference/brand-kit/save-brand-kit-tokens"},{"title":"Reset the Brand Kit to the default","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json delete /brand-kit","href":"/api-reference/brand-kit/reset-the-brand-kit-to-the-default"},{"title":"Change part of the Brand Kit","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json patch /brand-kit","href":"/api-reference/brand-kit/change-part-of-the-brand-kit"},{"title":"Upload a font file to the Brand Kit","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /brand-kit/fonts","href":"/api-reference/brand-kit/upload-a-font-file-to-the-brand-kit"},{"title":"Add a named SVG icon to the Brand Kit","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json post /brand-kit/icons","href":"/api-reference/brand-kit/add-a-named-svg-icon-to-the-brand-kit"},{"title":"Remove a font or icon from the Brand Kit","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json delete /brand-kit/assets/{assetId}","href":"/api-reference/brand-kit/remove-a-font-or-icon-from-the-brand-kit"},{"title":"Rename an icon or relabel a font variant","deprecated":null,"version":null,"openapi":"/openapi/widgetic-api-public.json patch /brand-kit/assets/{assetId}","href":"/api-reference/brand-kit/rename-an-icon-or-relabel-a-font-variant"}]}]},{"tab":"Resources","pages":[{"title":"Resources","href":"/resources/examples"}]}]},"basePath":"","title":"Create an editor session for a managed user - Widgetic","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CybtLBIt.js","utils-BMLj2fvV.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-B6In562Y.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dr8Mfhp9.js","snippetPresets-2rmQvMVl.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-WMqJYdZj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CJ-MlPHu.js","shallow-dY3TMRCk.js","getApiPlaygroundDisplay-v-1B2bKm.js","CodeSnippet-BDhiTB7U.js","CodeSnippets-D9hnzQcS.js","Page-C4GwDT3_.js","getPastedJson-Th2V45jI.js","icon-BQXch1W9.js","MethodPill-BCqUneP3.js","DuplicateIcon-Q_-bhurZ.js","createIcon-DUjLHRqp.js","DynamicMarkdown-B-f2cqXQ.js","SectionHeading-Da5NsV4v.js","axios-vUo_bRtp.js","Markdown-D13FWkIM.js","clsx-D3Isdib3.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-C-XZBk9h.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink--qIqmmVG.js"]}