---
title: "Deploy a function"
method: POST
path: "/v1/projects/{ref}/functions/deploy"
tags: ["Edge Functions"]
---

# Deploy a function

`POST /v1/projects/{ref}/functions/deploy`

A new endpoint to deploy functions. It will create if function does not exist.

## Path parameters

- `ref` string, required

## Query parameters

- `slug` string
- `bundleOnly` boolean

## Response `201`

- DeployFunctionResponse
  - `id` string, required
  - `slug` string, required
  - `name` string, required
  - `status` 'ACTIVE' | 'REMOVED' | 'THROTTLED', required
  - `version` integer, required
  - `created_at` integer
  - `updated_at` integer
  - `verify_jwt` boolean
  - `import_map` boolean
  - `entrypoint_path` string
  - `import_map_path` string
  - `ezbr_sha256` string

## Other responses

- `401` — Unauthorized
- `402` — Maximum number of functions reached for Plan
- `403` — Forbidden action
- `429` — Rate limit exceeded
- `500` — Failed to deploy function

---

[API](https://skmtc.dev/supabase/apis/management-api.md) · [All operations](https://skmtc.dev/supabase/apis/management-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/supabase/management-api/revisions/a7cb39418064/schema)
