Skip to main content
POST
Deploy function

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

functionId
string
required

Zavu Function ID.

Body

application/json

Optional source/dependencies update applied before deploying. Omit every field to redeploy the current draft as-is.

files
object

The project's source files, keyed by path relative to the project root (e.g. index.ts, lib/orders.ts). Imports between them are resolved when the function is built, so a function can be split across as many files as it needs.

Paths must be relative and use forward slashes; .., node_modules/ and package.json are rejected. npm packages are not uploaded here — declare them under dependencies and Zavu installs them. Limits: 200 files and 900,000 bytes for the whole tree.

Example:
entrypoint
string
default:index.ts

Which file in files is the entry point. Defaults to index.ts.

Example:

"index.ts"

sourceCode
string

Shortcut for a single-file function: exactly equivalent to sending files with one entry named after entrypoint (index.ts by default). Fully supported — use whichever fits. If both are sent, files wins.

Maximum string length: 900000
dependencies
object

New dependency map (replaces existing dependencies).

Response

Deployment queued.

deployment
object
required