FoxFix API
The FoxFix API connects FoxFix to your other systems – a mailbot, marketing automation, another CRM or your own application. Through the API you can create leads, change their status and assignee, write notes, create tasks and manage the columns of the lead board. In other words, it can do the same as a salesperson on the Leads page.
The first part of this page is for the company administrator (how to issue a key), the second for the integration developer (how to call the API).
Who can see this
The API is part of the Business plan and above. API keys are issued and revoked by the Administrator or Manager in Settings → Integrations, in the FoxFix API card. For enquiries from a website form alone, the simpler Website leads (API) is enough.
How to issue an API key
Each key belongs to one user of the company. A key can work with leads, their contacts, notes, tasks and board columns, and everything done with the key is recorded in the lead history under that user's name with the suffix “(mailbot)”. Only an administrator's or manager's key may delete leads.
- A key cannot be issued to the Warehouse clerk role – it has no access to leads in the app either.
- A manager cannot issue a key that acts as an administrator.
- The company must have the Leads module switched on.
- Open Settings → Integrations and scroll down to the FoxFix API card.
- Under New key, select the user the integration should act as.
- In the “Name (e.g. Mailbot, Marketing automation)” field, type which integration the key is for.
- Click Create key. The New API key dialog opens.
- Copy the key with the button next to it.
- Optionally, click Test. The message “The key works” confirms that both the key and the plan are in order. The test changes nothing.
- Close the dialog with the Close button and give the integration developer the key and the API address.
The key is shown only once
Once the dialog is closed, you cannot see the key again. Pass it on securely and not in the same message as the API address. The key belongs only on the integration's server, never in a web page or a mobile app.
Listing and revoking keys
Under Active keys you see each key's name, user, last four characters, the date it was created and who issued it. To revoke a key, click Revoke and confirm the question. The integration using it loses access within a minute at most.
Create a separate key for each integration – when you end one integration, you revoke only its key and the others keep running. Always revoke a key when you stop using the integration, when the integration supplier changes or when you suspect the key has reached someone unauthorised.
When you deactivate a user, their keys are revoked, and new ones must be issued after they are reactivated. When the company's plan no longer includes the API, keys stop working within a minute, and they work again once the company is back on a plan with the API.
For developers: the basics
- API address:
https://app.fox-fix.com/api/crm. Opening it in a browser gives you an overview of the endpoints. - Authentication: the
Authorization: Bearer <API key>header (orx-api-key: <API key>). - The company is not part of the URL. The key is bound to one company and one user, so the API returns and changes only that company's data.
- Request and response bodies are JSON (
Content-Type: application/json). - For
POST, an unknown field returns a 400 error with a list of allowed fields.PATCHignores unknown fields and lists them in the response asignoredFields, so you will spot a typo. - Times are in ISO 8601 format (
2026-11-03T09:00:00+01:00). Amounts are in the company's currency, excluding VAT.
curl https://app.fox-fix.com/api/crm/meta \
-H "Authorization: Bearer foxfix_…"
Lookup lists
GET /api/crm/meta
Returns:
statuses– the lead board columns, including custom ones (theirvalueis sent as the lead'sstatus),lostReasons– lost reasons,sources– the company's lead sources: built-in ("system": true) and custom;"archived": true= the company has hidden the source from the new-lead picker,taskPrioritiesandtaskStatuses– values for tasks,users– the company's active users (theiridis sent assolverIdorassigneeId),me– who the key belongs to, their role and whether they may delete leads.
Listing leads
GET /api/crm/leads?status=waiting&assigned=none&limit=100
| Parameter | Values | Meaning |
|---|---|---|
status | waiting, contacted, quoted, won, lost or a custom column | filter by status |
assigned | me = the key owner's leads, none = unassigned | filter by assignee |
limit | 1–200 (default 100) | page size |
cursor | the nextCursor value from the previous page | pagination |
include | persons | adds the company's contact persons (name, position, email, phone) |
externalId | your id from POST | finds the lead created with this externalId (0 or 1 item) |
updatedSince | an ISO 8601 time, e.g. 2026-11-05T08:00:00Z | only leads changed at or after this time, oldest change first |
Keep paginating until nextCursor is null. A filtered page may return
fewer items than limit and still have a nextCursor – carry on.
Tracking changes
FoxFix does not send webhooks yet. You find status changes with
GET /api/crm/leads?updatedSince=…:
- On the first run, go through all leads and remember the highest
updatedAt. - On the next run, send this time minus 2 minutes as
updatedSinceand go through all pages. The margin catches a change that reached the listing slightly later than a newer change to another lead. - The same lead may therefore arrive more than once. Match by
idand compareupdatedAtwith what you have stored.
updatedAt changes on every change to the lead (status, assignee, details,
lost note), not only on a status change. To tell whether the status
changed, compare status with what you have stored. A sensible interval is
once every 1–5 minutes.
A deleted lead does not appear in the change listing. If you need to detect
deletions, check your stored leads via GET /api/crm/leads/{id} (404 = the
lead no longer exists).
Every lead (in the list, in the detail and in the response to creating and updating) has this shape:
{
"id": "91be7963-…",
"name": "Autoservis Novák s.r.o.",
"email": "info@example.com",
"phone": "+420 777 123 456",
"contactId": "…",
"status": "waiting",
"firstCallMade": false,
"solverId": null,
"source": "manual",
"sourceLabel": "Manuální",
"serviceOfInterest": "PPF full car",
"estimatedValue": 45000,
"vehicleId": null,
"wonAt": null, "lostAt": null, "lostReason": null, "lostReasonNote": null,
"callNotes": null,
"contactMatchedBy": "created_new",
"possibleDuplicateContactIds": [],
"lastContactedAt": null, "lastContactedByName": null,
"createdAt": "2026-11-03T08:12:00.000Z", "updatedAt": "2026-11-03T08:12:00.000Z"
}
Lead detail
GET /api/crm/leads/{id}?include=notes,tasks
include is optional and adds the notes (notes) and tasks (tasks).
New lead
POST /api/crm/leads
{
"externalId": "campaign-2026-11-001",
"contact": { "companyName": "Autoservis Novák s.r.o.", "email": "info@example.com", "phone": "+420 777 123 456" },
"serviceOfInterest": "PPF full car",
"estimatedValue": 45000,
"source": "Partner website",
"utmSource": "newsletter",
"utmCampaign": "autumn-2026",
"note": "Lead from the November campaign"
}
| Field | Meaning |
|---|---|
contactId | an existing contact – or |
contact | details of a new contact: type (company/individual, derived automatically), companyName, firstName, lastName, title, email, phone, phonePrefix (default +420), notes |
matchExistingContact | default true: the contact is first looked up by email and phone. An unambiguous match = the lead is attached to the existing contact. An unclear match (for example a shared info@ email) = a new contact, and the lead gets possibleDuplicateContactIds for manual review. false = always a new contact. |
status | default waiting; lost with lostReason (values from /meta) and lostReasonNote |
source | the lead source: a value from /meta (website, api…) or a name (60 characters at most). A source the company does not have yet is created with this lead. Default manual. See Lead sources. |
utmSource, utmMedium, utmCampaign, utmContent, utmTerm | the campaign's UTM parameters (the same fields as for leads from a website form; in the app they are in the lead CSV export) |
sourceCampaign | campaign name; if missing, utmCampaign is used |
serviceOfInterest, estimatedValue | the service of interest and the estimated value |
solverId | the assignee; if missing, it is the key owner (as in the app); null = unassigned |
vehicleId, firstCallMade | the vehicle and the first-contact flag |
note | the lead's initial note |
externalId | recommended – your id. Sending the same externalId again does not duplicate the lead and returns the one already created ("created": false, HTTP 200). |
Response: the lead and "created": true (HTTP 201). If the lead created a
new source, the response also has "sourceCreated": true.
Lead sources
Every company has built-in sources (Website, Referral, Manual,
API / integration) plus its own, which it adds under
Lookup lists. In source you can send:
- the source value from
GET /api/crm/meta, for examplewebsite, - the source name, for example
"Web"or"Partner website". Case and diacritics do not matter;"partner WEBSITE"finds the same source.
If the company does not have a source with that name yet, the first lead
creates it as a custom source. The source gets a machine value derived from
the name ("Partner website" → partner_website) and from then on the
company sees it in the picker, in the list filter and in Lookup lists, where
it can rename or hide it. The lead returns the machine value in source
and the name as the company sees it in sourceLabel. After a rename the
value stays the same, so your stored leads still match.
Send one fixed name per channel. Campaigns and other details belong in
utmCampaign, utmSource and the other UTM fields, not in the source:
every campaign as a source would flood the company's picker. A company can
offer at most 100 custom sources (hidden ones do not count). When the cap is
reached, a lead with a new source name is still saved, but with the api
source, and the response carries
"warnings": [{ "code": "source_limit", … }]. Existing sources can always
be used.
Updating a lead
PATCH /api/crm/leads/{id}
{ "status": "contacted", "assignToMe": true, "note": "First email sent" }
| Field | Meaning |
|---|---|
status | any board column; won and lost record the date the lead was won or lost. lost without lostReason gets the “other” reason, with note as the lost note. |
lostReason, lostReasonNote | the lost reason (only for a lead in the lost status or with status: "lost") |
assignToMe: true | assigns the lead to the key owner; 409 if someone else already holds it |
solverId | assigns the lead to anyone in the company (id from /meta), null = unassigned |
serviceOfInterest, estimatedValue | lead details (null clears) |
source | the lead source, a value or a name as for a new lead; an unknown name creates the source |
sourceCampaign, utmSource, utmMedium, utmCampaign, utmContent, utmTerm | campaign and UTM (null clears) |
callNotes | the text of the Note field in the lead form (overwrites it entirely, null clears) |
contactId | attaches a different contact; the lead's name, phone and email are overwritten |
dismissDuplicates: true | dismisses the contact's “possible duplicates” |
vehicleId | attaches a vehicle, null removes it |
firstCallMade | the flag that the first contact has taken place |
note | a locked “Automation” note; write ordinary notes via /notes |
Fields can be combined. Sending the same change of status, assignee or lead
details again is safe and duplicates nothing. The exception is note: the
same text is de-duplicated only within the same minute.
Deleting a lead
DELETE /api/crm/leads/{id}
Only with the key of a user with the administrator or manager role (just like the Delete button in the app). Everyone else gets 403.
Notes
GET /api/crm/leads/{id}/notes
POST /api/crm/leads/{id}/notes { "body": "Called, will get back on Monday" }
PATCH /api/crm/leads/{id}/notes/{noteId} { "body": "corrected text" }
POSTwrites an ordinary note (like the Notes tab in the app) and updates “Last contacted by”. With"kind": "automation"it writes a locked automation block, which does not count as contact.- The same text sent again within the same minute is not duplicated
(
"duplicate": true). PATCHedits only the key owner's own unlocked note; any other note returns 403.
Tasks
GET /api/crm/leads/{id}/tasks
POST /api/crm/leads/{id}/tasks { "title": "Call back", "dueDate": "2026-11-10T09:00:00+01:00", "priority": "high" }
PATCH /api/crm/leads/{id}/tasks/{taskId} { "status": "completed" }
priority:low,medium(default),high,urgent.assigneeId: the default is the key owner; a different assignee receives a “New task” notification.status:pending,in_progress,completed,cancelled.
Board columns
GET /api/crm/statuses columns in board order and the allowed colours
POST /api/crm/statuses { "label": "Follow-up sent", "tone": "teal", "position": 2 }
PATCH /api/crm/statuses/{value} { "label": "…", "tone": "…", "position": 0 }
DELETE /api/crm/statuses/{value}?moveTo=waiting
POSTcreates a column just like + Add column on the board. The machine valuevalueis derived from the name (Follow-up sent→follow_up_sent) and can be used as a lead'sstatusstraight away. If a column with the same name already exists, it is returned (200,"created": false). A new column returns 201.toneis the colour:amber,blue,purple,emerald,red,slate(default),teal,pink,orange,indigo.positionis the order, starting from zero; without it the column goes at the end.PATCHrenames, recolours or moves a column, including built-in ones (waiting,contacted,quoted,won,lost). Itsvaluenever changes.DELETEdeletes only a custom column; built-in ones return 400. Leads in the deleted column are first moved tomoveTo(defaultwaiting). The response says how many leads were moved (movedLeads). If a lead cannot be moved, the column stays, the response is 503 and the call can safely be repeated.- A concurrent change to the board returns 409 – just repeat the request.
Errors
An error response has the shape { "error": "description" }, and some
errors also have a machine-readable code.
| Code | Meaning |
|---|---|
| 400 | invalid body, unknown field, unknown status (the response carries allowedStatuses) or unknown user |
| 401 | the API key is missing, invalid or revoked, or its user is no longer active in the company |
| 403 | company_archived – the company is archived in FoxFix; plan_without_api – the company's plan does not include the API; subscription_inactive – the company's subscription is not active; leads_module_disabled – the company has the Leads module switched off; role_without_leads – the key's user has a role without access to leads; no code – an action the key's user is not permitted to do (deleting, someone else's note) |
| 404 | the lead, contact, vehicle, note or task does not exist (or does not belong to the key's company) |
| 409 | assignToMe on a lead held by another user, or a concurrent change to the board or lead sources (repeat the request) |
| 429 | rate_limited – the request limit has been exceeded; repeat after the time in the Retry-After header (seconds) |
| 503 | unavailable – a temporary error; repeat after the time in the Retry-After header |
| 5xx | another temporary error – repeat shortly (see Retrying requests below) |
Retrying requests
After a 5xx error or a connection timeout, you do not know whether the change was written. These are safe to repeat:
POST /leadswithexternalId– the second time it returns the lead already created,PATCH /leads/{id}with the lead's status, assignee or details,POST /statuseswith the same name, andPATCHandDELETEon columns.
Take care with these requests – repeating them can create a duplicate:
POST /leadswithoutexternalIdcreates a second lead,POST /leads/{id}/taskscreates a second task,POST /leads/{id}/notesandPATCHwithnoteare de-duplicated only within the same minute.
Before repeating such a request, check the current state first (GET).
Limits
- At most 120 requests per minute per API key (the window follows whole
minutes). Above the limit, the API returns 429 with the
Retry-After,RateLimit-PolicyandRateLimitheaders; wait the given number of seconds. Need more? Write to FoxFix support. - The lead list returns at most 200 items per page.
- Use the API reasonably, in line with FoxFix's acceptable use policy. If the load threatens the service, FoxFix may throttle the key.
- API responses must not be cached (
Cache-Control: no-store).
Integration tips
- Send an
externalIdwith every lead you create. Retrying after an outage then does not duplicate the lead. - Do not match contacts by email alone – several companies may share a
generic address. Leave it to
matchExistingContactand checkpossibleDuplicateContactIds. - To split work between several bots, use
assigned=noneandassignToMe: true. A 409 response means someone else has taken the lead – skip it. - Report a lost or leaked key to the company administrator straight away. They will issue a new one and revoke the old one.