Heppu APIv2.heppu.ai/api

Errors

HTTP status is the truth. The body is a hint.

Shape

{
  "error": {
    "message": "Agent not found",
    "status": 404,
    "timestamp": "2026-09-11T10:00:00.000Z"
  }
}

message is meant for humans. There is no stable machine readable code except one: RATE_LIMITED on 429s. Branch on the HTTP status, not the body.

Some 404 and 500 responses carry "status": 400 in the body. Known, harmless, ignore the body field.

Statuses you will see

StatusMeaningUsually because
400Bad requestMissing field, bad phone format, validation. Message tells you which.
401No or bad keyTypo, expired, owner left the org.
403Not allowedBlocked phone number, job doesn't allow manual contacts, role too low.
404Not yours or not thereSame response either way, on purpose.
207Partial successBatch endpoints. Read results[].
429Slow down1000 req/min per key.
503Downstream is outChat worker unavailable. Retry with backoff.
500Our bugRetry once, then tell us.

Validation messages

Zod backed endpoints (chat, knowledge, outbound calls, listings) return one 400 with every failing field joined:

{ "error": { "message": "Validation error: sources.0.title: title is required, sources.1.content: content too long (max 500KB)", "status": 400, "timestamp": "..." } }

Older endpoints (agents, schedule, batch calls) check fields by hand and return the first problem only.

Malformed JSON

Depends on the endpoint. Some treat it as an empty body, one returns 500. Send valid JSON and Content-Type: application/json and this never comes up.

On this page