---
title: "Update a function."
method: PUT
path: "/v1/functions/{id}"
tags: ["Functions"]
---

# Update a function.

`PUT /v1/functions/{id}`

## Request

- Base URL: `https://api.scalix.world`
- URL: `https://api.scalix.world/v1/functions/{id}`
- Auth: HTTP bearer

Redeploys a serverless function with a new configuration.

## Path parameters

- `id` string, required

## Request body

- FunctionDeployRequest: Deploy a serverless function.
  - `name` string, required
  - `runtime` string, required: One of `node`, `python`, `go`, `rust`.
  - `image_ref` string, required
  - `entry_point` string, nullable
  - `handler` string, nullable
  - `env` object, nullable: Environment variables for the function (string → string).
  - `timeout_ms` integer, nullable
  - `memory_mb` integer, nullable
  - `cron_expression` string, nullable
  - `http_trigger` boolean, nullable

## Response `200`

Function updated

## Other responses

- `401`: Missing or invalid API key
- `500`: Internal error

---

[API](https://skmtc.dev/scalix/apis/scalix-cloud-api.md) · [All operations](https://skmtc.dev/scalix/apis/scalix-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scalix/apis/scalix-cloud-api/revisions/2c04ca0a90bb?raw)
