Create a function package
POST
/v1/functionsAuthorization
AuthorizationBearer token · headerrequiredHeader parameters
Idempotency-KeystringRetry the same operation with this key to return its saved receipt. Scoped by the operation's authenticated caller or resource. A different input under the same key returns 409. Receipts are retained for at least 7 days after completion, then removed by an hourly sweep. After removal the key can execute again. Fresh-only secrets are never included in a replay.
min length 1 · max length 255
Kikuvi-Workspacestring<uuid>Workspace to create in. Required for a user caller; implied by the key for an API key caller.
Request body
requiredapplication/gzipA gzipped tar holding subako-package.json and module.wasm at its root. Core asks the module its tools through MCP's tools/list.
string<binary>Responses
201The new package's first version.
assetsany | FunctionAssetsBodyrequiredShow propertiesHide properties
One of:
any
anyFunctionAssetsBody
bytesinteger<int64>requiredfilesFunctionAssetFileBody[]requiredEach file the archive holds, in path order.
Show propertiesHide properties
Array of
FunctionAssetFileBodypathstringrequiredThe path under `assets/`, `/`-separated.
sha256stringrequiredHex SHA-256 of the file's bytes.
sizeinteger<int64>requiredmin 0
sha256stringrequiredcreated_atstring<date-time>requiredfunction_idstring<uuid>requiredidstring<uuid>requiredmanifestFunctionManifestBodyrequiredWhat a version serves: the name and description its `subako-package.json`
gives, and each tool its module lists.
Show propertiesHide properties
descriptionstringrequiredfunctionsManifestFunctionBody[]requiredShow propertiesHide properties
Array of
ManifestFunctionBodydescriptionstringrequiredinput_schemaanyrequiredJSON Schema for the tool's arguments.
namestringrequiredoutput_schemaanyrequiredJSON Schema for the tool's output; `{}` when the tool names none.
namestringrequiredmodule_bytesinteger<int64>requiredmodule_sha256stringrequiredversioninteger<int32>required400Malformed archive, a bundle validation failure, a module that does not list valid tools, a deployment that runs no functions, a malformed workspace header, or a user caller with no workspace header.
errorErrorDetailrequiredWhat went wrong: a `code` to branch on and a `message` to show. The
message is written for a person and may change; the code will not.
Show propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired401Missing, malformed, or invalid bearer token.
errorErrorDetailrequiredWhat went wrong: a `code` to branch on and a `message` to show. The
message is written for a person and may change; the code will not.
Show propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired403Caller lacks function.manage, or an API key's Kikuvi-Workspace header names another workspace.
errorErrorDetailrequiredWhat went wrong: a `code` to branch on and a `message` to show. The
message is written for a person and may change; the code will not.
Show propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired404No such workspace, or the caller cannot see it.
errorErrorDetailrequiredWhat went wrong: a `code` to branch on and a `message` to show. The
message is written for a person and may change; the code will not.
Show propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired409Idempotency-Key was already used for a different request.
errorErrorDetailrequiredWhat went wrong: a `code` to branch on and a `message` to show. The
message is written for a person and may change; the code will not.
Show propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired413Request body exceeds the upload size limit.
errorErrorDetailrequiredWhat went wrong: a `code` to branch on and a `message` to show. The
message is written for a person and may change; the code will not.
Show propertiesHide properties
codeErrorCoderequiredThe machine-readable half of an error response, and the field a client
branches on. Closed: every error carries exactly one of these.
Allowed:
unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired