hosting

POST /v1/sites/{siteId}/chat-agent/sources

Tell the agent what to read, and read it now.

All hosting endpoints

All developer docs

Authentication

Send an API key as a bearer token. This endpoint does not state a specific permission in the specification, so give your key the least it needs and check the response rather than assuming.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/chat-agent/sources \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "kind": <string<hosted_files, crawl, manual>> }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

Three kinds of source, and the first is the one no other host can offer. hosted_files reads the site's pages straight off the box we host it on — no crawl, no rate limit, no robots.txt, and no page missed because nothing links to it. It is available only on our own fleet; on a platform we do not run, this returns a source in state failed saying so in as many words rather than quietly falling back. crawl fetches pages over HTTP from an address you give and follows same-site links. It works anywhere, including sites we do not host. manual is text you type — opening hours, a returns policy, an FAQ. Indexing runs immediately and the response says how many pages were read and whether it stopped at a ceiling. truncated is present when it did.

Parameters

NameTypeRequiredWhat it is
siteId (path)UuidYesSite ID (UUIDv7).

Request body

NameTypeRequiredWhat it is
kindstring<hosted_files, crawl, manual>Yes
urlstringNoRequired for crawl — the address to start from. Same-site links are followed.
textstringNoRequired for manual.
titlestringNoA label you will recognise on the screen.

Response

NameTypeRequiredWhat it is
sourceChatAgentSourceYesOne place the agent's knowledge comes from, and how that last went.
pages_readintegerNo
truncatedstringNo⛔ Present only when indexing stopped at a ceiling rather than at the end of the site, and it says how far it got. A truncation nobody reports reads as a complete index.

Errors this endpoint can return

401 · 403 · 404 · 422