Documentation
Everything you need to connect a website and ship an assistant.
1. Create a project
Sign up, then create a project for each website. A project holds the assistant configuration, knowledge sources and conversations.
2. Add knowledge
You can feed the assistant from three source types:
- Crawl — point at a URL; TalkToSite follows same-origin links, respects
robots.txtand indexes page text. - Files — upload PDF, DOCX, XLSX, PPTX, HTML or Markdown; text is extracted and indexed.
- Text — paste FAQs, policies or product copy directly.
Re-crawling a source replaces its previously indexed content.
3. Embed the widget
Paste this snippet before </body>:
<script>
window.TalkToSiteConfig = {
project: "pk_live_…",
api: "https://api.your-domain.com"
};
</script>
<script src="https://cdn.your-domain.com/loader.js" async></script>
The embed key is public. Configure the domain allowlist in project settings to restrict where the widget may run.
API reference
Authentication
Dashboard and admin endpoints use Authorization: Bearer <access_token>. Access tokens are short-lived; use POST /api/auth/refresh to rotate.
Widget endpoints
GET /w/{key}/config— public, sanitized widget configuration.POST /w/{key}/sessions— create a conversation.POST /w/{key}/chat— send a message, returns Server-Sent Events (delta,citations,done).GET /w/{key}/conversations/{id}/messages— transcript.POST /w/{key}/feedback— thumbs up/down.
Dashboard endpoints
GET/POST /api/projects— list and create projects.POST /api/projects/{id}/sources/crawl— queue a crawl (202 +job_id); progress viaGET /api/jobs/{id}.POST /api/projects/{id}/sources/text— index pasted text.POST /api/projects/{id}/sources/file— multipart upload (file+ optionallabel).GET /api/jobs/{id}— background job status.GET /api/org/export,DELETE /api/org— GDPR data export and erasure.GET /api/billing,POST /api/billing/plan,POST /api/billing/checkout— plan, usage and Stripe Checkout.GET/POST /api/webhooks,GET /api/webhooks/deliveries— signed outgoing webhooks.GET /api/projects/{id}/analytics?days=30— volume, resolution rate, top questions.GET /api/conversations— list conversations.PATCH /api/conversations/{id}— set status.
Security
- Tenant data is scoped by
org_idon every query and protected by Postgres Row-Level Security. - Crawling refuses private/internal network addresses (SSRF protection) and validates DNS after resolution.
- The assistant is instructed to treat retrieved documents as untrusted data and to ignore embedded instructions.
- Incoming messages are screened for prompt-injection patterns and blocklisted terms; PII is redacted before storage.
- Passwords use Argon2id; refresh tokens are stored hashed and rotated on use.
- Optional two-factor authentication (TOTP) can be enabled per account.
- Sign in with Google or GitHub via a signed OAuth state and one-time login code.
- Optional CAPTCHA (Turnstile/hCaptcha) protects registration and sign-in.