Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion skills/base44-sdk/references/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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://<app-domain>/functions/<function-name>" \
-H "Content-Type: application/json" \
-d '{"key": "value"}'
```

## Writing Backend Functions

Backend functions run on Deno. Must export using `Deno.serve()`.
Expand Down