Reference

willo_deploy_function

Create or replace one of the business's backend Edge Functions (Deno), exactly as Willo's chat does: code is the full source…

  • Act
  • May need approval
  • Metered
Generated from Willo's codeOpen in ClaudeOpen in ChatGPT
On this page

Deploy an Edge Function. Create or replace one of the business's backend Edge Functions (Deno), exactly as Willo's chat does: code is the full source, or source_path deploys supabase/functions/<name>/index.ts from the repo at the draft branch. Runs without a card like in chat, EXCEPT a function with admin powers and no caller check: that is refused until you pass public_admin_reason, and then it needs a person's approval (pending_approval + link; call again after). Deploys to the draft backend while drafting, and saves the source to the repo (the draft branch while drafting, else main; git in the result says which) — no site rebuild. Replacing an EXISTING function with code needs source_sha256: the value willo_get_function returned, so you never overwrite source you have not read (a stale one is refused; for a targeted change prefer willo_edit_function). summary is required: one plain sentence for the owner on what the function does for them.

Access

  • Token: read + act, and editor access or higher on the business.
  • Approval: Only when Willo's chat would stop for the same action. The description says when; otherwise the call runs at once.
  • Metered: counts toward a per-business, per-minute limit for this kind of call. See Limits.

Parameters

ParameterTypeRequiredDescription
namestringyesFunction slug: ^[A-Za-z][A-Za-z0-9_-]*$ — becomes /functions/v1/<name>.
codestringnoFull Deno source. Omit when passing source_path.
source_sha256stringnoRequired when code replaces an existing function: source_sha256 from willo_get_function for the version you read. Omit for a new function.
source_pathstringnoExactly supabase/functions/<name>/index.ts — deploy the repo's file (draft branch) instead of sending code.
verify_jwtbooleannoDefault true. false for public webhooks that verify a signature themselves. A source_path redeploy of an existing function keeps its current setting unless you pass this.
import_mapstringnoOptional Deno import map (JSON string).
summarystringyesOne plain sentence for the owner: what this does for them.
public_admin_reasonstringnoOnly after a refusal naming it: one sentence on why this endpoint must be public AND run with admin powers. Puts the deploy on a card.
ephemeralbooleannotrue for test/seed scaffolding removed after ephemeral_hours and never published.
ephemeral_hoursinteger 1–168noLifetime of an ephemeral function (default 24).