Skip to content
Help
Sign in

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.
  1. Open Settings → Integrations and scroll down to the FoxFix API card.
  2. Under New key, select the user the integration should act as.
  3. In the “Name (e.g. Mailbot, Marketing automation)” field, type which integration the key is for.
  4. Click Create key. The New API key dialog opens.
  5. Copy the key with the button next to it.
  6. Optionally, click Test. The message “The key works” confirms that both the key and the plan are in order. The test changes nothing.
  7. 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 (or x-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. PATCH ignores unknown fields and lists them in the response as ignoredFields, 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 (their value is sent as the lead's status),
  • 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,
  • taskPriorities and taskStatuses – values for tasks,
  • users – the company's active users (their id is sent as solverId or assigneeId),
  • 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
ParameterValuesMeaning
statuswaiting, contacted, quoted, won, lost or a custom columnfilter by status
assignedme = the key owner's leads, none = unassignedfilter by assignee
limit1–200 (default 100)page size
cursorthe nextCursor value from the previous pagepagination
includepersonsadds the company's contact persons (name, position, email, phone)
externalIdyour id from POSTfinds the lead created with this externalId (0 or 1 item)
updatedSincean ISO 8601 time, e.g. 2026-11-05T08:00:00Zonly 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=…:

  1. On the first run, go through all leads and remember the highest updatedAt.
  2. On the next run, send this time minus 2 minutes as updatedSince and go through all pages. The margin catches a change that reached the listing slightly later than a newer change to another lead.
  3. The same lead may therefore arrive more than once. Match by id and compare updatedAt with 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"
}
FieldMeaning
contactIdan existing contact – or
contactdetails of a new contact: type (company/individual, derived automatically), companyName, firstName, lastName, title, email, phone, phonePrefix (default +420), notes
matchExistingContactdefault 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.
statusdefault waiting; lost with lostReason (values from /meta) and lostReasonNote
sourcethe 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, utmTermthe campaign's UTM parameters (the same fields as for leads from a website form; in the app they are in the lead CSV export)
sourceCampaigncampaign name; if missing, utmCampaign is used
serviceOfInterest, estimatedValuethe service of interest and the estimated value
solverIdthe assignee; if missing, it is the key owner (as in the app); null = unassigned
vehicleId, firstCallMadethe vehicle and the first-contact flag
notethe lead's initial note
externalIdrecommended – 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 example website,
  • 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" }
FieldMeaning
statusany 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, lostReasonNotethe lost reason (only for a lead in the lost status or with status: "lost")
assignToMe: trueassigns the lead to the key owner; 409 if someone else already holds it
solverIdassigns the lead to anyone in the company (id from /meta), null = unassigned
serviceOfInterest, estimatedValuelead details (null clears)
sourcethe lead source, a value or a name as for a new lead; an unknown name creates the source
sourceCampaign, utmSource, utmMedium, utmCampaign, utmContent, utmTermcampaign and UTM (null clears)
callNotesthe text of the Note field in the lead form (overwrites it entirely, null clears)
contactIdattaches a different contact; the lead's name, phone and email are overwritten
dismissDuplicates: truedismisses the contact's “possible duplicates”
vehicleIdattaches a vehicle, null removes it
firstCallMadethe flag that the first contact has taken place
notea 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" }
  • POST writes 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).
  • PATCH edits 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
  • POST creates a column just like + Add column on the board. The machine value value is derived from the name (Follow-up sent → follow_up_sent) and can be used as a lead's status straight away. If a column with the same name already exists, it is returned (200, "created": false). A new column returns 201.
  • tone is the colour: amber, blue, purple, emerald, red, slate (default), teal, pink, orange, indigo. position is the order, starting from zero; without it the column goes at the end.
  • PATCH renames, recolours or moves a column, including built-in ones (waiting, contacted, quoted, won, lost). Its value never changes.
  • DELETE deletes only a custom column; built-in ones return 400. Leads in the deleted column are first moved to moveTo (default waiting). 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.

CodeMeaning
400invalid body, unknown field, unknown status (the response carries allowedStatuses) or unknown user
401the API key is missing, invalid or revoked, or its user is no longer active in the company
403company_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)
404the lead, contact, vehicle, note or task does not exist (or does not belong to the key's company)
409assignToMe on a lead held by another user, or a concurrent change to the board or lead sources (repeat the request)
429rate_limited – the request limit has been exceeded; repeat after the time in the Retry-After header (seconds)
503unavailable – a temporary error; repeat after the time in the Retry-After header
5xxanother 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 /leads with externalId – the second time it returns the lead already created,
  • PATCH /leads/{id} with the lead's status, assignee or details,
  • POST /statuses with the same name, and PATCH and DELETE on columns.

Take care with these requests – repeating them can create a duplicate:

  • POST /leads without externalId creates a second lead,
  • POST /leads/{id}/tasks creates a second task,
  • POST /leads/{id}/notes and PATCH with note are 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-Policy and RateLimit headers; 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 externalId with 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 matchExistingContact and check possibleDuplicateContactIds.
  • To split work between several bots, use assigned=none and assignToMe: 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.

Related