API Documentation

CegTec Website Agent API — chat, qualify leads, check availability, and book meetings.

Base URL

https://api.cegtec.net

Authentication

All API endpoints require an x-api-key header.

x-api-key: your_api_key_here

Contact info@cegtec.net to request an API key.

Machine-Readable Specs

Endpoints

Chat

POST /api/v1/chatSend a message to the AI agent
GET /api/v1/chat/initGet page-specific greeting

Knowledge

GET /api/v1/servicesServices and offerings
GET /api/v1/companyCompany information
GET /api/v1/pricingPricing packages
GET /api/v1/case-studies?industry=SaaSCase studies (filterable)

Calendar

GET /api/v1/availability?from=&to=Available meeting slots
POST /api/v1/bookBook a discovery meeting

Lead Qualification

POST /api/v1/qualifyICP fit scoring (0-100)

Webhooks

POST /api/v1/webhooksRegister webhook (events: lead.qualified, meeting.booked, conversation.ended)
GET /api/v1/webhooksList webhooks
DELETE /api/v1/webhooks/:idDelete webhook

Event Streaming (SSE)

GET /api/v1/events?events=lead.qualified,meeting.bookedReal-time Server-Sent Events stream

Subscriptions

POST /api/v1/subscriptionsRegister agent subscription
GET /api/v1/subscriptionsList subscriptions
DELETE /api/v1/subscriptions/:idCancel subscription

Workflows

POST /api/v1/workflowsStart multi-step workflow (template: lead-to-meeting)
GET /api/v1/workflows/:idWorkflow status
PATCH /api/v1/workflows/:id/steps/:stepIdAdvance workflow step

Cross-Service Handoff

POST /api/v1/handoffTransfer context to another agent

Rate Limits

100 requests per minute per API key. Response headers:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 99
X-RateLimit-Reset: 1711234567
Retry-After: 60  (only on 429)

Error Responses

All errors return a consistent JSON structure:

{
  "error": {
    "code": "INVALID_PARAMETER",
    "message": "from and to query parameters required",
    "status": 400,
    "retryable": false
  }
}

Error codes: UNAUTHORIZED, INVALID_PARAMETER, NOT_FOUND, RATE_LIMITED, INTERNAL_ERROR

Idempotency

All POST endpoints support an Idempotency-Key header. Duplicate requests with the same key return the cached response (24h TTL).

Idempotency-Key: unique-request-id-123

MCP Protocol

For MCP-capable agents, connect via Streamable HTTP:

POST https://api.cegtec.net/mcp
x-api-key: your_api_key
Content-Type: application/json

Agent Negotiation

Query agent capabilities before connecting:

OPTIONS https://api.cegtec.net/mcp

→ { "capabilities": ["chat","qualify","calendar","knowledge","webhooks","sse","workflows"] }