The request
Reference for Create company, HeadHoncho API v1. It is a command, sent to the base address https://api.headhoncho.app.
POST /api/v1/commands/create-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 create-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 |
|---|---|---|---|---|
name | text, in the JSON body | Yes | At least 3 characters. A name already in use is refused. | Capital Roofing |
time_zone | text, in the JSON body | No | An IANA time zone name. Default: the first company's. | America/New_York |
service_area | text, in the JSON body | No | A sentence about where the company works. | Springfield, IL |
country | text, in the JSON body | No | Two letters. Default: the first company's. | US |
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, organization_id, name and position. A plan that holds one company refuses the second with plan_limit in fields.
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. |
organization_id | id (text) | The id of the organization. |
name | text | The name, as the app shows it. |
The plan counts companies
Free runs one company. The app refuses the second with the upgrade answer, and so does this, naming plan_limit. A paid plan is never refused here; an extra company is billing, not a wall.
Reach
The credential must reach every company, and the person it acts as must be an owner or an admin. A key that names no companies reaches the new one at once; a key that names companies does not, and is refused this call.
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. |
| `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
- 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.
- 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.