v2

latestOpenAPI 3.1.0Proprietary2026-07-26127193620.1 KB
Functions

Update and redeploy a function

Replaces the function's source code with the body's code and triggers a redeploy. Same size limits as POST /functions. Use this verb to push secret writes into the running handler: passing the same code re-runs the deploy and refreshes the binding set with the latest values from the secrets table.

On deploy failure, the previously-deployed code stays live; the runtime never serves a half-built bundle. The response uses error.code deploy_failed, and the function's deploy_error field carries the latest deploy error for dashboard/API reads.

put/functions/{id}

Request body

codestring

New pre-built handler. Same rules as CreateFunctionInput.code. Provide either code or files, not both.

sourceMapstring
filesobject

Source files for a managed build, as a map of path to file contents. Provide this INSTEAD of code to rebuild and redeploy from source. Same rules as CreateFunctionInput.files.

Response

Updated function

successtrue required