---
title: "Create a function."
method: POST
path: "/v1/functions"
tags: ["Functions"]
---

# Create a function.

`POST /v1/functions`

## Request

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

Deploys a serverless function and returns the created function.

## 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 `201`

Function created

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