---
title: "Update a function"
method: PATCH
path: "/v1/projects/{ref}/functions/{function_slug}"
tags: ["Edge Functions"]
---

# Update a function

`PATCH /v1/projects/{ref}/functions/{function_slug}`

Updates a function with the specified slug and project.

## Path parameters

- `ref` string, required
- `function_slug` string, required

## Query parameters

- `slug` string
- `name` string
- `verify_jwt` boolean
- `import_map` boolean
- `entrypoint_path` string
- `import_map_path` string
- `ezbr_sha256` string

## Request body

- V1UpdateFunctionBody
  - `name` string
  - `body` string
  - `verify_jwt` boolean

## Response `200`

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

## Other responses

- `401` — Unauthorized
- `403` — Forbidden action
- `429` — Rate limit exceeded
- `500` — Failed to update function with given slug

---

[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)
