Documentation
Guides and API reference for building with Smallworld.
Start here#
OverviewHow worlds, users, sessions, and executions work together.Quick startRun your first command, read the result, and keep a session between commands.AuthenticationCall Smallworld from your backend with a workspace API key.Guides#
Connect a coding agentUse the hosted builder MCP from Codex or Claude Code with browser sign-in.Connect a user’s accountConnect an account through OAuth or API-key entry and use it in a world.Connect a groupShare one connected account with every user in a group, such as a customer's team.Approve a tool callHandle tool and provider decisions, then continue the execution.Review tool calls with hooksLet your own endpoint allow, ask about, or deny each integration tool call before it runs.Send and receive filesUpload files with a command, then save the files it creates or changes.MountsMount shared folders into your users' terminals and decide which changes agents may make to them.Build a custom integrationExpose your own tools, test a signed endpoint, and enable it in a world.API reference#
Worlds#
POST Create a WorldCreate a World in your workspace.GET Get a WorldRead a World owned by your workspace.PATCH Update a WorldChange a World’s name, description, or icon.DELETE Delete a WorldDelete a World owned by your workspace.GET List WorldsList the Worlds owned by your workspace, one page at a time.Configuration#
GET List integration configurationsRead the configuration catalog for all integrations.GET Get integration configurationRead one integration’s workspace configuration.PATCH Update integration configurationActivate an integration, choose its authentication mode, assign Worlds, or update tool defaults.GET Get a provider OAuth appRead the provider app used for end-user OAuth connections.PATCH Update a provider OAuth appSave your provider OAuth client, optionally together with activation, World assignment, and tool defaults.PUT Update runtime capability defaultsSet the workspace defaults for Python and JavaScript.PUT Set a workspace tool defaultSet a tool’s default policy for your workspace.GET List a World’s integrationsRead the integration assignments and effective tool policies for a World.GET Get a World’s integrationRead an integration’s assignment and policies for a World.PUT Set a World’s integration gateAssign or disable an integration in a World.DELETE Reset a World’s integration gateRemove the World gate override and restore its inherited state.PUT Set a World runtime overrideExplicitly enable or disable a runtime capability for one World.DELETE Reset a World runtime overrideRestore a runtime capability to the workspace default.GET Get the app profileRead the name and branding used on provider consent screens.PUT Set the app profileReplace the branding used for new OAuth connections.DELETE Remove the app profileRemove custom branding and restore the shared Smallworld client branding.GET Get terminal settingsRead the workspace’s command and approval time limits.PATCH Update terminal settingsChange the workspace’s command or approval time limit.Custom integrations#
GET List custom integrationsList the workspace's custom HTTP tool integrations.POST Create a custom integrationCreate and enable a new custom integration and its selected World switches.GET Read a custom integrationRead a saved custom integration's configuration.PATCH Update a custom integrationEdit fields of a custom integration. Omitted fields retain their current values.POST Rename a custom commandMove a custom integration and its configuration to a new command key.POST Rotate a custom signing secretReplace the signing secret immediately and return it once.DELETE Delete a custom integrationDelete the integration, its tools, policies, World switches, and hooks.POST Create custom draft credentialsObtain signing credentials for testing an unsaved integration without persisting it.POST Run a custom draft commandRun a terminal command against unsaved custom tool definitions.POST Validate custom tool definitionsCheck pasted tool definitions without saving or calling your endpoint.POST Validate custom setup settingsCheck supplied setup fields independently without saving or making an endpoint call.POST Send a custom test callSend a real signed tool call using a saved integration's configuration.MCP integrations#
GET List registered MCP serversList remote MCP servers registered in this workspace, including drafts.POST Register an MCP serverSave a remote MCP integration after detection and setup, or as an inactive draft.POST Detect an MCP serverInspect a server URL and reserve a workspace-bound integration ID for setup.POST Inspect MCP OAuth metadataInspect an MCP server's advertised OAuth settings, optionally using an issuer override.POST Verify an unsaved MCP setupExplicitly check a stable MCP setup before saving it.POST Verify a saved MCP setupRetry verification using the saved integration and its saved OAuth app credentials.GET Search the MCP RegistrySearch the cached remote-server catalog from the official MCP Registry.GET Read a registered MCP serverRead a registered MCP server's configuration and current setup status.PATCH Update an MCP registrationEdit the name, description, OAuth scopes, or issuer override of a saved MCP integration.POST Rename an MCP commandMove an MCP integration's configuration and connected accounts to a new command key.POST Acknowledge MCP tool changesAcknowledge the current tool descriptions and schemas so the changes notice clears.DELETE Delete an MCP registrationDelete the server registration, policies, switches, hooks, connections, connect sessions, OAuth app, and stored OAuth registrations.Tool hooks#
GET List tool hooksList all global and integration-scoped hooks in the workspace.POST Create hook draft credentialsGenerate credentials for configuring a hook endpoint before activation.POST Test a hook draftSend one signed test request and obtain proof of a valid hook response before creation.POST Create a verified hookActivate the exact hook configuration that returned a valid signed setup response.PATCH Update a hookEdit a saved hook's endpoint URL or timeout while retaining its scope and secret.POST Rotate a hook signing secretReplace a hook's signing secret immediately and return the new value once.POST Send a saved hook testSend one signed sample request using a saved hook's endpoint and secret.DELETE Delete a hookRemove the hook so subsequent tool calls no longer consult it.Executions#
POST Execute a commandRun a Bash command in a World. The request answers as soon as the command finishes or needs an approval, so most commands return their result here; one that still runs after 30 seconds answers with status running. Reuse a session to preserve files, the working directory, and shell state.GET Get an executionRead execution state, output, and the exact tool calls made by the command. While the command runs, the request is held until it finishes or needs an approval, for at most 30 seconds; an execution that waits for an approval answers at once.GET Download an execution outputFetch the exact bytes selected by view during an execution.Sessions#
GET List a session's executionsRead a session's executions, newest first, one page at a time. Useful for a tool call hook that needs more of the session than its request carries.GET List a session's tool callsRead every tool call of a session, newest first, one page at a time, with each one's executionId.Tools#
GET List a user's World toolsLoad the integration commands, runtimes, and mounts available to a represented user in a World, for your agent's context.Tool approvals#
GET List tool approvalsList pending approvals or tool-call history, optionally scoped to a session or execution.POST Approve a tool callApprove the exact pending invocation and let its execution continue.POST Deny a tool callDeny the exact pending invocation before it reaches the provider.POST Respond to a provider approvalSubmit the person's choice for the provider prompt currently attached to a pending tool call.Tool policies#
GET List workspace tool policiesRead the workspace policy of every tool of every integration in one call.GET List a World's overridesList the tool policy overrides a World sets for every user in it, across all integrations.PUT Set a World overrideSet one tool's policy for every user in a World.DELETE Remove a World overrideRemove a World's override, so the tool follows the workspace policy again.GET Get a group's integration switchRead whether a group leaves an integration available to its sessions.PUT Turn an integration off for a groupTurn an integration off for a group's sessions, or let it follow the workspace and the World again.GET List a group's overridesList the tool policy overrides a group sets for its members, across all integrations.PUT Set a group overrideSet one tool's policy for every call in a group's sessions.DELETE Remove a group overrideRemove a group's override, so the tool follows the member's own override, or the World or workspace policy, again.GET List a user's overridesList a represented user's tool policy overrides across all integrations, including Allows remembered from approvals.PUT Set a user overrideSet one tool's policy for a represented user in every World.DELETE Remove a user overrideRemove a user's override, such as a remembered Allow, so the tool follows the World or workspace policy again.Integrations#
GET List integrationsList integration options your application can offer its represented users.Connect sessions#
POST Create a connect sessionCreate a hosted flow for a user to authorize an integration or enter its API-key credentials.POST Create a group connect sessionCreate a hosted flow that connects one account for a whole group, through OAuth consent or API-key entry.GET Get a connect sessionRead the authoritative state of a user's or a group's hosted connection attempt.POST Confirm a connect sessionActivate credentials held by a session created with requireConfirmation: true.Connections#
GET List a user's connectionsList the account a represented user's calls use for each integration: their own, or the account of the group their session acts for.GET Get a connectionRead the connection a user's calls use for an integration: their own, or the connection of the group their session acts for.POST Save API-key credentialsValidate and save API-key credentials your backend collected for a represented user.DELETE Disconnect an integrationDisconnect a represented user's own account from an integration.GET List a group's connectionsList a group's own connected accounts and accounts that need reauthorization.GET Get a group connectionRead a group's own connection state for an integration.POST Save group API-key credentialsValidate and save API-key credentials your backend collected for a group.DELETE Disconnect a group integrationDisconnect a group's own account from an integration.Users#
POST Create or get a userRegister your application’s user ID. Repeating this request returns the same user without changing their details.GET Get a userRead a represented user by your application's user ID.PATCH Update a userUpdate the email metadata of an existing represented user.DELETE Delete a userDelete a represented user and their associated data.Groups#
POST Create a groupRegister a group of users who can share connections. Repeating this request returns the same group without changing it.GET List groupsList your workspace's groups, one page at a time.GET Get a groupRead a group by your application's group ID, including a page of its users.PATCH Update a groupSet or remove a group's display name.DELETE Delete a groupDelete a group with its memberships, connections, tool overrides, and mounts. Its members stay and keep their other groups.PUT Move a user to a groupMove a represented user into a group: a user with no group joins it, and a user in one other group leaves that group for this one. An unknown user is created.PUT Add a user to a groupAdd a represented user to a group and keep their other groups. An unknown user is created.DELETE Remove a user from a groupRemove a represented user from one group, if they still belong to it. Their other memberships stay.Mounts#
POST Create a mountCreate a folder that is mounted into the terminal of every user in the workspace, of one group's members, or of one user.GET List mountsList your workspace's mounts, one page at a time, optionally only those of one scope, group, or user.GET Get a mountRead a mount's path, scope, target, description, settings, and size.PATCH Update a mountChange a mount's path, scope, target, description, or settings. Its files stay.DELETE Delete a mountDelete a mount with its files and its change log.GET List a mount's filesList every file and folder in a mount.GET Read a mount fileRead one file of a mount, with its content.PUT Write a mount fileCreate or replace one file of a mount, creating any missing parent folders.POST Create a mount folderCreate a folder in a mount, with any missing parent folders. Send no body.DELETE Delete a mount file or folderDelete a file, or a folder with everything inside it, from a mount.GET List a user's mountsList every mount that reaches a user in a session for one of their groups, and which of them are mounted where paths overlap.