HeadHoncho

Sync callrail

Sync callrail is a command in the HeadHoncho API. Pull the company's new CallRail calls and forms now, match them to jobs, and say how many landed. The hourly sync does this on its own.

Read as Markdown

The request

Reference for Sync callrail, HeadHoncho API v1. It is a command, sent to the base address https://api.headhoncho.app.

POST /api/v1/commands/sync-callrail

The key needs the Company settings area at do. An answered call costs 1 credit; a refusal costs nothing. See credits.

It runs the app's own command sync-callrail. Send an Idempotency-Key header with every call: the same key with the same body returns the first answer and runs nothing twice. See the model.

Parameters

NameKindRequiredDescriptionExample
company_idid, in the JSON bodyYesThe company, from Who am I.cmp_14f5

Try it with your key

Paste your key and change the values. The box builds the call as a cURL line and a fetch line, ready to copy. It never sends anything itself.

Your key stays in this page and is never sent anywhere. Copy the line below and run it yourself.

What comes back

accepted, position, connection_id, calls_landed, conversions_matched, needs_review (calls that could be more than one job, waiting for a person) and forms_landed. If CallRail refused, calls_landed is 0 and error says why. A company with no CallRail connected is refused with 422.

It never deletes anything. It changes only what the command names, and it writes the change to the job's history with who asked for it.

Every field in the answer

Types are read from the example answer. Money is a plain number in the company's currency. A time carries its offset from UTC (Z is UTC). Ids are opaque text. A field with no line of its own here has its name spelled out; the common fields mean the same on every page.

FieldTypeMeaning
acceptedtrue or falseTrue when the command ran. A command that cannot run is an error instead.
positionwhole numberWhere the change landed in the event log. Pass it as after on a read to see your own write.
connection_idid (text)The id of the connection.
calls_landedwhole numberThe calls landed.
conversions_matchedwhole numberThe conversions matched.
needs_reviewwhole numberThe needs review.
forms_landedwhole numberThe forms landed.

It calls CallRail

Each call makes real requests to CallRail on this company's own key and charges your API credits as any command does.

Errors that apply

CodeStatusWhat it means
`missing_key`401Send your key as Authorization: Bearer hh_live_...
`unknown_key`401That key is not one we issued, or it was revoked.
`no_access`403This credential does not reach that. Ask the person who made it for access.
`read_only`403This credential may read this area but not change it.
`not_found`404No such record in the companies this credential reaches.
`out_of_scope`404No such company in the companies this credential reaches.
`invalid`422Some fields were refused. See fields.
`missing_idempotency_key`400Send an Idempotency-Key header on every command.
`idempotency_mismatch`409This Idempotency-Key was used with a different body.
`idempotency_in_progress`409A command with this Idempotency-Key is still running. Wait a moment and send it again.
`no_credits`402Out of credits. Top up on Settings › Credits, or turn on auto top-up.
  • Update company: Change one company's own facts: name, service area, time zone, country, color, week, opening hours or service places. Only what you send changes.
  • Create company: Add another company to the workspace. It starts with the first company's time zone and country unless you send your own.
  • Update organization: Rename the workspace. A company still carrying the old workspace name is renamed with it.
  • Add job type: Add a kind of work the business does, such as Local move or Roof repair. A name already in use is refused.
  • Update job type: Rename a job type, move it in the list, or retire it so new jobs cannot pick it. Old jobs keep it.
  • Update job status: Rename a status, change its look, move it in the list, or retire it. A rename shows on every job at once. Its slug and band stay.
  • Set status band: Put a status on the line (a step every job passes) or off it as a detour (a place a job gets stuck). The line closes up behind it.
  • Replace job status: Let another status stand in for this one: move its jobs onto the new status, retire the old word, or both. Name an existing status or a new one.
  • Add job status: Add a status to the workspace's list, on the line or as a detour. It carries no role: it is a name and a color.
  • Reorder line: Set the order of the statuses on the line, the order every picker offers. Send every status on the line, once each.
  • Update agency feed: Change how closed jobs reach the agency: the webhook address, the daily file address and hour, or switch the feed on or off. Secrets are not touched.
  • Update callrail tracking: Set the tracking phone numbers on a company's CallRail connection. They replace the list whole. The webhook signing key is set in the app.
  • Refresh sources: Clear the Call center source stamped on a company's jobs, pull all its CallRail history again and re-read every call, so each job's source is worked out afresh.
  • Sync ad platform: Pull a company's latest campaigns and spend from one ad platform now. The hourly sync does this on its own.
  • The same records in the app: Settings.
  • How the API fits together: the model, API keys, errors and the MCP server.