hosting
POST /v1/sites/{siteId}/chat-agent/sources
Tell the agent what to read, and read it now.
Uwierzytelnianie
Wyślij klucz API jako token bearer. Ten punkt końcowy nie określa konkretnego uprawnienia w specyfikacji, więc nadaj swojemu kluczowi minimum potrzebnych uprawnień i sprawdź odpowiedź zamiast zakładać.
Ten punkt końcowy nie wymaga identyfikatora organizacji. Twój klucz już identyfikuje organizację, do której należy, a odpowiedź jest do niej ograniczona.
Wypróbuj
Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.
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>> }'Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API
Szczegóły
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.
Parametry
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
siteId (path) | Uuid | Tak | Site ID (UUIDv7). |
Treść żądania
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
kind | string<hosted_files, crawl, manual> | Tak | — |
url | string | Nie | Required for crawl — the address to start from. Same-site links are followed. |
text | string | Nie | Required for manual. |
title | string | Nie | A label you will recognise on the screen. |
Odpowiedź
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
source | ChatAgentSource | Tak | One place the agent's knowledge comes from, and how that last went. |
pages_read | integer | Nie | — |
truncated | string | Nie | ⛔ 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. |
Błędy, które ten punkt końcowy może zwrócić
401 · 403 · 404 · 422