v1
latestOpenAPI 3.1.02026-07-22115189303.8 KBFunctions
Deploy function
Deploy a function to the serverless runtime platform asynchronously. Deployment happens in the background and may take 10-60 seconds.
You'll receive a 202 Accepted response immediately. To check deployment status:
- Poll GET /functions/{id} to monitor status field
- Wait for status to change from 'draft' to 'deployed' (success) or 'error' (failure)
- Check last_deployed_at timestamp to confirm deployment completion
Deployment process:
- For cloudflare_worker: Code is deployed to Cloudflare's global edge network
- For supabase_function: Code is deployed to Supabase Edge Functions with Deno runtime
Deployment will fail (status='error') if:
- Function code has syntax errors
- Function type is 'supabase_function' but no Supabase project is configured
- Runtime platform API is unavailable
After successful deployment, the function is immediately available for invocation via POST /functions/{id}/invoke.
post/functions/{function_id}/deploy
Response
Deployment initiated successfully (processing in background)
Example response
{
"message": "Function deployment initiated",
"status": "deploying"
}