Aufbauen auf Conecto
Eine übersichtliche REST-API für alles, was die Plattform kann: Erstellen Sie Bots, die nicht nur antworten, sondern handeln , in Ihrer Datenbank, Ihrer Abrechnung und Ihrem Produkt, senden Sie Bilder, GIFs, Videos und Karten in den Chat und eigene Integrationen erstellen die der KI-Agent während der Unterhaltung aufruft, unabhängig von der zugrunde liegenden Software. Wenn das Widget es kann, kann die API es steuern.
Produktiv im Einsatz · Signierte Webhooks · 300 Anfragen/Min.
Grundlagen
Base URL https://conecto.chat/api/v1. Create a credential in Einstellungen → Entwickler , Sie erhalten eine Client-ID und eine Secret (shown once, stored hashed). Authenticate with HTTP Basic — client ID as username, secret as password — or Authorization: Bearer <client_id>:<secret>. A credential can cover the whole workspace or be scoped to a single widget.
curl https://conecto.chat/api/v1/me/ -u "ck_your_client_id:cs_your_secret"Arbeiten Sie mit Python? Die offizielles SDK (pip install conecto) wraps all of this, and does the parts that are easy to get subtly wrong for you: webhook signature verification, delivery deduplication, idempotent writes, retries, and block validation that fires before a request leaves your process. Everything below still applies — it is the same API underneath.
Ratenbegrenzung 300 Anfragen/Min. per credential (429 + Retry-After beyond it). Errors are always {"error": {"code", "message"}}. List endpoints paginate with limit und before_id, returning next_before_id. Write endpoints accept an Idempotency-Key header (any UUID): retry the same key and you get the message that was already created, with a 200 instead of a 201, rather than a second copy in front of the visitor.
Ein Endpunkt beschreibt alle anderen
GET /schema/ gibt die gesamte Oberfläche als JSON zurück, jeden Endpunkt, jedes Ereignis, jeden Blocktyp, jede reservierte Aktion, jeden Fehlercode und jedes numerische Limit. Die Antwort wird von demselben Code bereitgestellt, der diese Grenzen durchsetzt, und kann daher nicht wie eine Dokumentationsseite vom laufenden Server abweichen. Generieren Sie Ihren Client daraus oder prüfen Sie beim Start, ob die benötigte Funktion bereitgestellt ist.
curl https://conecto.chat/api/v1/schema/ -u "ck_...:cs_..." | jq '.limits, .events[].name'Every response carries X-Conecto-Api-Version. Pin it in your client and log a warning when it changes — that header is how you find out a field moved before your users do.
Rich Content: Bilder, GIFs, Videos, Karten
Any message you send can carry blocks — an ordered list of typed content rendered under the bubble in the widget, and in the agent's inbox exactly as the visitor saw it. Up to 10 per message, and every field is validated and re-projected server-side, so you never hand us markup and we never hand the browser a string.
curl -X POST https://conecto.chat/api/v1/conversations/42/messages/ \
-u "ck_...:cs_..." -H "Content-Type: application/json" \
-d '{
"body": "Here is how to reset it — takes about 20 seconds:",
"blocks": [
{"type": "image", "url": "https://cdn.you.com/reset.gif", "alt": "Reset flow"},
{"type": "buttons", "items": [
{"label": "That worked"},
{"label": "Full guide", "url": "https://docs.you.com/reset"}
]}
]
}'Blocktypen
imageurl, alt, caption, link — animated GIFs are just imagesvideourl to an .mp4/.webm/.mov, plus poster, autoplay, loop, mutedembedprovider youtube · vimeo · loom · wistia · spotify und die normale Teilen-URL urlaudiourl zu einer .mp3/.wav/.m4a-Datei, optional titlefileurl, filename, size — rendered as a download rowcardsitems[] of title · subtitle · text · image · url · price · badge · buttons; layout carousel or listlistrows[] aus Label · Wert · Untertitel · Bild · URL, für Bestellübersichten und Versandschrittebuttonsitems[]: {label, value} replies as the visitor, {label, url} opens a linktext · dividerzusätzliche Absätze und eine horizontale TrennlinieURLs must be https. A block that can't be built is a 400 naming the block and the reason, never a silent drop — an image that vanishes without explanation costs an afternoon to track down.
Ein GIF ohne vorhandenen Speicherort senden
POST /media/ takes a multipart file (≤10 MB) and hands back a URL you can drop straight into a block. Use the returned url — it is a path, resolved against the widget's own origin, so the same message works in development and in production.
URL=$(curl -s -X POST https://conecto.chat/api/v1/media/ -u "ck_...:cs_..." \
-F "file=@celebrate.gif" | jq -r .media.url)
curl -X POST https://conecto.chat/api/v1/conversations/42/messages/ \
-u "ck_...:cs_..." -H "Content-Type: application/json" \
-d "{\"body\": \"All set!\", \"blocks\": [{\"type\": \"image\", \"url\": \"$URL\"}]}"Shipping a GIF as a muted, looping video block is usually the better trade: a tenth of the bytes, and the visitor cannot tell the difference.
Ein Kartenkarussell
{"blocks": [{
"type": "cards",
"items": [
{"title": "Trail Runner 2", "subtitle": "Road · Neutral",
"price": "89.00 USD", "badge": "Back in stock",
"image": "https://cdn.you.com/tr2.jpg",
"url": "https://shop.you.com/p/tr2",
"buttons": [{"label": "Add to cart", "url": "https://shop.you.com/cart/add/tr2"}]}
]
}]}Eigene Integration erstellen
Shopify, Stripe und BigCommerce sind Integrationen, die wir geschrieben haben. Dies ist die Integration, die Sie schreiben. Beschreiben Sie Ihren Dienst mit einer Basis-URL und einer Liste von Aktionen, installieren Sie ihn auf einem Widget, und der KI-Agent ruft ihn während der Unterhaltung auf. Nachgelagerte Systeme können ihn nicht von einer nativen Integration unterscheiden. Genau darum geht es: Wenn Ihr Shop, Ihre Abrechnung oder Ihr CRM auf einer uns unbekannten Lösung läuft, müssen Sie nicht mehr auf unsere Unterstützung warten.
1 · Registrieren
curl -X POST https://conecto.chat/api/v1/integrations/ \
-u "ck_...:cs_..." -H "Content-Type: application/json" \
-d '{
"slug": "acme-store",
"name": "Acme Store",
"base_url": "https://api.acme.example/conecto",
"auth_type": "bearer",
"credential": "sk_live_...",
"actions": [
{"name": "catalog.search_products", "path": "/search",
"description": "Search the Acme catalog by keyword.",
"parameters": [{"name": "query", "type": "string", "required": true},
{"name": "limit", "type": "integer"}]},
{"name": "orders.get_status", "path": "/orders/status", "risk": "verified_read",
"description": "Look up one of the visitor's orders by number.",
"parameters": [{"name": "order_number", "type": "string", "required": true}]},
{"name": "warranty.register", "path": "/warranty", "risk": "write",
"description": "Register a warranty for a product the visitor owns.",
"parameters": [{"name": "serial", "type": "string", "required": true}]}
]
}'The response includes a signing_secret. You need it to verify our calls — it is readable on every later GET too, and {"rotate_signing_secret": true} rolls it.
2 · Auf einem Widget installieren
curl -X POST https://conecto.chat/api/v1/integrations/acme-store/install/ \
-u "ck_...:cs_..." -H "Content-Type: application/json" \
-d '{"widget_ids": [7], "actions": ["catalog.search_products", "orders.get_status"]}'actions is an allowlist — omit it to enable everything you declared, or pass [] to keep the integration installed but idle. Nothing is exposed until you install it, and installing is per widget.
3 · Aufruf beantworten
We POST a signed JSON envelope to base_url + path. Verify the signature the same way you verify a webhook — one routine covers both directions:
// POST https://api.acme.example/conecto/search
{
"action": "catalog.search_products",
"integration": "acme-store",
"arguments": { "query": "trail shoes", "limit": 3 },
"source": "ai_agent",
"idempotency_key": "8f14e45fceea167a...",
"workspace": { "id": 12 },
"widget": { "id": 7, "key": "w_..." },
"conversation": { "id": 4821 },
"visitor": { "session": "…", "email": "maya@acme.io",
"verified": true, "verified_email": "maya@acme.io", "name": "Maya" }
}
// Headers: X-Conecto-Signature: sha256=<HMAC-SHA256(signing_secret, raw body)>
// X-Conecto-Timestamp, X-Conecto-Action, X-Conecto-Integration,
// X-Conecto-Idempotency-KeyMit einer von fünf Formen antworten:
{"ok": true, "result": {...}} // success — the agent reads it
{"ok": true, "result": {...}, "blocks": [...]} // …and attach rich content to the reply
{"ok": true, "not_found": true} // nothing matched (a normal outcome)
{"verify_required": true} // "I need a verified visitor for this"
{"ok": false, "error": "Already cancelled."} // a failure the agent may relayEin einfaches JSON-Objekt ohne einen dieser Schlüssel wird als Ergebnis selbst behandelt. So können Sie eine Aktion auf einen bereits vorhandenen Endpunkt richten. Budget: 8 Sek. Timeout, 128 KB -Antwort. Alles, was Sie zurückgeben, erreicht das Modell als Daten in einem JSON-Envelope, niemals als Anweisungen. Schlüssel, die wie Secrets aussehen, werden beim Eingang entfernt.
4 · Vor dem Einsatz bei Besuchern testen
curl -X POST https://conecto.chat/api/v1/integrations/acme-store/actions/catalog.search_products/run/ \
-u "ck_...:cs_..." -H "Content-Type: application/json" \
-d '{"arguments": {"query": "trail shoes"}}'This runs the real call path — signature, credential, timeout, parsing — and shows you the envelope the agent will get. Pass conversation_id to run it in the context of a live chat, which is the only way a verified action can succeed.
Risikostufen und die eine Regel, die nicht deaktiviert werden kann
public_readKatalog, Verfügbarkeit, Dokumentation, keine Identität erforderlichverified_readDaten einer einzelnen Person. Abgelehnt, bis die E-Mail-Adresse des Besuchers verifiziert istpublic_writeeine Änderung ohne Identitätsprüfung, etwa Newsletter-Anmeldung oder Lead-Erfassungwriteeine Änderung am Konto einer einzelnen Person. Verifiziert und niemals stillschweigend wiederholtBei den letzten beiden wird die verifizierte Adresse von bereitgestellt uns, in visitor.verified_email — never taken from the model's arguments. Verification comes from an emailed code, or from your own site Bestätigung eines angemeldeten Benutzers. Keine Widget-Einstellung kann eine Aktion davon ausnehmen, denn „Wessen Bestellung ist das?“ darf nicht durch einen Schalter beantwortet werden.
Reservierte Aktionen: Ihr Shop, wie eine native Integration eingebunden
A few action names mean something to the platform itself. Declare catalog.search_products returning {"products": [{title, url, image, price_from, currency, available}]} and its results become product cards under the AI's replies and fill the widget's Home showcase — the same treatment a Shopify connection gets, from whatever your catalog actually runs on. orders.get_status, orders.get_tracking, orders.list_recent und account.lookup are reserved the same way, and are always verified reads. GET /integrations/{slug}/actions/ returns the full catalog with the shape each one expects.
Eigene Integrationen gehören zu den KI-Agent-Plänen und sind auf 20 pro Workspace mit jeweils 40 Aktionen begrenzt. Ausgehende Aufrufe verwenden ausschließlich HTTPS, werden vor dem Verbindungsaufbau auf eine öffentliche IP aufgelöst und daran gebunden, und Weiterleitungen werden abgelehnt. Eine Integrations-URL kann daher niemals auf ein privates Ziel verweisen.
Schnellstart: ein eigener Bot in drei Schritten
A bot is a webhook and a reply. Subscribe to message.created, answer through the messages endpoint, and the widget renders it live — quick-reply buttons, email capture, the native ticket form, typing indicators. Turn the built-in AI off on the widget and your bot owns the conversation.
1. Server abonnieren (Einstellungen → Entwickler → Webhooks oder über die API):
curl -X POST https://conecto.chat/api/v1/webhooks/ \
-u "ck_...:cs_..." -H "Content-Type: application/json" \
-d '{"url": "https://bots.yourapp.com/conecto",
"events": ["message.created", "conversation.created"]}'2. Ereignis verifizieren und lesen. Every delivery is signed: X-Conecto-Signature: sha256=<HMAC-SHA256(secret, raw body)>.
// Node/Express
app.post('/conecto', express.raw({ type: '*/*' }), (req, res) => {
const sig = 'sha256=' + crypto.createHmac('sha256', WEBHOOK_SECRET)
.update(req.body).digest('hex')
if (sig !== req.get('X-Conecto-Signature')) return res.sendStatus(401)
const { event, data } = JSON.parse(req.body)
if (event === 'message.created' && data.message.sender === 'visitor') {
handle(data) // your bot logic — reply async, respond 200 fast
}
res.sendStatus(200)
})3. Mit Funktionen antworten.
curl -X POST https://conecto.chat/api/v1/conversations/42/messages/ \
-u "ck_...:cs_..." -H "Content-Type: application/json" \
-d '{"body": "I can refund order #1284 right away — confirm?",
"buttons": ["Yes, refund it", "Talk to a human"]}'Button taps come back to your webhook as normal visitor messages containing the button text — your bot's state machine lives entirely on your side. Other reply powers: blocks sends images, GIFs, video and cards (see Rich Content), {"ask_email": true} renders the email-capture form, {"ticket_form": true} attaches the native open-a-ticket form, products renders tappable product cards, {"internal": true} leaves an agent-only note, /typing/ shows “…is typing”, /handoff/ summons a human, and PATCH closes the conversation when you're done.
Bot-Kochbuch
Rezepte, die tatsächlich produktiv eingesetzt werden. Jedes besteht aus einem Webhook-Handler und einigen API-Aufrufen.
1 · Der Aktions-Bot, ändert Dinge in Ihr Software
Da der Webhook trifft Ihr -Server kann Ihr Bot alles tun, was Ihr Backend kann: in Ihre Datenbank schreiben, Ihr Abrechnungssystem aufrufen und einen Datensatz in Ihrer Buchhaltungssoftware aktualisieren. In Verbindung mit bestätigte Identität Sie genau wissen, wer fragt. Daher kann „Diese 250-Dollar-Quittung unter Marketing ablegen“ sicher ausgeführt werden:
async function handle({ conversation, visitor, message }) {
const convo = conversation.id
// "file 250 under Marketing" — your parsing, your rules
const cmd = parseAccountingCommand(message.body)
if (!cmd) return reply(convo, "Tell me e.g. 'file 250 under Marketing'.")
// Only act for users YOUR backend has vouched for (logged in on your site)
if (!visitor.verified)
return reply(convo, "Please sign in first, then ask me again.", ["Log in"])
await ledger.addEntry({ // <- YOUR accounting system
account: cmd.account,
amount: cmd.amount,
user: visitor.verified_email, // identity Conecto guarantees
})
await reply(convo,
`Done — $${cmd.amount} filed under ${cmd.account}. Anything else?`,
["Show this month's entries", "Undo that"])
}Dasselbe Muster gilt für „meinem Plan einen Platz hinzufügen“, „mein Projekt umbenennen“ oder „Donnerstag einen Termin buchen“. Der Bot ist eine schlanke Konversationsschicht über Ihrer eigenen API. Möchten Sie lieber die integrierte KI statt eines eigenen Bots verwenden? Dieselben Endpunkte als Integration registrieren und die Conecto-KI ruft sie während der Unterhaltung mit derselben Identitätsprüfung auf, ohne dass Sie eine Zustandsmaschine pflegen müssen. Wenn Sie bereits MCP verwenden, funktioniert auch ein entfernter MCP-Toolserver: Dashboard → KI-Agenten → Integrationen.
2 · Bestellstatus-Bot
if (/where.*order|track/i.test(message.body)) {
await typing(convo, 'OrderBot', true)
const order = await shop.lastOrder(visitor.email) // your store
await reply(convo, order
? `Order #${order.id} is ${order.state} — arriving ${order.eta}.`
: "I couldn't find an order for this email.",
order ? [`Track #${order.id}`] : undefined)
}3 · Bot zur Ticketvermeidung
Zuerst das Hilfe-Center durchsuchen; nur ein Ticket öffnen, wenn nichts passt:
const { articles } = await api('GET', '/articles/?q=' + q + '&published=true')
if (articles.length)
await reply(convo, `This might help: “${articles[0].title}”. Did that solve it?`,
["Solved it", "Open a ticket"])
else
await api('POST', `/conversations/${convo}/messages/`,
{ body: "Let's get this to the team.", ticket_form: true })4 · Bot zur Leadqualifizierung
// no email yet? capture it natively, then enrich + route
if (!visitor.email)
return api('POST', `/conversations/${convo}/messages/`,
{ body: "Happy to help — what's your work email?", ask_email: true })
await api('POST', '/contacts/', { email: visitor.email,
custom_fields: { lead_source: 'chat', intent: classify(message.body) } })
await api('POST', `/conversations/${convo}/messages/`,
{ body: "Routing you to sales…", internal: true })
await api('POST', `/conversations/${convo}/assign/`, { user_id: SALES_USER_ID })
await api('POST', `/conversations/${convo}/handoff/`)5 · Proaktive Lifecycle-Nachrichten
An eine Besuchersitzung senden, ohne auf eine Nachricht zu warten, etwa Versandupdates, Testhinweise oder Warenkorbwiederherstellung:
curl -X POST https://conecto.chat/api/v1/widgets/7/visitors/$SESSION/message/ \
-u "ck_...:cs_..." -H "Content-Type: application/json" \
-d '{"body": "Your order shipped — want live tracking?",
"buttons": ["Track my order"]}'Cart recovery works the same way, with products putting the item itself back in front of them as a tappable card:
-d '{"body": "Still thinking it over? Your cart is saved:",
"products": [{"title": "Trail Runner 2", "price_from": "89.00",
"currency": "USD", "image": "https://cdn.you.com/tr2.jpg",
"url": "https://shop.you.com/cart"}]}'6 · Ein unbekannter Shop, mit der KI verbunden
Kein Webhook, keine Zustandsmaschine: Deklarieren Sie die reservierte Katalogaktion, verweisen Sie auf Ihren Suchendpunkt, und die KI empfiehlt Artikel aus Ihrem Katalog mit echten Produktkarten.
// POST /conecto/search on your server
app.post('/conecto/search', verifyConectoSignature, async (req, res) => {
const { query, limit = 4 } = req.body.arguments
const hits = await catalog.search(query, { limit }) // <- YOUR catalog
res.json({ ok: hits.length > 0, not_found: hits.length === 0,
products: hits.map(p => ({
title: p.name, url: p.permalink, image: p.thumbnail,
price_from: p.price.toFixed(2), currency: p.currency,
available: p.stock > 0,
})) })
})Das ist die gesamte Integration. Die Karten, die Home-Auswahl, die Vorgabe „vor dem Erwähnen eines Produkts erneut aufrufen“ und die Regel gegen rohe URLs aus dem Modell gehören automatisch zum reservierten Namen.
7 · CSAT-Nachverfolgung
Subscribe to conversation.rated; thank promoters, rescue detractors:
if (event === 'conversation.rated') {
if (data.rating.score <= 2)
await api('POST', '/tickets/', { email: data.visitor.email,
message: `Low CSAT (${data.rating.score}/5): ${data.rating.comment}`,
priority: 'high' })
else
await push(data.widget.id, data.visitor.session,
"Glad we could help! Here's 10% off your next order: THANKS10")
}Sicher auf Ihren eigenen Systemen handeln
Drei Regeln machen Aktions-Bots produktionsreif:
1. Zuerst die Identität. Only mutate data for sessions where visitor.verified is true — your backend vouched for them via /identify/. The vouch is time-boxed and session-scoped; revoke it with /unverify/ on logout.
2. Destruktive Schritte bestätigen. Aktion als Frage mit Schaltflächen senden („Bestellung #1284 erstatten?“ · Ja / Nein), der Klick kommt als Schaltflächentext zurück, Ihr idempotenter Handler wird ausgeführt und das Transkript dokumentiert die Einwilligung.
3. Bei Unsicherheit an einen Menschen übergeben. POST /conversations/{id}/handoff/ flags the thread human-needed (your routing rules apply), and {"internal": true} notes give the teammate full context your bot gathered.
Endpunktreferenz
Gespräche und Nachrichten
/conversations/Newest first. Filters: status (open · pending · closed), widget_id, session; paginate with limit/before_id.
/conversations/{id}/Conversation + visitor-facing transcript (≤500 messages, since_id for increments).
/conversations/{id}/messages/body (≤4000), buttons (≤6 × 60 chars), blocks (≤10 — see Rich Content), ask_email, ticket_form (native ticket form), internal (agent-only note), products (≤4 cards rendered as a mini carousel under the bubble: {title, url, price_from, currency, image} — title required, everything else optional). Honors Idempotency-Key. 409 when closed.
/conversations/{id}/typing/{"name": "OrderBot", "on": true} , läuft nach etwa 8 Sekunden automatisch ab.
/conversations/{id}/assign/{"user_id": 12} (or null to unassign) — teammates come from /members/.
/conversations/{id}/handoff/Als „Mensch erforderlich“ markieren; erscheint wie eine KI-Übergabe im Posteingang, einschließlich Routingregeln.
/conversations/{id}/{"status": "closed" | "open"}. Closing fires conversation.closed.
/widgets/{widget_id}/visitors/{session}/message/Proactive push: reuses the session's live conversation or opens one; body + buttons + blocks + products. Honors Idempotency-Key.
Integrationen, Ihre eigene Software als vollwertige Integration
/integrations/ · POSTList, or register one: slug, name, base_url (https), optional description/icon_url/homepage_url, auth_type (none · bearer · api_key · basic) + credential, and actions inline. Returns the signing_secret you verify our calls with.
/integrations/{slug}/ · PATCH · DELETEPATCH takes the same fields; actions upserts by name and replace_actions: true makes your list authoritative (deploy-from-source). rotate_signing_secret rolls the secret; active: false switches it off everywhere at once.
/integrations/{slug}/actions/ · POST · DELETE /{name}/Each action: name (dotted, e.g. orders.lookup), path, method, risk, description (what the AI reads), parameters ({name, type, required, description, enum}), ai_enabled. GET also returns the reserved-action catalog.
/integrations/{slug}/install/ · /uninstall/widget_ids (all visible widgets when omitted), actions allowlist, enabled.
/integrations/{slug}/actions/{name}/run/Invoke it now through the real call path. arguments, optional conversation_id for visitor context. Returns {status, result, blocks}.
Medien
/media/Multipart file (≤10 MB) → {media: {url, absolute_url, filename, content_type, size, is_image}}. Put url in an image/video/file block.
Tickets
/tickets/Filters: status (open · pending · resolved), email; paginated.
/tickets/email, message, optional name, category_id, priority (low · normal · high · urgent), submission_id (UUID idempotency key). The requester gets the standard acknowledgement email.
/tickets/{id}/ · PATCHDetail with the comment thread; PATCH status, priority, assignee_user_id.
/tickets/{id}/reply/body — emails the requester; internal: true for a private note.
/ticket-categories/Die Kategorien des Workspace für die Ticketerstellung.
Kontakte, Ihre Benutzerdatenbank synchronisieren
/contacts/Upsert by email (201 created / 200 updated): profile fields + custom_fields (≤30 keys, merged).
/contacts/ · GET/PATCH/DELETE /contacts/{id}/Search with email (exact) or q; standard pagination.
Besucher, Identität und Personalisierung
/widgets/{widget_id}/visitors/{session}/identify/email (required), name, data (custom fields), verified + verify_hours (≤72, default 12) — see Identität. Sitzungen können vorab bereitgestellt werden.
/widgets/{widget_id}/visitors/{session}/unverify/Bestätigung widerrufen, beim Abmelden aufrufen.
/widgets/{widget_id}/visitors/{session}/Aktuelle Identität: E-Mail, Name, Verifizierungsstatus.
Wissensdatenbank
/articles/q full-text search, published=true filter — perfect for bot answer lookups.
/articles/ · GET/PATCH/DELETE /articles/{id}/Dokumentation programmatisch synchronisieren. HTML-Inhalte werden serverseitig anhand einer Positivliste bereinigt.
Konfiguration und Metadaten
/widgets/{widget_id}/ · PATCHWidget-Konfiguration lesen/aktualisieren, Begrüßung, Farben, Home-Aktionsschaltflächen, Schnellfragen, Geschäftszeiten und dieselben validierten Felder, die der Dashboard-Customizer bearbeitet.
/members/Teammitglieder (user_id, name, role) für Zuweisungen.
/stats/Live-Zahlen: offene/ausstehende Unterhaltungen, offene Tickets, Kontakte, veröffentlichte Artikel.
/me/Ihr Workspace, der Geltungsbereich der Zugangsdaten und Widgets (IDs + Einbettungsschlüssel).
/schema/Die maschinenlesbare Beschreibung aller oben genannten Elemente: Endpunkte, Ereignisse, Blocktypen, reservierte Aktionen, Fehlercodes und Limits. Generieren Sie Ihren Client daraus.
Identität: erneute Verifizierung für angemeldete Benutzer überspringen
Das Widget speichert seine Sitzungs-ID im Browser. Lesen Sie sie clientseitig, senden Sie sie mit Ihrem eigenen Sitzungscookie an Ihr Backend und bestätigen Sie die Identität dann von Server zu Server:
# your backend, right after your own auth check
curl -X POST https://conecto.chat/api/v1/widgets/7/visitors/$CONECTO_SESSION/identify/ \
-u "ck_...:cs_..." -H "Content-Type: application/json" \
-d '{"email": "maya@acme.io", "name": "Maya",
"verified": true, "verify_hours": 24,
"data": {"plan": "pro", "customer_since": "2024"}}'While the vouch lasts, Conecto treats the email as verified: the widget knows their name, chats attach to the right CRM contact, and flows that normally demand an email OTP — refund lookups, order changes, sensitive account data through the AI's tools — proceed without one. Your attestation is as strong as our code-by-email, because you actually authenticated them. Only vouch sessions your backend has verified, and call /unverify/ on logout.
Webhooks
Manage in the dashboard or via GET/POST /webhooks/ und DELETE /webhooks/{id}/ (https only, ≤10 per workspace, optional per-widget scope). Deliveries carry X-Conecto-Event, X-Conecto-Delivery, X-Conecto-Timestamp and the HMAC signature, and time out after 2.5s — respond 200 fast, process async. Events:
conversation.createderste Besuchernachricht eines neuen Threads, einschließlich Formulare im Home-Tabmessage.createdjede Besuchernachricht, der Auslöser des eigenen Botsconversation.closeddurch einen Mitarbeiter oder die API geschlossenconversation.assignedeinem Teammitglied zugewiesen oder die Zuweisung aufgehobenconversation.handoffals „Mensch erforderlich“ markiertconversation.ratedCSAT-Bewertung eines Besuchers (1–5 + Kommentar)ticket.createdjede Quelle: Widgetformular, KI, Bots, Automatisierungen, APIticket.updatedStatus, Priorität oder zugewiesenes Teammitglied geändertcontact.createdeine neue Person wurde im CRM angelegt, synchronisieren Sie sie mit Ihrem Systemvisitor.identifiedeine Sitzung wurde über die API identifiziert, einschließlich BestätigungsstatusDie Zustellung erfolgt mindestens einmal und ungeordnet. Every payload carries an id (also in X-Conecto-Delivery): store it, skip ids you have already handled, and both replays and duplicates stop being your problem. When your bot answers a delivery, pass that same id as the Idempotency-Key and a redelivery can never make it speak twice.
app.post('/conecto', express.raw({ type: '*/*' }), async (req, res) => {
const sig = 'sha256=' + crypto.createHmac('sha256', WEBHOOK_SECRET)
.update(req.body).digest('hex')
if (!crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(req.get('X-Conecto-Signature') || '')))
return res.sendStatus(401)
const { id, event, data } = JSON.parse(req.body)
res.sendStatus(200) // ack first, work after
if (await seen(id)) return // at-least-once: dedupe on the delivery id
if (event === 'message.created' && data.message.sender === 'visitor') {
await fetch(`https://conecto.chat/api/v1/conversations/${data.conversation.id}/messages/`, {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Idempotency-Key': id, ...auth },
body: JSON.stringify({ body: await answer(data) }),
})
}
})Everything here is designed to sit under an SDK: stable envelopes, slug-addressed integrations, typed errors, cursor pagination, idempotent writes, one signature scheme in both directions, and GET /schema/ to generate from. Building something? Sprechen Sie mit uns , wir möchten, dass Entwickler auf Conecto aufbauen, und priorisieren ihre Wünsche.