1. API keys
A key belongs to one company. The company’s owner creates it in Nexfield: Settings → API → Create key. The key is shown once; Nexfield keeps only its hash. Revoking a key stops it at once and deletes the webhooks it made. Changing or resetting the owner’s password, or signing out everywhere else, ends every key of the company.
- A key looks like
nfk_followed by 36 letters and digits: 30 random ones and a 6-character checksum (see If a key leaks). - When you create a key you choose its access: Full access (every scope; for automation tools), Read only (every scope that reads; for reports) or Website booking (
services:read,availability:readandjobs:writeonly; for your own booking form). - A key may have allowed IP addresses: up to 10 addresses or CIDR ranges (IPv4 or IPv6, like
203.0.113.7or198.51.100.0/24). A request from any other address answers 403 withcurrent.reasonip_not_allowed, and counts toward the key’s suspension (see Limits). Leave it empty for a service that calls from many addresses. - A key may expire after 30, 90 or 365 days, or never. An expired key answers 401 with a message that says when it expired.
- A company can have up to 10 keys.
- Keys work on paid plans. On another plan, or while the account is on hold, every request answers 403.
2. Scopes
A key has scopes: what it may do. Each route needs one. A Full access key has *, every scope, also those added later; a Read only key has every scope that ends in :read, also those added later; a Website booking key has services:read, availability:read and jobs:write.
| Scope | Allows |
|---|---|
clients:read | GET /api/v1/clients, GET /api/v1/clients/{id}, the events client.* |
clients:write | POST /api/v1/clients, PATCH /api/v1/clients/{id} (both with clients:read) |
jobs:read | GET /api/v1/jobs, GET /api/v1/jobs/{id}, the events job.* |
jobs:write | POST /api/v1/jobs and PATCH /api/v1/jobs/{id} (both with jobs:read and clients:read; a booking with slot_token needs jobs:write alone), POST /api/v1/jobs/{id}/notes (with jobs:read) |
calls:read | GET /api/v1/calls, GET /api/v1/calls/{id}, the event call.finished |
technicians:read | GET /api/v1/technicians, GET /api/v1/technicians/{id} |
estimates:read | GET /api/v1/estimates, GET /api/v1/estimates/{id}, the events estimate.* |
invoices:read | GET /api/v1/invoices, GET /api/v1/invoices/{id}, the events invoice.* |
payments:read | GET /api/v1/payments, GET /api/v1/payments/{id}, the events payment.* |
services:read | GET /api/v1/services |
availability:read | GET /api/v1/availability |
webhooks:write | Every route of /api/v1/webhooks, the two that read included (a webhook also needs the read scope of every record each event it takes holds) |
A write answers the record, and that record holds what is already on file (a client found by its phone), so it also needs the read scopes: POST /api/v1/clients and PATCH /api/v1/clients/{id} need clients:write and clients:read; POST /api/v1/jobs and PATCH /api/v1/jobs/{id} need jobs:write, jobs:read and clients:read.
GET /api/v1/me works with any key. A key without the scope a route needs answers 403 with current.reason scope_missing and the scope in current.scope.
3. Requests
Every route is below https://nexfield.pro/api/v1, over HTTPS. Send the key as a bearer token:
Authorization: Bearer nfk_... Bodies are JSON (Content-Type: application/json). A field or a query parameter the route does not know is refused. A success answers the record in data:
{"data": {...}, "meta": {"request_id": "3f9c2a1b7d4e6f80"}} Every answer carries Nexfield-Api-Version: 1 and an X-Request-Id to quote to support.
The same routes as an OpenAPI 3 document: https://nexfield.pro/openapi/v1.json.
- An id is a string, like
cli_1042orjob_48213: store it as text and send it back as it is. It is at most 64 characters and begins with its kind:cli_a client,job_a job,call_a call,est_an estimate,inv_an invoice,pay_a payment,tech_a technician,jst_a company’s own job status,wh_a webhook,evt_an event,co_the company. Do not read anything else out of it. - A phone number is E.164 (
+17145550123) inphone, with the same number as people read it ((714) 555-0123) inphone_display. In a request a US number may be typed in any common form. - Money is a whole number of cents in a field named
…_cents(12950is $129.50), withcurrency(USD) on every record that holds money. - Times are UTC in RFC 3339 (
2026-12-01T17:30:00Z), except a job’sstart_localandend_local, which are the company’s wall clock in itstimezone(2026-12-01 09:30). A date is2026-12-01. - An answer always carries every field of its record: a field that is empty is null, never left out. Every record has
created_atandupdated_at. Each record’surlopens it in the Nexfield web app. - In a create (
POST), an empty string or null counts as a field not sent. - In a change (
PATCH), a field not sent stays as it is, and an empty string also stays (a blank mapping in a no-code tool does not wipe data). Null clears a field that may be empty; null for a field that may not be empty (a name, a phone) answers 422.
The API never deletes a client, a job, a call, an estimate, an invoice or a payment, and it does not create or change estimates, invoices or payments. The only delete is DELETE /api/v1/webhooks/{id}.
4. Build with AI
Paste this into your coding assistant before you say what to build. The whole reference is at https://nexfield.pro/developers.md.
You are building an integration with the Nexfield API, version 1.
Reference (Markdown): https://nexfield.pro/developers.md
OpenAPI 3.1: https://nexfield.pro/openapi/v1.json
Base URL: https://nexfield.pro/api/v1
Rules:
- Send the key in the header "Authorization: Bearer nfk_...". Read it on the server from an environment variable, such as NEXFIELD_API_KEY. Never put it in a URL, in browser or app code, or in a repository.
- Bodies are JSON. A success is {"data": ..., "meta": {...}}; an error is {"error": {"code": ..., "message": ...}} with an HTTP status that is never 200.
- Ids are opaque strings with a prefix (cli_1042, job_48213). Store them as text and send them back as they are; never read anything out of them.
- Phones are E.164 (+17145550123) in phone; phone_display is the same number as people read it.
- Money is a whole number of cents in fields named *_cents, with currency (USD).
- Times are UTC in RFC 3339, except a job's start_local and end_local: the company's wall clock in its timezone.
- For a job, branch on stage (open, done or canceled); status and custom_status say more.
- Lists answer a page at a time: send meta.next_cursor back as cursor, with the same order and filters, until it is null.
- Send an Idempotency-Key header (a new value for each write, the same value when you retry it) with POST and PATCH of /clients and /jobs, POST /jobs/{id}/notes and POST /webhooks.
- On 429, wait the seconds of the Retry-After header. With error.current.reason daily_limit the company reached a daily limit of that kind of write: send no more of it until Retry-After; the key is not suspended and every other request goes on.
- Webhooks: check every delivery with a Standard Webhooks library (https://www.standardwebhooks.com/), given the raw body, the webhook-id, webhook-timestamp and webhook-signature headers and the webhook's whsec_ secret. Answer 2xx within 10 seconds (3 for a failing webhook's later tries) and do the work after. A delivery may come more than once and in any order: skip a webhook-id you already have.
- Accept fields, values and event types you do not know.
5. Versioning
This is version 1 of the API, at /api/v1. Within version 1 changes are only additions:
- new routes;
- new optional fields in a request;
- new fields in an answer or an event’s body;
- new values of a field with a list of values (a job’s
status, a call’soutcome, an invoice’sstatus, a payment’smethod, an event’stype): your code must accept values it does not know; - new event types.
Read answers by field name and ignore fields you do not use: an answer’s objects may gain fields, and a field’s list of values may grow, so your code must accept fields and values it does not know. Anything else (a field removed or renamed, a type changed, a new required field) comes as version 2 at /api/v2, next to version 1. Version 1 keeps working until a notice period ends: its routes then answer with Deprecation (RFC 9745) and Sunset (RFC 8594) headers, the date from which a route is deprecated and the date it stops answering, and this page says so first.
6. Errors
An error never answers 200. Its body names a code and a sentence that can be shown as it is:
{"error": {"code": "validation_failed", "message": "Please check the highlighted fields.", "fields": {"start": "Use a date and time like 2026-12-01 09:30."}}} | Status | Code | When |
|---|---|---|
| 400 | invalid_request | The JSON is malformed; a list got a query parameter it does not take, or a value that is not what the parameter takes (fields names it: a limit that is not 1 to 100, a cursor that is not one of this list and order, an id, date or time that is not one); or the Idempotency-Key is not 1 to 255 characters. |
| 401 | unauthorized | No key, or a key that is revoked, expired, mistyped or ended by a change of the owner’s password. |
| 403 | forbidden | The account is not on a paid plan, or is on hold (current.reason plan_required); the key is suspended (key_suspended, see Limits); the key lacks the route’s scope or the read scope of a record (scope_missing, the scope in current.scope); or the request came from an address the key does not allow (ip_not_allowed). |
| 404 | not_found | No such route, or an id that names no record of the company (also another company’s id, and a text that is not an id). |
| 409 | conflict | The phone belongs to another client (current.reason phone_taken, the client in current.client); the same job was sent twice (duplicate, the job in current.job); the job cannot change this way now (job_conflict, the message says why); a test of a webhook that is off (webhook_disabled). On a retry with an Idempotency-Key: the record its first request made was deleted since (record_gone), or the webhook it made was deleted since (webhook_gone). |
| 409 | idempotency_conflict | The Idempotency-Key was used with a different request (current.reason idempotency_mismatch), or its first request is still running. |
| 413 | invalid_request | The body is larger than 16 KB. |
| 422 | validation_failed | A field of the body is missing, wrong or not one the route takes; fields names each one. |
| 429 | rate_limited | Too many requests; wait retry_after seconds (also the Retry-After header). With current.reason daily_limit: the company reached a daily limit (see Limits): that kind of write is refused until the rolling 24 hours free room (Retry-After an hour); the key is not suspended and every other request goes on. |
| 500 | server_error | Something went wrong on our side. Quote the X-Request-Id header to support. |
| 503 | unavailable | Nexfield is being updated. Try again in a few minutes. |
7. Limits
- 120 requests a minute for each key, and 300 a minute for all the keys of one company together.
- Requests without a valid key: 600 a minute from one IP address.
- A request body is at most 16 KB; a larger one answers 413.
- The longest values of the fields: a name 100 characters, an email 100, a phone 32, an address 255, a service 100, notes and a description 4000, a lead source 60, a note for the team 2000, a webhook’s address 500 and its description 200. A longer value answers 422 for its field; nothing is cut.
- In any 24 hours, all the keys of a company together: 500 new clients, 500 new jobs, 2000 changes (
PATCHof a client or a job) and 1000 notes. Past one of them the write answers 429 withcurrent.reasondaily_limituntil those 24 hours free room. The key keeps working for everything else, and the company’s owner gets one email. - 50 webhooks a company, turned-off ones included.
- 1000 deliveries a company waiting to be sent; past that the oldest are dropped.
- A key that tries what it may not (a scope it lacks, an address it is not allowed from) more than 200 times in 10 minutes is suspended. No other refusal counts: not a 400, 404, 409 or 422, and not a 429.
Over a rate limit a request answers 429 with retry_after and the Retry-After header (seconds).
A suspended key answers 403 with current.reason key_suspended to every request, and its webhooks send nothing. The company’s owner gets one email and resumes or revokes the key in Settings → API.
Every answer tells where its tightest rate limit stands:
| Field | Type | Meaning |
|---|---|---|
RateLimit-Limit | header | The requests allowed in the window (120 for a key, 300 for a company). |
RateLimit-Remaining | header | The requests left in the window after this one. |
RateLimit-Reset | header | Seconds until the window ends and the limit is full again. |
Retry-After | header | On a 429 only: seconds to wait. |
8. Idempotent writes
The writes of clients and jobs and the create of a webhook (POST /api/v1/clients, PATCH /api/v1/clients/{id}, POST /api/v1/jobs, PATCH /api/v1/jobs/{id}, POST /api/v1/jobs/{id}/notes, POST /api/v1/webhooks) take an optional Idempotency-Key header: any 1 to 255 characters, one per write you mean to make, sent again unchanged when you retry it.
- The first request’s answer is kept for 24 hours for your key.
- The same key with the same body again answers that kept answer (with
meta.replayedtrue) and writes nothing. - The same key with a different body answers 409
idempotency_conflictwithcurrent.reasonidempotency_mismatch. - When a record was made but its answer was lost, the same key again answers that record. When the record or webhook it made was deleted since, it answers 409
conflictwithcurrent.reasonrecord_goneorwebhook_gone: send a new key to create it again. - An error answer is not kept: a retry after one runs again.
- Without the header every request runs.
curl https://nexfield.pro/api/v1/clients \
-H 'Authorization: Bearer nfk_...' \
-H 'Idempotency-Key: 6f1c0e9a-client-dana-lee' \
-H 'Content-Type: application/json' \
-d '{"name": "Dana Lee", "phone": "7145550123"}'
9. Records
Each object has one shape: the same in a list, by its id, in a write’s answer and in an event’s body.
Client
| Field | Type | Meaning |
|---|---|---|
id | string | The client’s id, like cli_1042. |
number | string or null | The client number the company sees. |
name | string | The client’s name. |
phone | string or null | E.164, +17145550123. |
phone_display | string or null | The same number as people read it, (714) 555-0123. |
email | string or null | The main email. |
address | string or null | The main address. |
notes | string or null | The notes about the client. |
source | object | How the client first came: the source of the client’s first job when the client was added with it, else only the kind of how the client was added. See Source below. |
sms_opted_out | true or false | True when the client’s phone replied STOP and has not replied START since: Nexfield sends it no text. |
created_at | time | When the client was added. |
updated_at | time | When the client last changed. |
url | string | The client in Nexfield. |
Job
A job’s status is three fields. Branch on stage; status and custom_status say more.
| Field | Type | Meaning |
|---|---|---|
id | string | The job’s id, like job_48213. |
number | string | The job number the company sees. |
stage | string | open, done or canceled. |
status | string | new, confirmed, rescheduled, in_progress, completed, canceled, warranty_callback or important_message. Accept values you do not know. |
custom_status | object or null | {id, name} of the company’s own status of the job, when it has one. |
created_at | time | When the job was made. |
updated_at | time | When the job last changed. |
completed_at | time or null | When the job last became done, while it is done; null once it is opened again, and for a job done before November 2026. |
canceled_at | time or null | When the job last became canceled, while it is canceled; null once it is opened again, and for a job canceled before November 2026. |
start_local | string or null | The start on the company’s clock, "2026-12-01 09:30"; null for a job with no time yet. |
end_local | string or null | The end on the company’s clock. |
timezone | string | The company’s time zone, America/Los_Angeles. |
start | time or null | The start in UTC. |
end | time or null | The end in UTC. |
service | string or null | The service. |
description | string or null | What the client needs. |
address | string or null | Where the job is. |
lead_source | string or null | Where the job came from, as POST /api/v1/jobs sent it, like Website form. |
source | object | Where the job’s client came from. See Source below. It does not change after the job is made. |
client | object or null | {id, name, phone, phone_display, email} of the job’s client. |
technicians | list | {id, name} of each technician on the job; the first is the job’s technician. Empty when nobody is on it. |
url | string | The job in Nexfield. |
A job the company marks as spam leaves the lists. Read by its id it answers stage canceled and status spam, and a webhook gets one job.canceled for it.
Source
Where a client came from, on every job and every client. Every field is there; one that is not known is null. A key that reads jobs or clients reads it: only the owner makes keys, and the owner sees the same facts on the job in Nexfield.
| Field | Type | Meaning |
|---|---|---|
kind | string or null | ai_call (the AI receptionist), booking (the online booking page or the website widget), thumbtack, google (Reserve with Google), manual (added in Nexfield), api (made through this API), import or other. Accept values you do not know. |
channel | string or null | For an online booking, the channel the visit was counted under, like paid_search, organic_search or referral. |
utm | object | {source, medium, campaign, term, content}: the campaign tags the visit came with. |
click | object | {type, param, id} of the ad click: type google_ads, meta or other; param gclid, gbraid, wbraid, fbclid, msclkid or ttclid; id the click id. |
landing_page | string or null | The page of your website the booking started on, without its query string. |
referrer_host | string or null | The site the visitor came from, like google.com. |
line | object | {name, number} of your line an AI call came in on. |
lead_source | string or null | The lead source POST /api/v1/jobs was sent. |
Where clients come from
Read source of a job to see how each job came in: kind says the way, and an online booking adds its campaign tags, the ad click and the page it started on, an AI call the line that was called. Read source of a client to count new clients by the way they first came. A job made through this API says api, with the lead_source you sent.
Send a conversion to Google Ads or Meta when an invoice is paid
Subscribe a webhook to invoice.paid. When it comes, read GET /api/v1/jobs/{id} with the invoice’s job_id. When source.click.type is google_ads, upload an offline conversion with source.click.id in the field source.click.param names (gclid, gbraid or wbraid) and the invoice’s total_cents as its value; when it is meta, send it to Meta’s Conversions API as the fbclid. The click id is your company’s own data.
Call
A call the AI receptionist answered and finished. Spam calls are never listed or sent.
| Field | Type | Meaning |
|---|---|---|
id | string | The call’s id, like call_9917. |
started_at | time | When the call began. |
ended_at | time | When it ended. |
duration_seconds | integer | Its length. |
caller_phone | string or null | The caller’s number, E.164. |
caller_phone_display | string or null | The same, as people read it. |
summary | string or null | The AI’s summary of the call. |
outcome | string | booked (the call made a job), message (the caller left a message) or conversation. |
client | object or null | {id, name} of the caller’s client. |
job | object or null | {id, number} of the job the call booked. |
line | object | {name, number} of the company’s own line the call came in on; each null when unknown. |
recording_url | string or null | The recording, through a signed link valid for 7 days. |
created_at | time | When the call began, the same as started_at. |
updated_at | time | When the call’s record last changed. |
url | string | The call’s job, else its client, else Activity in Nexfield. |
Technician
| Field | Type | Meaning |
|---|---|---|
id | string | The technician’s id, like tech_12. |
name | string | First and last name. |
phone | string or null | E.164. |
phone_display | string or null | The same, as people read it. |
email | string or null | The technician’s email. |
active | true or false | False for a technician who was turned off. |
created_at | time | When the technician was added. |
updated_at | time | When the technician last changed. |
Estimate
| Field | Type | Meaning |
|---|---|---|
id | string | The estimate’s id, like est_771. |
number | string | The estimate number the company sees. |
status | string | draft, sent, approved, declined or expired. |
client_id | string or null | The estimate’s client. |
job_id | string or null | The estimate’s job. |
total_cents | integer | The total in cents. While the client still chooses between options, the lowest option’s total. |
total_max_cents | integer or null | The highest option’s total while the client still chooses between options; else null. |
currency | string | USD. |
valid_until | date or null | The last day the estimate is good for. |
sent_at | time or null | When it was sent to the client. |
approved_at | time or null | When it was approved. |
declined_at | time or null | When it was declined. |
created_at | time | When the estimate was made. |
updated_at | time | When the estimate last changed. |
url | string | The estimate in Nexfield. |
Invoice
| Field | Type | Meaning |
|---|---|---|
id | string | The invoice’s id, like inv_3305. |
number | string | The invoice number the company sees. |
status | string | draft, sent, viewed, partial, paid, overdue or canceled. |
client_id | string or null | The invoice’s client. |
job_id | string or null | The invoice’s job. |
estimate_id | string or null | The estimate the invoice was made from. |
total_cents | integer | The total in cents. |
paid_cents | integer | What was paid. |
balance_cents | integer | What is still due. |
currency | string | USD. |
invoice_date | date or null | The invoice’s date. |
due_date | date or null | The day it is due. |
sent_at | time or null | When it was sent to the client. |
paid_at | time or null | When it became paid; null while it is not paid. |
created_at | time | When the invoice was made. |
updated_at | time | When the invoice last changed. |
url | string | The invoice in Nexfield. |
Payment
A payment recorded on an invoice: a payment, a deposit or a tip.
| Field | Type | Meaning |
|---|---|---|
id | string | The payment’s id, like pay_20417. |
invoice_id | string | The payment’s invoice. |
client_id | string or null | The invoice’s client. |
job_id | string or null | The invoice’s job. |
kind | string | payment, deposit or tip. |
method | string | How it was paid: card, tap_to_pay, cash, check, zelle, venmo and others. Accept values you do not know. |
status | string | succeeded, voided, returned (a deposit given back), partially_refunded or refunded. |
amount_cents | integer | The amount in cents. |
refunded_cents | integer | What went back of it. |
currency | string | USD. |
created_at | time | When the payment was recorded. |
updated_at | time | When the payment or its invoice last changed. |
10. GET /api/v1/me
Who the key belongs to. Use it to test a key.
curl https://nexfield.pro/api/v1/me \
-H 'Authorization: Bearer nfk_...' {"data": {"company_id": "co_1042", "company_name": "Bay Appliance Pros", "email": "[email protected]", "timezone": "America/Los_Angeles", "currency": "USD"}, "meta": {"request_id": "..."}}
11. Lists and filters
GET /api/v1/clients, GET /api/v1/jobs, GET /api/v1/calls, GET /api/v1/technicians, GET /api/v1/estimates, GET /api/v1/invoices and GET /api/v1/payments answer a page at a time, as a list in data. Every list takes:
| Field | Type | Meaning |
|---|---|---|
limit | query, integer | Records a page holds: 1 to 100; 25 when not sent. |
cursor | query, string | meta.next_cursor of the previous page, as it is. Not sent: the first page. |
order | query, string | created_desc (when not sent): the newest first. updated_asc: the oldest change first, by updated_at. |
created_since | query, time | Only records made at or after this time, like 2026-12-01T17:05:00Z. |
updated_since | query, time | Only records changed at or after this time. |
meta.next_cursor is the cursor of the next page, or null on the last one. A cursor is opaque and works only for the list, the company and the order it came from; another one, or an empty cursor=, answers 400. Send the same filters with it. With created_desc calls are ordered by when they ended, payments by the order they were recorded, the others by when they were made (then by id), so records added while you page never move a later page.
Some lists leave records out after they are read (spam calls, payments, and estimates or invoices filtered by status), so a page may hold fewer than limit while more follow: keep paging until next_cursor is null.
To copy changes as they happen, page with order=updated_asc and updated_since. Start the next run a minute before the last record’s updated_at and skip what you already have: a change that was being saved while you read can carry an earlier time. In the one hour a year when the clocks go back, a job, estimate, invoice or payment of that hour may be answered a second time; none is left out.
Each list has its own filters. Several filters narrow the list together.
| List | Filters |
|---|---|
GET /api/v1/clients | number (the client’s number, exactly), phone (a US number in any form), email (the whole address), q (a part of the name, the email or the phone) |
GET /api/v1/jobs | number (the job’s number, exactly), stage, status, client_id, technician_id, scheduled_from and scheduled_to (the company’s dates, like 2026-12-01, both included, by the job’s start) |
GET /api/v1/calls | phone (the caller’s), client_id. Here created_since compares when a call ended. |
GET /api/v1/technicians | None. The list holds turned-off technicians too (active false). |
GET /api/v1/estimates | status, client_id, job_id |
GET /api/v1/invoices | status, client_id, job_id |
GET /api/v1/payments | invoice_id, client_id, job_id |
curl 'https://nexfield.pro/api/v1/jobs?limit=3' \
-H 'Authorization: Bearer nfk_...' {"data": [{...}, {...}, {...}], "meta": {"request_id": "...", "next_cursor": "eyJjIjoxMDQyLCJ0Ijoi....Qm9vcw"}} curl 'https://nexfield.pro/api/v1/jobs?limit=3&cursor=eyJjIjoxMDQyLCJ0Ijoi....Qm9vcw' \
-H 'Authorization: Bearer nfk_...' To find a client by phone before you create one:
curl 'https://nexfield.pro/api/v1/clients?phone=7145550123' \
-H 'Authorization: Bearer nfk_...'
12. One record by its id
GET /api/v1/clients/{id}, GET /api/v1/jobs/{id}, GET /api/v1/calls/{id}, GET /api/v1/technicians/{id}, GET /api/v1/estimates/{id}, GET /api/v1/invoices/{id} and GET /api/v1/payments/{id} answer one record in data. An id that names no record of the company answers 404.
curl https://nexfield.pro/api/v1/jobs/job_48213 \
-H 'Authorization: Bearer nfk_...'
13. POST /api/v1/clients
| Field | Type | Meaning |
|---|---|---|
name | string, required | Up to 100 characters. |
phone | string, required | A 10-digit US number in any common format, up to 32 characters. |
email | string | An email address, up to 100 characters. |
address | string | Up to 255 characters. |
notes | string | Up to 4000 characters. |
Answers 201 with the client. A phone number another client already has answers 409 with that client in current.client.
curl https://nexfield.pro/api/v1/clients \
-H 'Authorization: Bearer nfk_...' \
-H 'Content-Type: application/json' \
-d '{"name": "Dana Lee", "phone": "(714) 555-0123", "email": "[email protected]"}'
14. PATCH /api/v1/clients/{id}
Send only the fields to change: name, phone, email, address, notes, with the lengths of the create. Null clears email, address or notes; null for name or phone answers 422. Answers 200 with the client as it is now. A phone number another client has answers 409 with that client in current.client. The last write wins: nothing is compared with what you read before.
curl -X PATCH https://nexfield.pro/api/v1/clients/cli_1042 \
-H 'Authorization: Bearer nfk_...' \
-H 'Content-Type: application/json' \
-d '{"email": "[email protected]", "notes": null}'
15. POST /api/v1/jobs
| Field | Type | Meaning |
|---|---|---|
client_id | string | The id of a client of the company. Send it, or client_name and client_phone, not both. |
client_name | string | Up to 100 characters. Required without client_id. |
client_phone | string | Up to 32 characters. Required without client_id. The company’s client with this number is used; with none, a client is added. |
client_email | string | An email address, up to 100 characters. Not with client_id. |
address | string | Where the job is, up to 255 characters. |
start | string | The company’s wall clock in its time zone, "2026-12-01 09:30". From a year ago to five years ahead. Not sent: a job that waits for a date, like a lead from a form. |
duration_minutes | integer | 15 to 1440; 60 when not sent. Only with start. |
service | string | Up to 100 characters. |
description | string | What the client needs, up to 4000 characters. |
lead_source | string | Where the job came from, like Website form, up to 60 characters. It is shown on the job. |
On the days the clocks change: a start the clocks skip (02:30 on the morning they move forward) answers 422 on start; a start that happens twice (01:30 on the morning they move back) is the first one. The end is duration_minutes of elapsed time after the start, so a job across a change ends on the clock that is then in force.
Answers 201 with the job, status new. The same job sent again within 30 seconds (the same start and phone) answers 409 with the job already there in current.job.
curl https://nexfield.pro/api/v1/jobs \
-H 'Authorization: Bearer nfk_...' \
-H 'Content-Type: application/json' \
-d '{"client_name": "Dana Lee", "client_phone": "7145550123", "start": "2026-12-01 09:30", "duration_minutes": 90, "service": "Dryer repair", "lead_source": "Website form"}'
16. PATCH /api/v1/jobs/{id}
Send only the fields to change. The job changes as it does in the Nexfield app: its history, the notifications to the team and a connected calendar follow. Answers 200 with the job as it is now. The last write wins.
| Field | Type | Meaning |
|---|---|---|
start | string or null | A new start, "2026-12-01 09:30"; the job keeps its length. Null takes the time off. |
duration_minutes | integer | 15 to 1440. Alone it keeps the start and moves the end. |
status | string | confirmed, completed or canceled. |
service | string or null | Up to 100 characters. Null clears it; an appliance the AI receptionist heard stays and is then answered as its service. |
description | string or null | Up to 4000 characters. Null clears it. |
address | string or null | The job’s own address, up to 255 characters; the client’s saved addresses stay. Null puts the job back at its client’s address. |
technician_ids | list of ids | The whole team after the change, up to 10: the first is the job’s technician, the others its helpers (only where the company uses helpers). An empty list takes everybody off. |
When the job cannot change this way now (a technician who is busy at that time, for one) the answer is 409 with current.reason job_conflict and a message that says why. An id in technician_ids that is not an active technician of the company answers 422.
curl -X PATCH https://nexfield.pro/api/v1/jobs/job_48213 \
-H 'Authorization: Bearer nfk_...' \
-H 'Content-Type: application/json' \
-d '{"status": "completed"}'
17. POST /api/v1/jobs/{id}/notes
Adds a note for the team to a job: text, up to 2000 characters. It is added as a new paragraph of the job’s team note; what is there stays. Answers 201 with job_id, text and created_at. A note has no id of its own. Needs jobs:write and jobs:read.
curl https://nexfield.pro/api/v1/jobs/job_48213/notes \
-H 'Authorization: Bearer nfk_...' \
-H 'Content-Type: application/json' \
-d '{"text": "Customer asked for a call 30 minutes before arrival."}'
18. GET /api/v1/services
The services the company’s online booking offers, in the order its booking page shows them. Send a service’s id to GET /api/v1/availability. Needs services:read. A company whose online booking is off answers 403 with current.reason booking_closed.
| Field | Type | Meaning |
|---|---|---|
id | string | The service’s id: its name in lower-case words joined by -, like dryer-repair. It changes when the service is renamed. |
name | string | The name the booking page shows. |
duration_minutes | integer | How long a booking takes: the booking’s slot length. |
price_from_cents | integer or null | The booking’s service fee in cents, like 8900, when the booking page shows a price; else null. |
price_to_cents | integer or null | The same as price_from_cents today (one service fee). |
currency | string | USD. |
price_label | string or null | The booking page’s words for the price, like Service Call. |
description | string or null | null today. |
curl https://nexfield.pro/api/v1/services -H 'Authorization: Bearer nfk_...'
19. GET /api/v1/availability
The free times of the company’s online booking for one service. They are worked out by the same code as the company’s booking page and its Google booking: whether online booking is on, the working days and hours, the slot length and the gap between slots, how many visits a time can take, blocked time and holidays, the lead time, the booking window (60 days ahead), technicians’ own hours, the service area by ZIP code, and the company’s time zone. Needs availability:read.
| Field | Type | Meaning |
|---|---|---|
service | query, required | The id of a service of GET /services. |
from | query | The first day, the company’s date, like 2026-12-01. Today in the company’s time zone when not sent. |
days | query | 1 to 14; 7 when not sent. |
zip | query | The job’s 5-digit ZIP code. Required where the company needs it to know the times (422 with fields.zip and current.reason zip_required). A ZIP the company does not serve online answers 422 with current.reason zip_not_served and the company’s own words. |
Answers the free times in order, each with a slot_token:
| Field | Type | Meaning |
|---|---|---|
start_local | string | The start on the company’s wall clock, like 2026-12-01 09:00. |
end_local | string | The end on the company’s wall clock. |
timezone | string | The company’s time zone, like America/Los_Angeles. |
start | string | The start in UTC, RFC 3339. |
end | string | The end in UTC, RFC 3339. |
slot_token | string | Opaque and signed: send it as it is to POST /api/v1/jobs. It holds that time for 30 minutes of offer, not of reservation: the time is checked again when you book. |
A company whose online booking uses Housecall Pro (its times or its jobs) answers 409 with current.reason external_schedule. A company whose booking page asks each customer for a code texted to their phone answers 409 with current.reason phone_verification_required: the API cannot ask that code yet, so such a company books on its own booking page.
curl 'https://nexfield.pro/api/v1/availability?service=dryer-repair&from=2026-12-01&days=7&zip=92701' \
-H 'Authorization: Bearer nfk_...'
20. Booking a time: POST /api/v1/jobs with slot_token
Send a time’s slot_token instead of start to book that time as the company’s online booking does. Nexfield checks on its server, while it holds the booking’s own lock of that day, that the time is still free: when it is not, the answer is 409 with current.reason slot_taken, and your form shows the times again. A token of another company, a changed one, one older than 30 minutes or one whose service was renamed since answers 422 on slot_token. The address must be in the ZIP code the times were asked for (422 on address otherwise; an address without a ZIP code gets that one). When the time cannot be checked at that moment the answer is 503 with Retry-After: send the same booking again then, with the same Idempotency-Key. A customer already on file keeps the email saved for them; the email sent is kept on the job.
| Field | Type | Meaning |
|---|---|---|
slot_token | string, required | From GET /availability. |
client_name | string, required | Up to 100 characters. |
client_phone | string, required | Up to 32 characters. The company’s client with this number is used; with none, a client is added. |
client_email | string | An email address, up to 100 characters. |
address | string, required | Where the job is, up to 255 characters. |
service | string | The service id of the slot_token, when sent; the token already names it. |
description | string | What the customer needs, up to 4000 characters. |
A booking needs jobs:write only. A key that also has jobs:read and clients:read gets the whole job; a Website booking key gets a confirmation that holds nothing of the client:
| Field | Type | Meaning |
|---|---|---|
id | string | The job’s id. |
number | string | The job number the company sees. |
stage | string | open. |
status | string | new. |
start_local | string | The start on the company’s wall clock. |
end_local | string | The end on the company’s wall clock. |
timezone | string | The company’s time zone. |
start | string | The start in UTC. |
end | string | The end in UTC. |
service | string | The service’s name. |
The same booking sent again within 30 seconds answers 409 with current.reason duplicate (with the job in current.job only for a key that may read jobs). A phone number the company blocked answers 403 with current.reason booking_refused. Send an Idempotency-Key so a retry after a lost answer never books twice.
curl https://nexfield.pro/api/v1/jobs \
-H 'Authorization: Bearer nfk_...' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: 6f1c0e2a-booking-form-42' \
-d '{"slot_token": "eyJj...", "client_name": "Dana Lee", "client_phone": "7145550123", "address": "1 Main St, Santa Ana, CA 92701"}'
21. Your own booking form
Your website can take bookings into Nexfield with a form of its own. The key stays on your server: your page talks to your server, and your server talks to Nexfield.
- In Nexfield, Settings → API, create a key with Access Website booking. Add your server’s IP address under allowed IP addresses.
- Keep the key in your server’s configuration (an environment variable), never in a page, in JavaScript or in a repository.
- Your server calls
GET /api/v1/servicesand shows the services. - When the customer picks a service (and types the ZIP code, where the company needs it), your server calls
GET /api/v1/availabilityand shows the times. Keep each time’sslot_tokenon your server, or send it to the page and back as it is. - When the customer sends the form, your server posts
POST /api/v1/jobswith the chosenslot_token, the customer’s name, phone and address, and anIdempotency-Key. - 201: show the confirmation (the date and time from
start_local). 409slot_taken: say the time was just taken and show the times again. 422: show the field’s message. 503: wait forRetry-Afterand send it again.
Protect the form against bots: add a CAPTCHA such as Cloudflare Turnstile and check its answer on your server before you call Nexfield. A form a bot fills wrongly suspends no key (a 422 or a 409 never counts), but each company can create at most 500 jobs a day through the API, and a bot that books real times takes them from your customers.
22. Webhooks
A webhook is an address of yours that Nexfield sends the company’s events to as they happen. Every route needs webhooks:write, and a webhook needs the read scope of every record each event it takes holds: a job’s events jobs:read and clients:read (a job holds its client), call.finished calls:read, clients:read and jobs:read, every other event its record’s own.
| Route | What it does |
|---|---|
POST /api/v1/webhooks | Makes a webhook. Answers 201 with the webhook and its secret, once. |
GET /api/v1/webhooks | The webhooks this key made. |
GET /api/v1/webhooks/{id} | One of them. |
PATCH /api/v1/webhooks/{id} | Changes url, events, description (null clears it) or enabled (false turns it off, true turns it on again). |
DELETE /api/v1/webhooks/{id} | Ends it. Answers 204, also when it is already gone. |
POST /api/v1/webhooks/{id}/rotate-secret | Answers a new secret, once. For 24 hours every delivery is signed with both the new secret and the one before it. |
POST /api/v1/webhooks/{id}/test | Sends a webhook.test event now (its object is the webhook, with url null) and answers delivered, the status your address answered and the event_id. |
| Field | Type | Meaning |
|---|---|---|
url | string, required | An https address of your own server, up to 500 characters: a host name, port 443, no IP address, no user name or password, no # part. |
events | list, required | The event types to get, or ["*"] for all of them (for a key’s webhook: all the key may read). |
description | string | Your own words for it, up to 200 characters. |
curl https://nexfield.pro/api/v1/webhooks \
-H 'Authorization: Bearer nfk_...' \
-H 'Content-Type: application/json' \
-d '{"url": "https://example.com/webhooks/nexfield", "events": ["job.created", "job.completed"]}' {"data": {"id": "wh_42", "url": "https://example.com/webhooks/nexfield", "events": ["job.created", "job.completed"], "description": null, "enabled": true, "disabled_reason": null, "created_at": "2026-12-01T17:30:00Z", "updated_at": "2026-12-01T17:30:00Z", "secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw..."}, "meta": {"request_id": "..."}} secretis the webhook’s signing secret, given once: keep it to check each delivery. Only the answer that makes the webhook and the answer of a rotation carry it.- A webhook belongs to the key that made it: only that key sees and changes it, it works only while the key does, and revoking the key deletes it.
- The same
urlagain from the same key answers 200 with the webhook already there,secretnull: it takes the neweventsanddescriptionand is turned on. Nothing is ever sent twice because a create was sent twice. - When Nexfield turns a webhook off,
enabledis false anddisabled_reasonsays why:gone(your address answered 410) orfailing(three days without one accepted delivery);userwhen you turned it off. A key’s webhook that stays off for 30 days is deleted. - Nexfield sends only to public addresses: at each send every address your host name resolves to must be public, and a redirect is not followed.
- A company can have up to 50 webhooks, turned-off ones included.
23. Events
| Event | When |
|---|---|
client.created, client.updated | A client was added; a client changed. |
job.created | A job was made. |
job.updated | A job changed in any way. |
job.scheduled, job.started, job.completed, job.canceled | A job’s time was set or moved; work began; the job was done; it was canceled. Each is sent together with job.updated. |
call.finished | The AI receptionist finished a call. |
estimate.created, estimate.sent, estimate.approved, estimate.declined | An estimate was made, sent to its client, approved, declined. |
invoice.created, invoice.sent, invoice.paid | An invoice was made, sent to its client, paid. |
payment.created, payment.refunded | A payment was recorded; money of a payment went back. |
Each event is POSTed as JSON with the record under data.object, in the shape of Records:
{"id": "evt_81234", "type": "job.completed", "created_at": "2026-12-01T18:02:11Z", "api_version": "1", "data": {"object": {"id": "job_48213", "stage": "done", "status": "completed", ...}}} | Field | Type | Meaning |
|---|---|---|
id | string | The event’s id, like evt_81234. The same on every retry and at every webhook that gets the event. |
type | string | The event type. Accept types you do not know and answer 2xx. |
created_at | time | When the event happened. |
api_version | string | 1: the version of the body. |
data.object | object | The record as it was when the event happened. Every retry sends the same body; read the record by its id for how it is now. |
- A
…updatedevent is sent only when the record says something new. Several changes of one record in a row may arrive as one event with the latest state. - Events start when a webhook that takes them exists: what happened before is not sent.
- A job marked as spam sends one
job.canceled(stage canceled, status spam) and nothing after it.
24. Delivery
Deliveries follow Standard Webhooks. Each one is a POST with Content-Type: application/json, User-Agent: Nexfield-Webhooks/1 and these headers:
| Field | Type | Meaning |
|---|---|---|
webhook-id | header | The event’s id, the same on every retry: use it to skip an event you already have. |
webhook-timestamp | header | Unix seconds of this try. |
webhook-signature | header | v1, and the base64 HMAC-SHA256 of "<webhook-id>.<webhook-timestamp>.<body>" under the webhook’s secret. Two signatures separated by a space for 24 hours after a rotation. |
- Any 2xx answer within 10 seconds is a delivery, on the first try and on every later one. The body of your answer is not read.
- While a webhook is failing (no accepted delivery since a send failed), its first try of each pass of the sender has 10 seconds and its other tries 3 seconds, and a new event waits for the sender's next pass instead of being sent at once. Answer fast, and do slow work after you answer.
- Anything else is tried again after 1, 5 and 30 minutes, then 2, 5, 10, 14, 20 and 24 hours: three days in all. Each wait is moved by up to a tenth at random. A
Retry-Afterheader of your answer is honored up to an hour. - A 410 answer turns the webhook off at once.
- After a day without one accepted delivery the company’s owner gets an email. After three days the webhook is turned off and the owner gets a second one.
- A delivery that failed is kept for 30 days.
- Deliveries are at least once and in no promised order: skip a
webhook-idyou already have. - Nothing is sent while the account is on hold or not on a paid plan, or while the webhook’s key is suspended.
- At most 1000 deliveries of a company wait to be sent; past that the oldest are dropped.
25. Checking a delivery’s signature
To be sure a delivery comes from Nexfield and was not changed, check its signature before you use it. The Standard Webhooks libraries (JavaScript, Python, PHP, Go, Ruby, Java and others) do it: give them the raw body as it arrived, the three headers and the webhook’s secret as it was given (whsec_…). They also refuse a delivery whose timestamp is more than 5 minutes from your clock.
Node.js
// npm install standardwebhooks
const { Webhook } = require('standardwebhooks');
// body: the raw request body (express.raw({ type: 'application/json' })), not parsed JSON
function eventOf(body, headers, secret) {
return new Webhook(secret).verify(body.toString('utf8'), {
'webhook-id': headers['webhook-id'],
'webhook-timestamp': headers['webhook-timestamp'],
'webhook-signature': headers['webhook-signature'],
}); // the event; throws when the signature or the timestamp is wrong
} PHP
// composer require standard-webhooks/standard-webhooks
$body = file_get_contents('php://input');
try {
$event = (new \StandardWebhooks\Webhook($secret))->verify($body, [
'webhook-id' => $_SERVER['HTTP_WEBHOOK_ID'] ?? '',
'webhook-timestamp' => $_SERVER['HTTP_WEBHOOK_TIMESTAMP'] ?? '',
'webhook-signature' => $_SERVER['HTTP_WEBHOOK_SIGNATURE'] ?? '',
]);
} catch (\Throwable $e) {
http_response_code(401);
exit;
} Without a library
- Read the raw body as it arrived, before any JSON parsing.
- Build the signed text
<webhook-id>.<webhook-timestamp>.<body>: the two header values as sent, then the raw body, joined by dots. - The key is the part of the
secretafterwhsec_, base64-decoded. Compute the HMAC-SHA256 of the signed text with it, as base64, and putv1,before it. - Compare it in constant time with each signature of
webhook-signature(they are separated by spaces). Refuse the delivery when none matches, or when the timestamp is more than 5 minutes from your clock.
$body = file_get_contents('php://input');
$id = $_SERVER['HTTP_WEBHOOK_ID'] ?? '';
$timestamp = $_SERVER['HTTP_WEBHOOK_TIMESTAMP'] ?? '';
$key = base64_decode(substr($secret, strlen('whsec_')));
$expected = 'v1,' . base64_encode(hash_hmac('sha256', $id . '.' . $timestamp . '.' . $body, $key, true));
$matches = false;
foreach (explode(' ', $_SERVER['HTTP_WEBHOOK_SIGNATURE'] ?? '') as $signature) {
$matches = hash_equals($expected, $signature) || $matches;
}
if (!$matches || abs(time() - (int)$timestamp) > 300) {
http_response_code(401);
exit;
}
$event = json_decode($body, true); const crypto = require('node:crypto');
// body: the raw request body as a Buffer (express.raw({ type: 'application/json' }))
function verified(body, headers, secret) {
const timestamp = headers['webhook-timestamp'] ?? '';
const key = Buffer.from(secret.slice('whsec_'.length), 'base64');
const mac = crypto.createHmac('sha256', key).update(`${headers['webhook-id'] ?? ''}.${timestamp}.`).update(body).digest('base64');
const expected = Buffer.from(`v1,${mac}`);
const fresh = Math.abs(Date.now() / 1000 - Number(timestamp)) <= 300;
return fresh && (headers['webhook-signature'] ?? '').split(' ').some((signature) => {
const got = Buffer.from(signature);
return got.length === expected.length && crypto.timingSafeEqual(got, expected);
});
}
26. If a key leaks
Nexfield has an endpoint for GitHub’s secret scanning (POST https://nexfield.pro/api/github/secret-scanning, which takes only requests signed by GitHub) and has applied to GitHub’s secret scanning partner program; it is not a partner yet. A Nexfield key that GitHub reports to that endpoint is revoked at once, with its webhooks, and the company’s owner gets an email that says where the key was found. Until GitHub sends what it finds in public repositories, do not count on it: keep a key where only your server can read it.
If you think a key leaked anywhere, revoke it in Settings → API and create a new one.
27. Changes
Within version 1 changes are only additions (see Versioning), each listed here with its date, and every answer still carries Nexfield-Api-Version: 1.
December 2026
Version 1 is published at https://nexfield.pro/api/v1:
GET /api/v1/me- clients:
GET /api/v1/clients,GET /api/v1/clients/{id},POST /api/v1/clients,PATCH /api/v1/clients/{id} - jobs:
GET /api/v1/jobs,GET /api/v1/jobs/{id},POST /api/v1/jobs(withslot_token, a booking),PATCH /api/v1/jobs/{id},POST /api/v1/jobs/{id}/notes - to read:
GET /api/v1/calls,GET /api/v1/calls/{id},GET /api/v1/technicians,GET /api/v1/technicians/{id},GET /api/v1/estimates,GET /api/v1/estimates/{id},GET /api/v1/invoices,GET /api/v1/invoices/{id},GET /api/v1/payments,GET /api/v1/payments/{id} - online booking:
GET /api/v1/services,GET /api/v1/availability - webhooks:
GET /api/v1/webhooks,POST /api/v1/webhooks,GET /api/v1/webhooks/{id},PATCH /api/v1/webhooks/{id},DELETE /api/v1/webhooks/{id},POST /api/v1/webhooks/{id}/rotate-secret,POST /api/v1/webhooks/{id}/test - events:
client.created,client.updated,job.created,job.updated,job.scheduled,job.started,job.completed,job.canceled,call.finished,estimate.created,estimate.sent,estimate.approved,estimate.declined,invoice.created,invoice.sent,invoice.paid,payment.created,payment.refunded