Also available: Markdown version · llms.txt · full site content
Functions
HTTP functions
Every deployed function with an HTTP trigger is an HTTPS endpoint at https://{slug}.api.cubibase.com/functions/{name}. The gateway enforces authentication, signatures and limits before your code runs.
The endpoint
GET, POST, PUT, PATCH, DELETE and OPTIONS are supported. Headers, query parameters, extra path segments and the raw body reach your handler unchanged. The response your handler returns is the response the caller receives (bounded by the platform response-size limit).
curl "https://example-project.api.cubibase.com/functions/hello-world?name=Ada"
# {"message":"Hello, Ada!","invocationId":"…"}Authentication modes
Authentication is a gateway setting, independent of your code and of payload signatures. JWT is the default when you create a function.
| Mode | Caller must present | Use for |
|---|---|---|
jwt (default) | Authorization: Bearer <end-user access JWT> from CubiBase Auth | Calls from your signed-in users |
public | Nothing | Webhooks and open endpoints — pair with signature verification |
api_key | A project secret API key (cb_sec_…) in the apikey header or as Bearer | Server-to-server calls from trusted code |
internal | Not externally reachable at all | Functions invoked only by other CubiBase machinery |
curl -X POST "https://example-project.api.cubibase.com/functions/openai-proxy" \
-H "Authorization: Bearer <USER_ACCESS_JWT>" \
-H "content-type: application/json" \
-d '{"prompt": "Summarize row-level security in one sentence."}'curl -X POST "https://example-project.api.cubibase.com/functions/send-email" \
-H "apikey: cb_sec_YOUR_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"to": "ada@example.com", "subject": "Welcome", "text": "Glad you are here."}'Gateway responses
| Status | When |
|---|---|
401 | Missing/invalid JWT, missing/invalid secret key, or a failed signature check |
404 | Unknown project host, unknown function, no enabled HTTP trigger, or internal-only function |
409 | The function is disabled, or has no active deployment yet |
413 | The request body exceeds the platform request-size limit |
402 | The monthly invocation or compute allowance is exhausted |
429 | The per-project HTTP rate limit or concurrent-execution limit is reached — retry shortly |
500 | The function threw or exceeded its configured timeout (status recorded as timeout) — details are in Executions & Logs, not in the caller response |
502 | The function returned an oversized response |
Internal errors never leak infrastructure details to the caller. The invocation id in the error body matches the execution record in the Console.