Update the draft source code and/or dependency map without triggering a build. Visible in the dashboard immediately, but the live (deployed) function does not change until POST /v1/functions/{functionId}/deploy runs.
curl --request PATCH \
--url https://api.zavu.dev/v1/functions/{functionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceCode": "<string>",
"dependencies": {}
}
'{
"function": {
"id": "fn_abc123",
"slug": "order-bot",
"name": "Order Bot",
"runtime": "nodejs20",
"status": "draft",
"timeoutSec": 10,
"memoryMb": 256,
"httpEnabled": true,
"dependencies": {
"openai": "^4.20.0"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"publicUrl": "<string>",
"activeDeploymentId": "<string>"
}
}Documentation Index
Fetch the complete documentation index at: https://docs.zavu.dev/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Zavu Function ID.
Optional source/dependencies update applied before deploying. Omit both fields to redeploy the current draft as-is.
Draft updated.
A Zavu Function — user-supplied TypeScript that runs in Zavu Cloud and reacts to messaging events or HTTP requests.
Show child attributes
curl --request PATCH \
--url https://api.zavu.dev/v1/functions/{functionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceCode": "<string>",
"dependencies": {}
}
'{
"function": {
"id": "fn_abc123",
"slug": "order-bot",
"name": "Order Bot",
"runtime": "nodejs20",
"status": "draft",
"timeoutSec": 10,
"memoryMb": 256,
"httpEnabled": true,
"dependencies": {
"openai": "^4.20.0"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"publicUrl": "<string>",
"activeDeploymentId": "<string>"
}
}