EchoSDK

API Reference

Interact with your EchoSDK agent programmatically using our REST API.

Authentication

We support two methods of authentication depending on the endpoint and use case:

  • API Key: Used for backend/admin operations like ingestion. Passed via x-api-key header.
  • Origin Verification: Used for public frontend queries. Configure allowed domains in your dashboard.
POST

/api/:appId/ingest

Ingest content into your agent's knowledge base. This endpoint accepts either a URL to crawl or raw text.

Requires an Admin API Key.

Request Body
textThe raw text content to ingest (optional if url provided).
urlThe source URL reference for this content (optional).
Example Request
curl -X POST https://echosdk.com/api/your-app-id/ingest \
  -H "Content-Type: application/json" \
  -H "x-api-key: sk_live_..." \
  -d '{
    "text": "EchoSDK is a headless support platform...",
    "url": "https://docs.echosdk.com/intro"
  }'
POST

/api/:appId/query

Ask a question to your agent. This endpoint returns a streaming response.

Publicly accessible (protected by CORS whitelist).

Request Body
questionThe user's question to answer.
sessionIdOptional session ID for conversation history.
Example Request
curl -X POST https://echosdk.com/api/your-app-id/query \
  -H "Content-Type: application/json" \
  -d '{
    "question": "How do I install the SDK?"
  }'
POST

/api/:appId/handover

Escalate a conversation to human support. Creates a support ticket in your dashboard.

Publicly accessible (protected by CORS whitelist).

Request Body
emailUser's email address for follow-up (required).
questionThe user's question or issue description (required).
urlThe page URL where the request originated (optional).
historyPrevious conversation messages for context (optional).
Example Request
curl -X POST https://echosdk.com/api/your-app-id/handover \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "question": "I need help with billing",
    "url": "https://myapp.com/pricing"
  }'