Functions

Inspect deployed functions or explicitly deploy uploaded function source.

Method Operation Path
GET List functions /v0/sites/:siteId/functions
POST 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

curl \
  "https://api.interfold.dev/v0/sites/<site-id>/functions" \
  -H "Authorization: Bearer $INTERFOLD_API_KEY"

Response

{
  "functions": [{
    "id": "<function-id>",
    "path": "api/hello.ts",
    "status": "ACTIVE"
  }],
  "pagination": { "hasMore": false, "nextOffset": null }
}
  • MCP: list_functions

See Errors for the standard error envelope and 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

curl -X POST \
  "https://api.interfold.dev/v0/sites/<site-id>/functions/deploy" \
  -H "Authorization: Bearer $INTERFOLD_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{  "path": "api/hello.ts"}'

Response

{
  "function": {
    "id": "<function-id>",
    "path": "api/hello.ts",
    "status": "ACTIVE"
  }
}

Behavior and errors

  • The everyday deployment path is to write /api/<name>.ts through the object API or CLI.
  • Compilation failures return a structured function record with 422 or 500.

See Errors for the standard error envelope and Authentication for API key handling.

Shared behavior

All operations use the API authentication, error, and rate-limit contracts. List operations use standard pagination unless the operation says otherwise.

On this page