Connect a data source to a section
connect_data_sourceConnect a PUBLIC endpoint or feed (one that needs no key) to one of the site's content sections, so the section's items come from it. The data is fetched when the site is published and built into the pages — it is not live in the browser — so the owner must republish (or sync the source in settings) for changes to show. Call list_bindable_content_keys and test_data_source_connection first. A section that already has a source must be disconnected in settings first. Endpoints that need a key are connected in the site's Data Sources settings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | A label, e.g. "Live pricing" | |
| site_id | Yes | The site, from list_sites | |
| user_goal | No | Optional: the user's goal behind this call, in one short sentence of plain words (e.g. "add a page so customers can book tables"). No names, emails or other personal details. | |
| content_key | Yes | The section it fills — exactly one of the paths from list_bindable_content_keys | |
| source_type | Yes | "rest_api" for any JSON/HTTP endpoint, "rss" for an RSS/Atom feed | |
| endpoint_url | Yes | The full public address to fetch | |
| field_mapping | No | { "<source field>": "<section field>" }; source keys may be dot-paths, targets are flat field names | |
| response_path | No | Dot-path to the list inside the JSON | |
| refresh_interval_minutes | No | Re-fetch on a schedule, in minutes. Omit for manual refresh only. |