CreateFunctionBody

Request body for creating a Function.

Definition

TypeScript
interface CreateFunctionBody {
  workspaceId: string;
  name: string;
  inputSchemaId: string;
  outputSchemaId: string;
  description?: string | undefined;
  source?: "custom" | "system" | "openapi-op" | undefined;
}

Fields

FieldTypeNotes
workspaceIdstringrequired — Workspace that will own the new function.
namestringrequired — Function name
inputSchemaIdstringrequired — Schema enforced on the initial version's input. Required — both I/O contracts must be set so the function is composable from creation.
outputSchemaIdstringrequired — Schema for the initial version's return value. Required — see inputSchemaId.
descriptionstring | undefinedoptional — Function description
source"custom" | "system" | "openapi-op" | undefinedoptional — Override the source; defaults to 'custom' for user-created functions.