Bring Your Own Code
Show the results of your own code on your site. Your code runs at the cloud provider you choose (any language, on a schedule) and publishes files plus a small latest.json manifest at your own https location, such as a storage bucket. Add that location as a source: the platform fetches and checks the manifest, keeps the last good version and gives your pages one stable endpoint to read it, with a stale flag when your worker stops. Large files (images, tiles, video) load straight from your location. Paid plans.
Endpoints (5)
Add a source or change one (only send what changes). Project owner only, paid plans. manifest_url: the https URL of your latest.json. allowed_hosts: extra hosts that base_url in the manifest may point to (the manifest host is always allowed). Changing manifest_url or allowed_hosts clears the stored manifest. Then run test-source.
| Field | Type | Required | Description |
|---|---|---|---|
source_key |
string | ✓ Yes | Name of the source, e.g. "weather": 2-40 characters, lowercase letters, digits, - and _. |
manifest_url |
string | No | https URL of latest.json. Needed when the source is new. |
allowed_hosts |
array | No | Host names base_url may use, e.g. ["my-data.ams3.cdn.digitaloceanspaces.com"]. Max 5 including the manifest host. |
cache_ttl |
integer | No | Seconds a fetched manifest stays fresh, 60-3600. Default 300. At most one fetch per source per cache_ttl, also under heavy page traffic. |
max_manifest_bytes |
integer | No | Size cap for latest.json in bytes, 1024-1048576. Default 262144. |
stale_after |
integer | No | Seconds after generated_at that the data counts as stale (get-manifest returns stale true). 60-2592000; 0 turns it off. |
is_active |
boolean | No | false pauses the source; pages then get an error and should show their fallback. |
All sources of this project with their status (last run, last fetch, last error, stale), how many sources the plan allows and the platform limits.
No input parameters required.
Remove a source and its stored manifest. Project owner only; works on every plan. To pause instead, use set-source with is_active false.
| Field | Type | Required | Description |
|---|---|---|---|
source_key |
string | ✓ Yes |
Fetch and check the manifest of a source once, without storing it. Returns ok true with run, generated_at, file count and a sample, or ok false with exactly what is wrong (https, host not allowed, size, missing or invalid fields). Paid plans.
| Field | Type | Required | Description |
|---|---|---|---|
source_key |
string | ✓ Yes |
The last good manifest of a source, for your page: run, generated_at, source, base_url, files, meta, plus fetched_at and stale. Refreshed from your location at most once per cache_ttl. Page pattern: POST to /sapi/project/{id}/execute/byoc/get-manifest with {source_key}; build file URLs only as base_url + file; always show generated_at; when stale is true say the data is delayed; on an error show a short "temporarily unavailable" text.
| Field | Type | Required | Description |
|---|---|---|---|
source_key |
string | ✓ Yes |
MCP Tool Names
When using this integration through an AI assistant (Claude, ChatGPT, Cursor, etc.), the endpoints are available as MCP tools:
| Endpoint | MCP Tool Name |
|---|---|
| set-source | byoc_set_source |
| list-sources | byoc_list_sources |
| remove-source | byoc_remove_source |
| test-source | byoc_test_source |
| get-manifest | byoc_get_manifest |
Website