API

An API in. The call out.

Send a lead from any system and your instant AI employee calls it. Store a call from your own agent and it shows up in your dashboard.

Authentication

Your API key

Create the key in your dashboard under Developers. Send it as a Bearer token on every request. Keep it private.

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Base URL: https://app.cleverhive.in/api/v1

A missing or wrong key returns 401 { "error": "invalid or missing API key" }.

POST/api/v1/leads

Add a lead. Your instant AI employee calls it within about a minute, between 9 AM and 9 PM.

FieldTypeNotes
phonestring, requiredA 10-digit Indian mobile number. Spaces, +91 and a leading 0 are accepted.
namestringUp to 80 characters. Used on the call.
sourcestringWhere it came from, up to 40 characters (for example website). Defaults to api.
notestringUp to 300 characters, for example what they asked about.

Success 201 Created { "id": 412, "status": "waiting" }

  • 400 phone must be a 10-digit Indian number
  • 401 invalid or missing API key
  • 429 too many leads in the last hour (the limit is 500)
Example

Send a lead

curl -X POST https://app.cleverhive.in/api/v1/leads \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Priya", "phone": "98480 22338", "source": "website", "note": "2BHK, Baner" }'
POST/api/v1/calls

Store one finished call, for example from your own voice agent. Sending the same external_id again updates that call instead of adding a new one.

FieldTypeNotes
started_atISO date-timeWhen the call began. Defaults to now.
duration_secondsnumberLength of the call.
caller_number / caller_namestringWho called.
summary / next_stepstringShown on the call and in Leads.
labelHot | Warm | ColdThe lead label.
categorystringOne of your industry’s call types. Anything else is saved as Other.
languagestringFor example Telugu.
transcriptarrayLines like { "speaker": "agent" | "caller", "text": "…", "at": 12 }.
fieldsobjectDetails collected, such as budget or dates. Simple values only.
needs_callbackbooleanMarks the call for a team follow-up.
recording_base64 + recording_mimestringOptional recording (wav, mp3, ogg or webm).
external_idstringYour own id for the call, so retries do not duplicate it.

Success 201 Created { "id": 981, "updated": false } (200 when an existing external_id was updated)

  • 400 for example started_at must be an ISO date-time
  • 401 invalid or missing API key
Example

Store a call

curl -X POST https://app.cleverhive.in/api/v1/calls \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "external_id": "call-1042",
    "caller_name": "Ravi",
    "caller_number": "+919848022338",
    "duration_seconds": 74,
    "label": "Hot",
    "summary": "Wants a 2BHK in Kondapur under 80 lakh. Visit Sunday 11 AM.",
    "next_step": "Confirm the visit by call",
    "language": "Telugu",
    "transcript": [
      { "speaker": "caller", "text": "Kondapur లో 2BHK కావాలి" },
      { "speaker": "agent", "text": "Ready to move 2BHK 78 lakh andi." }
    ]
  }'

Good to know

Is there a webhook when a call ends?

Not yet. Results go to your dashboard, and to a Google Sheet if you connect one: one row per call.

Can I call the API from a browser?

Do it from your server, not from a web page, so your API key is never exposed to visitors.

Is there a rate limit?

Leads are limited to 500 per hour per workspace. Calls are limited by the 40 MB request size.

Your first AI employee can be answering today.

Start with free credits and no card. Pay per minute after that, with no monthly plan.

Chat on WhatsApp