← Docs · Share and automate

Widget API and callbacks

Serve a widget's rows at a private address another app can call, and have jobs call a webhook or a Claude Code routine when they run.

Checked against the app on 2026-12-02

These are two separate features. A widget API serves one widget's current rows at a private web address, for a script or service outside Fastero. A callback calls a destination your Owners and Admins approved when a job fails, finishes or an alert fires. Claude publishes widgets and attaches callbacks over MCP; you manage both in the app.

Widget API

Publish a widget

Claude publishes a widget with the fastero_publish_widget_api tool. It needs:

  • a connection with the Publish widgets as private APIs: anyone holding an address's key can read that widget's rows permission, which no preset ticks (Connect Claude to Fastero)
  • an Owner, Admin or Editor role in the project
  • a query, spreadsheet or notebook-cell widget; other widgets are refused

Claude answers with the address, the key and a curl command. The key is shown only then; Fastero keeps just its hash. Every publish emails the organization's Owners and notifies them in the app.

Call the address

Send the key in the X-Endpoint-Key header; no other credential is needed:

curl -H "X-Endpoint-Key: <key>" https://api.fastero.com/api/pub/report/<project id>/<widget address>
{ "fromCache": true, "lastUpdated": "2026-12-02T09:00:00.000Z", "rows": [{ "month": "2026-11", "revenue": 18250 }], "truncated": false }
  • A query widget's rows are at most five minutes old. A spreadsheet widget returns its stored rows, a notebook-cell widget its notebook's last run. lastUpdated says when the rows were taken; truncated is true when rows were left out to fit the size limit.
  • Add ?format=csv, or send Accept: text/csv, for CSV. Send Accept: application/x-ndjson for one JSON row per line.
  • A missing or wrong key gets 401. An address that is turned off gets 404. Requests are rate-limited, and a caller over the limit gets 429.

See and turn off published widgets

  1. Open Project Settings: from the project's menu in the workbench's side tree, or from Settings → Projects.
  2. Under API, choose Widget APIs. Every member of the project can see the list, with each address and when it was published.
  3. Click Turn off next to a widget and confirm. Owners, Admins and Editors can do this.

The key stops working at once. Publishing the widget again keeps its address and gives a new key. Claude can also turn one off, with fastero_unpublish_widget_api.

Callbacks

Add a destination

Owners and Admins add destinations; other members see the list.

  1. Go to Settings → Callbacks (under Developers).
  2. Under Add a destination, enter a Name and choose the Kind: Webhook or Claude Code routine.
  3. Enter the Address. A webhook needs an https address that accepts POST; internal addresses are refused. A routine needs its API trigger address, https://api.anthropic.com/v1/claude_code/routines/…/fire, and the Routine token shown when you generated the trigger.
  4. Click Add destination. For a webhook, Fastero shows the signing secret once: copy it.
  5. Click Send test on its row to check that it arrives.

Attach a destination to a job

Ask Claude. It lists destinations with fastero_list_callback_destinations and attaches one by name with fastero_set_job_callback. No tool takes an address or adds a destination, so a conversation can only send to destinations an Owner or Admin approved. Attaching needs an Owner, Admin or Editor role and the Create and update queries, dashboards and reports permission.

Job Events
Python project, or one of its entrypoints failed, succeeded
Scheduled dashboard email or notebook run failed, succeeded
Alert alert (it fires or recovers), failed (its check could not run)

What is sent

A webhook gets a POST signed the Standard Webhooks way, with webhook-id, webhook-timestamp and webhook-signature headers. Verify it with the signing secret, and use webhook-id to ignore repeats.

{
  "type": "job.failed",
  "timestamp": "2026-12-02T09:00:00.000Z",
  "data": {
    "jobType": "python_project",
    "jobId": "…",
    "jobName": "Nightly load",
    "runId": "…",
    "status": "failed",
    "summary": "Python run failed: Nightly load",
    "error": "…"
  }
}

type is job.failed, job.succeeded, alert.fired or alert.recovered. A Claude Code routine instead starts a new session, given a short text naming the job, the run and the error: at most once per event, and 25 times an hour.

Failures

A webhook is retried after a network error, a 429 or a 5xx, waiting longer each time. A 410, or ten failed deliveries in a row, switches the destination off and tells whoever added it, by email and in the app. Switch on turns it back on with its jobs still attached. Remove detaches every job, and adding it again does not reattach them.

Related