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
| Resource | What it contains |
|---|---|
/llms.txt | Index of every docs page with a one-line description and a link to its Markdown. |
/llms-full.txt | All the docs in a single Markdown file. Best for pasting into a chat. |
/docs/<page>.md | Any docs page as Markdown, e.g. /docs/webhooks.md. |
/openapi.json | OpenAPI 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:
POST https://api.callhuman.es/v1/callswithAuthorization: Bearer <key>and a JSON body.toin international format (+34600111222),message, andoptionsas objects:{ "label": "...", "reply": "..." }— not plain strings.- A
webhook_urlendpoint that reads the raw body, verifiesCallHuman-Signature(hex HMAC-SHA256 with the webhook secret) and returns2xxquickly. - Decide using
statusandoption_label(oroption_pathfor submenus), and find your record withmetadata. - Handle
not_answered: decide what happens when nobody picks up. - Send an
Idempotency-Keyheader 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.