# Functions Inspect deployed functions or explicitly deploy uploaded function source. | Method | Operation | Path | | --- | --- | --- | | **`GET`** | [List functions](#list-functions) | `/v0/sites/:siteId/functions` | | **`POST`** | [Deploy a function](#deploy-a-function) | `/v0/sites/:siteId/functions/deploy` | ## List functions List deployed function records for a site. **`GET`** `/v0/sites/:siteId/functions` - **API key permission:** Read-only or Read/write ### Parameters - `siteId` — site UUID. - `limit` and `offset` — standard pagination fields. ### Request ~~~sh curl \ "https://api.interfold.dev/v0/sites//functions" \ -H "Authorization: Bearer $INTERFOLD_API_KEY" ~~~ ### Response ~~~json { "functions": [{ "id": "", "path": "api/hello.ts", "status": "ACTIVE" }], "pagination": { "hasMore": false, "nextOffset": null } } ~~~ ### Related interfaces - **MCP:** `list_functions` See [Errors](/api-reference/errors) for the standard error envelope and [Authentication](/api-reference/authentication) for API key handling. --- ## Deploy a function Deploy function source already stored in the site bucket. **`POST`** `/v0/sites/:siteId/functions/deploy` - **API key permission:** Read/write ### Parameters - `siteId` — active site UUID. - `path` — required function source path. ### Request ~~~sh curl -X POST \ "https://api.interfold.dev/v0/sites//functions/deploy" \ -H "Authorization: Bearer $INTERFOLD_API_KEY" \ -H "Content-Type: application/json" \ --data '{ "path": "api/hello.ts"}' ~~~ ### Response ~~~json { "function": { "id": "", "path": "api/hello.ts", "status": "ACTIVE" } } ~~~ ### Behavior and errors - The everyday deployment path is to write `/api/.ts` through the object API or CLI. - Compilation failures return a structured function record with `422` or `500`. See [Errors](/api-reference/errors) for the standard error envelope and [Authentication](/api-reference/authentication) for API key handling. ## Shared behavior All operations use the [API authentication](/api-reference/authentication), [error](/api-reference/errors), and [rate-limit](/api-reference/rate-limits) contracts. List operations use [standard pagination](/api-reference/pagination) unless the operation says otherwise.