---
title: "Define Connected Function"
method: POST
path: "/v1/teams/{team_id}/connect/functions"
tags: ["app connect"]
---

# Define Connected Function

`POST /v1/teams/{team_id}/connect/functions`

## Request

- Base URL: `https://api.stormy.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.stormy.ai/v1/teams/{team_id}/connect/functions`
- Auth: none declared

Keep one narrow function server-side; a function that writes asks the owner once.

## Path parameters

- `team_id` string, uuid, required

## Headers

- `authorization` string, nullable
- `x-darwin-token` string, nullable
- `x-darwin-run-id` string, nullable

## Request body

- FunctionDefineRequest
  - `app_slug` string, required
  - `name` string, required
  - `description` string
  - `params` object[]
  - `code` string, required
  - `read_only` boolean, nullable
  - `hosts` string[]
  - `decide_by` string, date-time, nullable

## Response `201`

Successful Response

- object

## Other responses

- `422`: Validation Error

## Changes

> 68 revisions in range; 1 not diffed.

- **2026-10-02** `74e6dcc7900d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/stormy/apis/stormy-control-plane/changes/v1/teams/:team_id/connect/functions/post.md)

---

[API](https://skmtc.dev/stormy/apis/stormy-control-plane.md) · [All operations](https://skmtc.dev/stormy/apis/stormy-control-plane/llms.txt) · [OpenAPI document](https://skmtc.dev/stormy/apis/stormy-control-plane/revisions/a40e83844eaa?raw)
