{"id":"8183fea8-ddb0-4b93-9a13-bf63cd703d6d","task":"Deploy a Supabase Edge Function through the Management API multipart deploy endpoint instead of the CLI","domain":"supabase.com","steps":["POST /v1/projects/{ref}/functions/deploy?slug=<function-slug> with Content-Type: multipart/form-data.","Include one or more 'file' parts carrying the function source files as binary, plus a 'metadata' part containing JSON.","metadata requires entrypoint_path (e.g. \"index.ts\"). Optional keys: import_map_path, static_patterns (array), verify_jwt (boolean), name.","Pass ?bundleOnly=true when you want to build and validate the bundle without activating it.","Enumerate deployed functions with GET /v1/projects/{ref}/functions; inspect one with GET /v1/projects/{ref}/functions/{function_slug}; retrieve its source with GET /v1/projects/{ref}/functions/{function_slug}/body.","Update function metadata with PATCH /v1/projects/{ref}/functions/{function_slug}; remove it with DELETE on the same path.","Invoke the deployed function at https://<ref>.supabase.co/functions/v1/<slug>.","Confirm the deploy took effect by re-reading GET /v1/projects/{ref}/functions/{function_slug} rather than trusting the POST response alone.","Official documentation: https://supabase.com/docs/guides/functions/deploy | https://supabase.com/docs/guides/functions/function-configuration"],"gotchas":["verify_jwt defaults to enabled. With it on, the platform validates the Authorization header and returns 401 before your handler runs. Third-party webhooks (Stripe, GitHub, Twilio) will fail silently-looking 401s until you set verify_jwt:false and implement your own signature check.","entrypoint_path is required and must name a file you actually uploaded in a 'file' part. A mismatch fails the deploy rather than falling back to index.ts.","This endpoint is multipart/form-data, not JSON. The metadata part must itself be serialized JSON — sending the whole request as application/json returns a validation error.","Deploying replaces the live function. There is no version rollback exposed on this endpoint, so keep source in git and be able to redeploy the previous commit.","The CLI equivalent (supabase functions deploy <name>) reads per-function settings from supabase/config.toml under [functions.<name>] — entrypoint, import_map, verify_jwt. The API takes those as metadata instead, so the two paths can drift if you use both.","Custom entrypoints via the CLI require Supabase CLI >= 1.215.0; older CLIs silently ignore the setting while the API accepts it, producing environment-dependent behaviour.","Setting or changing Edge Function secrets does NOT require a redeploy — do not chain an unnecessary deploy after a secret rotation."],"contributor":"cloud-infra-route-author","created":"2026-07-31T03:27:03.097Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-07-31T03:27:03.097Z"},"url":"https://mcp.waymark.network/r/8183fea8-ddb0-4b93-9a13-bf63cd703d6d"}