v51

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-02172186551.1 KB
Functions

Update function draft

Update an existing function. sourceCode / dependencies edit the draft without triggering a build — they go live on the next POST /v1/functions/{functionId}/deploy. httpEnabled is applied to the deployed function immediately, so turning the public endpoint on or off does not require a redeploy.

patch/v1/functions/{functionId}

Path parameters

functionIdstring required

Zavu Function ID.

Request body

sourceCodestring

New source code for the draft (replaces it).

dependenciesobject

New dependency map (replaces existing dependencies).

httpEnabledboolean

Expose the function on its public HTTPS URL, or take it down. Applies to the already-deployed function without redeploying; the URL is returned as publicUrl.

Response

Draft updated.

Example response

{
  "function": {
    "id": "fn_abc123",
    "slug": "order-bot",
    "name": "Order Bot",
    "timeoutSec": 10,
    "memoryMb": 256,
    "dependencies": {
      "openai": "^4.20.0"
    }
  }
}