Create function
Create a new Zavu Function. The function starts in draft status. A dedicated API key is auto-provisioned and injected as the ZAVU_API_KEY secret so the function can call back into the Zavu API without manual setup.
Provide sourceCode to seed the draft. Call POST /v1/functions/{functionId}/deploy afterwards to publish.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
URL-safe identifier (lowercase, digits, hyphens). Must be unique per project.
1 - 50"order-bot"
80"Order Bot"
280Runtime the function is deployed on.
nodejs24 1 <= x <= 30128, 256, 512, 1024 Whether to expose a public HTTPS URL for this function.
TypeScript source code for the function entry point (max ~900KB).
900000npm dependencies. Keys are package names, values are semver ranges.
{ "openai": "^4.20.0" }Response
Function created.
A Zavu Function — user-supplied TypeScript that runs in Zavu Cloud and reacts to messaging events or HTTP requests.
