Connect
External APIs
1 min readOpen in Neblex
External APIs let functions call other systems while someone configures: a live exchange rate, stock levels, a price from your ERP. Each API is set up once by a superuser in Settings › External APIs, with its address and credentials kept there, and functions call it by name with apiCall(name, params).
Set up an external API
| Setting | Meaning |
|---|---|
| Name | What functions use in apiCall(), for example exchange-rates. |
| URL and Method | The endpoint to call. It must be a public https:// address. |
| Auth Type | None, Basic Auth (username and password), Bearer Token, or an API key in a header (Header Name and Key Value). Stored credentials are never shown again; leave the fields empty when editing to keep them. |
| Custom Headers | Further headers as JSON, such as {"Accept-Language": "en-US"}. |
| Body Template | How the parameters from apiCall() are put into the request. Without a template the parameters are sent as JSON. |
| Cache TTL | How many seconds a response is reused for the same parameters; 0 disables caching. Caching makes configuration faster and spares the other system. |
| Rate Limit | The most calls per hour, to protect the other system and your account with it. |
Enter Test Parameters and click Test to make a live call and see the response. An active API can only be saved after a successful test, so a broken endpoint never reaches your models. An API that functions use cannot be deleted.
Calls and their timings appear in a function's test Trace and in Config performance.