Sales Agent API

One chat brain. Any channel.

The same agent behind the Sales Agent is callable from anywhere — your website, WhatsApp, a mobile app, SMS, or Messenger — through one endpoint. Same catalog, same verified prices, same CRM, same revenue engine. The channel sends a message; the API returns the reply.

Base URL: https://kovet.ai · Free 7-day trial. After the trial, pricing is custom for every business — email [email protected] to book a pricing call.

Authentication

API keys, per merchant.

API access is approved by Kovet — it is not open self-service. To get a key, request access at [email protected]: Kovet creates the key in the merchant dashboard while setting up your business and approves it. A new key starts pending and cannot call the API until approved — a pending key gets 403 API access pending approval. A key belongs to one tenant and only ever works for that tenant. The full key is shown exactly once, when it is created — copy it then; it is never stored in full and never shown again. Revoke a key any time from the same tab.

Send the key on every call — either header works

Authorization: Bearer sk_live_YOUR_KEY_HERE

or

X-API-Key: sk_live_YOUR_KEY_HERE

Keys look like sk_live_ followed by 32 hex characters. Keep them server-side — never ship a key in a web page or a mobile app binary. Calls without a key still work (the website widget uses this), but they are limited to 30 requests per minute per IP and are not tied to a merchant account.

Endpoints

Chat with the agent.

One endpoint does the selling: send the visitor's message, get back the reply, suggested follow-ups, and any actions the turn triggered (lead captured, handoff requested). The agent remembers the conversation by session_id — see Sessions.

POST /api/v1/chat

Request body (JSON): message is required. tenant_id is optional when you authenticate with a key — the key's tenant governs; if you pass a different tenant_id the call is refused with 403. session_id is your conversation identifier (see below); one is generated for you if you omit it. utm is optional traffic-source data, analytics only.

curl -X POST https://kovet.ai/api/v1/chat \
  -H "Authorization: Bearer sk_live_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "What does Kovet AEO cost?",
    "session_id": "whatsapp:+15165550134"
  }'

Example response (demo mode — the live reply below is verbatim from the Kovet catalog):

{
  "ok": true,
  "session_id": "whatsapp:+15165550134",
  "reply": "Kovet AEO is $499/mo. Standalone AEO service, $499 per month.\n\nAnswer engine optimization: classic SEO plus AEO — crawlability, metadata, structured data (JSON-LD/FAQ schema), llms.txt, and quotable copy written for AI answers. Includes a free AI-readiness grade and monthly AI-visibility reporting.",
  "suggested_replies": ["Why is it worth it?", "Show me an upsell", "Book a demo"],
  "actions": [],
  "recommended": ["aeo"],
  "intent": "pricing",
  "usage": {
    "provider": "demo",
    "model": "demo-standard",
    "mode": "demo",
    "input_tokens": 7,
    "output_tokens": 75,
    "cost_usd": 0.000767
  }
}

What comes back: reply (send this to the visitor), suggested_replies (quick-reply buttons for the channel, if it supports them), actions (e.g. lead_captured when a visitor left details with consent, human_handoff when they asked for a person), recommended (product ids from the merchant's catalog), intent, and usage (metering — inference is Kovet's internal cost, never charged to the merchant). The agent answers only from the merchant's verified knowledge base — it never invents prices, discounts, or guarantees, and it never places orders.

GET /api/v1/tenants/{tenant_id}/public

Public catalog and configuration for a tenant — products with verified prices, conversation starters, contact details, and the pricing model. No key needed. Use it to render your own chat UI or product cards.

curl https://kovet.ai/api/v1/tenants/kovet/public

GET /api/v1/health

Service health and mode (demo or live). No key needed.

curl https://kovet.ai/api/v1/health
{"ok": true, "mode": "demo", "provider": "demo", "env": "production"}

Sessions

One id per person, across turns.

Pass the channel's own user or conversation id as session_id and the agent keeps context across turns — what it recommended, what the visitor already told it, whether their details were captured. Lead capture, CRM records, follow-ups, and opportunities all follow that same session, so a conversation that starts on WhatsApp and continues on the website stays one conversation.

What to pass per channel

  • WhatsApp: the sender's phone id, e.g. whatsapp:+15165550134
  • Mobile app: your user id, e.g. app:user_4821
  • SMS: the phone number, e.g. sms:+15165550134
  • Messenger: the page-scoped user id, e.g. messenger:48219384
  • Website: a random id stored in the browser session, e.g. s-1730900000-a1b2c3

Keep the same id for the same person and the agent remembers them. Use a different id per person — sessions are isolated per tenant, and one customer's conversation is never visible to another.

Rate limits & errors

Fair use, per key.

Keyed calls

120 requests per minute, per API key. Each key gets its own bucket, so one integration cannot starve another.

Unauthenticated calls

30 requests per minute, per IP. This is what the website widget uses. Add a key for anything heavier.

Over the limit

HTTP 429 with {"ok": false, "error": "rate limited — try again in a minute"}. Back off and retry; the bucket refills every minute.

Metered per key

Every keyed call is logged — requests, input/output tokens, and cost. Monthly request limit: 10,000 per key by default (Kovet can raise it when issuing the key). Past the month's limit the API answers 429 monthly request limit reached. Metering is for Kovet's internal cost and the monthly request limit — the merchant is never charged per call; Kovet earns only the agreed commission on verified sales.

Per-key usage (admin key required): GET /api/v1/admin/tenants/{tenant_id}/api-keys/{id}/usage?days=30 → {requests, input_tokens, output_tokens, cost_usd, period}, plus the key's monthly limit and requests used this month. The dashboard's API Keys tab shows the same 30-day usage against each key's limit.

Error codes

StatusMeaning
400Bad request — invalid JSON, or message missing/empty.
401Invalid or revoked API key.
403The tenant_id in the body does not match the API key's tenant — or the key is still pending approval (API access pending approval) — or the tenant's free trial has ended (free trial ended — email [email protected] to agree your pricing).
404Unknown tenant, or unknown endpoint.
429Rate limited — see above.

Channel mapping

Wiring a channel takes three steps.

The API does not send WhatsApp or SMS messages itself — your channel integration owns delivery. The loop is the same everywhere:

WhatsApp example

1. Inbound WhatsApp message arrives from +1 516-555-0134
   ("What does Kovet AEO cost?")
2. Your server calls the API:
   POST /api/v1/chat
   Authorization: Bearer sk_live_YOUR_KEY_HERE
   {"message": "What does Kovet AEO cost?",
    "session_id": "whatsapp:+15165550134"}
3. Take j.reply from the response and send it back on WhatsApp.
   Offer j.suggested_replies as quick-reply buttons.
   If j.actions includes "lead_captured", the contact, opportunity,
   and follow-up are already in the merchant's CRM — nothing else to do.

Lead capture works the same on every channel: when the visitor says "take my details", the agent asks for a name and email, then asks for consent before anything is saved. No consent, no record.

Orders & attribution

Sales still flow back to the agent.

When a customer the agent talked to buys, the order reaches the agent through a commerce webhook — Shopify today, other platforms through the admin order endpoint. The agent matches the order to the customer and the open opportunity, and commission at the agreed rate accrues in the ledger. There is no attribution window: opportunities stay open until won, lost, or closed.

Shopify order webhooks (HMAC-verified)

POST /api/v1/webhooks/shopify/{tenant_id}/orders-create
POST /api/v1/webhooks/shopify/{tenant_id}/orders-updated
POST /api/v1/webhooks/shopify/{tenant_id}/refunds-create
Header: X-Shopify-Hmac-Sha256: <HMAC-SHA256 of the raw body>

Register these URLs in the Shopify admin (Settings → Notifications → Webhooks). Without a configured webhook secret the calls are refused, never accepted unverified. Refunds and cancellations post adjustment entries to the same ledger, so commission follows the net amount.

Get started

Create a key, make one call.

  1. Request API access at [email protected] — Kovet issues and approves your key while setting up your business.
  2. Copy the key when Kovet shares it — it is shown once, and never stored in full.
  3. Run the curl example above with your key. The first reply comes back from the merchant's own verified catalog.

Questions or a channel you want wired for you? [email protected] (product & sales) · [email protected] (support).