Skip to main content

Request

Register a function that can be invoked by the framework or external triggers.

Examples

Basic Function Registration

Function with HTTP Invocation and Bearer Auth

Function with HMAC Authentication

Function with API Key Authentication

Error Cases

Missing Environment Variable

If an authentication configuration references an environment variable that doesn’t exist:

Duplicate Function ID

Attempting to register a function with an ID that’s already registered will fail. Unregister the existing function first or use a different ID.

Notes

  • Function IDs must be unique within a worker session
  • Optional fields are omitted from serialization when not provided
  • For WebSocket-based functions (no invocation), the worker must handle InvokeFunction messages
  • For HTTP-based functions, the framework will make HTTP requests to the specified endpoint
  • Authentication credentials are resolved from environment variables at registration time