The request
Reference for Update company, HeadHoncho API v1. It is a command, sent to the base address https://api.headhoncho.app.
POST /api/v1/commands/update-company
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 update-company. 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
| Name | Kind | Required | Description | Example |
|---|---|---|---|---|
company_id | id, in the JSON body | Yes | From Who am I. | cmp_14f5 |
name | text, in the JSON body | No | At least 3 characters. Two companies cannot share a name. | Sunrise Moving and Storage |
service_area | text, in the JSON body | No | A sentence about where the company works. Empty clears it. | Bloomington and Normal, IL |
time_zone | text, in the JSON body | No | An IANA time zone name. | America/Chicago |
country | text, in the JSON body | No | Two letters. It decides how phone numbers typed here are read. | US |
color | text, in the JSON body | No | The brand color as #rrggbb. Empty lets the app pick one. | #2f6fdb |
week_start | number, in the JSON body | No | The first day of the company's week, 0 (Monday) to 6 (Sunday). | 0 |
week_end | number, in the JSON body | No | The last day of the company's week, 0 to 6. | 6 |
business_hours | text, in the JSON body | No | The whole week as a JSON list of weekday (0 to 6), opens and closes (HH:MM). It replaces the old hours. Send [] to clear. | [{"weekday": 0, "opens": "08:00", "closes": "17:00"}] |
service_places | text, in the JSON body | No | Every place served as a JSON list of city and 2-letter state. It replaces the old list. Send [] to clear. | [{"city": "Bloomington", "state": "IL"}] |
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, company_id, name and position.
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.
| Field | Type | Meaning |
|---|---|---|
accepted | true or false | True when the command ran. A command that cannot run is an error instead. |
position | whole number | Where the change landed in the event log. Pass it as after on a read to see your own write. |
company_id | id (text) | The id of the company. |
name | text | The name, as the app shows it. |
Owner or admin only
The app keeps this to an owner or an admin of the workspace, so a key made by anyone else is refused with no_access.
Lists are replaced
business_hours and service_places replace the whole list, so a stale copy can never bring back a day that was removed.
Errors that apply
| Code | Status | What it means |
|---|---|---|
| `missing_key` | 401 | Send your key as Authorization: Bearer hh_live_... |
| `unknown_key` | 401 | That key is not one we issued, or it was revoked. |
| `no_access` | 403 | This credential does not reach that. Ask the person who made it for access. |
| `read_only` | 403 | This credential may read this area but not change it. |
| `not_found` | 404 | No such record in the companies this credential reaches. |
| `out_of_scope` | 404 | No such company in the companies this credential reaches. |
| `invalid` | 422 | Some fields were refused. See fields. |
| `missing_idempotency_key` | 400 | Send an Idempotency-Key header on every command. |
| `idempotency_mismatch` | 409 | This Idempotency-Key was used with a different body. |
| `idempotency_in_progress` | 409 | A command with this Idempotency-Key is still running. Wait a moment and send it again. |
| `no_credits` | 402 | Out of credits. Top up on Settings › Credits, or turn on auto top-up. |
Related
- 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.
- Sync callrail: 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.
- 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.