diff --git a/skills/base44-sdk/references/functions.md b/skills/base44-sdk/references/functions.md index 09419d3..8072465 100644 --- a/skills/base44-sdk/references/functions.md +++ b/skills/base44-sdk/references/functions.md @@ -4,7 +4,7 @@ Invoke custom backend functions via `base44.functions`. ## Contents - [Method](#method) -- [Invoking Functions](#invoking-functions) (Frontend, File Upload, Service Role) +- [Invoking Functions](#invoking-functions) (Frontend, File Upload, Service Role, REST API) - [Writing Backend Functions](#writing-backend-functions) (Basic, Service Role, Secrets, Errors) - [Setup Requirements](#setup-requirements) - [Authentication Modes](#authentication-modes) @@ -54,6 +54,16 @@ const result = await base44.asServiceRole.functions.invoke("adminTask", { }); ``` +### Via REST API (curl) + +Functions can be called via HTTP POST to your app domain: + +```bash +curl -X POST "https:///functions/" \ + -H "Content-Type: application/json" \ + -d '{"key": "value"}' +``` + ## Writing Backend Functions Backend functions run on Deno. Must export using `Deno.serve()`.