Functions
Deploy function
Publish the function. If sourceCode or dependencies are provided in the body, they replace the current draft before deployment. Returns immediately with a deployment ID — poll GET /v1/functions/deployments/{deploymentId} until status is active or failed.
post/v1/functions/{functionId}/deploy
Path parameters
functionIdstring required
Zavu Function ID.
Request body
Example request
{
"files": {
"index.ts": "import { formatOrder } from './lib/orders';\n\nexport default async function handler(event) {\n return { statusCode: 200, body: formatOrder(event) };\n}\n",
"lib/orders.ts": "export function formatOrder(event) {\n return JSON.stringify(event);\n}\n"
},
"entrypoint": "index.ts"
}Response
Deployment queued.
Example response
{
"deployment": {
"id": "fnd_abc123"
}
}