Skip to Content
CallHumanDocs

Integrate with an AI assistant

Let ChatGPT, Claude, Cursor or Copilot write your CallHuman integration from our machine-readable docs.

Our docs are written to be read by AI assistants. Paste this prompt into yours, fill in the brackets, and it can write the whole integration:

Integrate CallHuman into this project.
Docs for AI assistants: https://www.callhuman.es/llms-full.txt
OpenAPI: https://www.callhuman.es/openapi.json

Goal: when <describe the event>, call the person at <phone field>, read <message>,
offer these options: <options, each with an optional reply>, and handle the answer
in a webhook endpoint that verifies the CallHuman-Signature header.
Use the API key from the CALLHUMAN_API_KEY environment variable and the webhook
secret from CALLHUMAN_WEBHOOK_SECRET.

Machine-readable resources

ResourceWhat it contains
/llms.txtIndex of every docs page with a one-line description and a link to its Markdown.
/llms-full.txtAll the docs in a single Markdown file. Best for pasting into a chat.
/docs/<page>.mdAny docs page as Markdown, e.g. /docs/webhooks.md.
/openapi.jsonOpenAPI 3.1 spec with descriptions and examples for every field and error.

Docs pages also answer Accept: text/markdown with Markdown, and every page has Copy Markdown and Open in ChatGPT / Claude buttons.

What a correct integration looks like

Ask your assistant to check its code against this list:

  1. POST https://api.callhuman.es/v1/calls with Authorization: Bearer <key> and a JSON body.
  2. to in international format (+34600111222), message, and options as objects: { "label": "...", "reply": "..." } — not plain strings.
  3. A webhook_url endpoint that reads the raw body, verifies CallHuman-Signature (hex HMAC-SHA256 with the webhook secret) and returns 2xx quickly.
  4. Decide using status and option_label (or option_path for submenus), and find your record with metadata.
  5. Handle not_answered: decide what happens when nobody picks up.
  6. Send an Idempotency-Key header if the request may be retried.

Copy-paste starter (Node.js)

// 1) Create the call
const res = await fetch("https://api.callhuman.es/v1/calls", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.CALLHUMAN_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": `booking-${booking.id}-confirmation`,
  },
  body: JSON.stringify({
    to: booking.phone,
    language: "en",
    message: `Hi! This is La Plaza about your table for ${booking.people} tonight at ${booking.time}.`,
    options: [
      { label: "Confirm", reply: "Perfect, see you tonight!" },
      { label: "Cancel", reply: "No problem, your booking is cancelled." },
    ],
    webhook_url: "https://laplaza.example/hooks/callhuman",
    metadata: { booking_id: booking.id },
  }),
});
if (!res.ok) throw new Error((await res.json()).error.message);

Then receive the answer as shown in Webhooks.

On this page