CallesAI

Developers

Talk to a digital self from your own app, read conversations and people, and receive events as they happen.

Authentication

Create a key in the app under Settings → API. Send it with every request, from your server only:

Authorization: Bearer calles_sk_…

Each key allows 120 requests a minute. Conversations started through the API count toward your plan like any other conversation, and appear in your Inbox marked “API”.

Endpoints

GET /api/v1/me

Whose digital self this key talks to: name, handle, link.

POST /api/v1/conversations

Start a conversation. Body: { "message": "…", "route"?: "work", "visitor"?: { "name": "…", "email": "…" } }. Returns the digital self’s reply.

POST /api/v1/conversations/{id}/messages

Continue a conversation started through the API. Body: { "message": "…" }.

GET /api/v1/conversations

Your conversations, newest first. Query: limit (≤100), before (ISO time from the last item), status (in_progress, needs_owner, qualified, booked, declined, answered, closed).

GET /api/v1/conversations/{id}

One conversation with its messages.

GET /api/v1/people

Everyone who shared their email, most recent first. Query: limit, before.

Example

curl -X POST https://callesai.com/api/v1/conversations \
  -H "Authorization: Bearer $CALLES_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message":"Hi, can we talk about an onboarding audit?","visitor":{"name":"Dana Ruiz","email":"dana@example.com"}}'
{
  "id": "4f1c…",
  "status": "in_progress",
  "reply": "Happy to. What product is it, and roughly when would you like to start?",
  "canReply": true,
  "offeredTimes": [],
  "bookingUrl": null,
  "followUps": ["It’s a B2B SaaS app", "We’d like to start in January"],
  "url": "https://callesai.com/interactions/4f1c…"
}

Errors

Errors return a JSON body { "error": "…" } with a matching status: 400 (invalid input), 401 (missing or revoked key), 404 (not found), 409 (the conversation can’t take messages, e.g. it’s waiting on you), 429 (rate limit).

Webhooks

Add a webhook (or Zapier, Make, n8n) in Settings → Integrations and choose events: new conversation, needs you, qualified, accepted, booked, declined, new contact, call ended. Each delivery is a JSON POST with these headers:

X-Calles-Event: request.booked
X-Calles-Delivery: <delivery id>
X-Calles-Timestamp: <unix seconds>
X-Calles-Signature: sha256=<hex HMAC-SHA256 of "timestamp.body" with your signing secret>

Check the signature before trusting a delivery (Node.js):

import { createHmac, timingSafeEqual } from 'node:crypto'

function verify(rawBody, headers, secret) {
  const ts = headers['x-calles-timestamp']
  const expected = 'sha256=' + createHmac('sha256', secret).update(ts + '.' + rawBody).digest('hex')
  const given = headers['x-calles-signature'] ?? ''
  const fresh = Math.abs(Date.now() / 1000 - Number(ts)) < 300
  return fresh && given.length === expected.length && timingSafeEqual(Buffer.from(given), Buffer.from(expected))
}

Failed deliveries are retried up to 3 times. Answer with any 2xx status to acknowledge.

AI assistants (MCP)

People can also reach any digital self from Claude, ChatGPT or other MCP assistants. See Connect your AI assistant.