Getting started
Connect to your FOREMAN tenant over HTTP or from an AI assistant.
The FOREMAN public API lets you work with your tenant's data — your company's isolated FOREMAN workspace — outside the web app: wiring up integrations, exporting to other systems, or (the headline use case) connecting FOREMAN to an AI assistant to ask plain-language questions over your site data.
Everything runs over one tenant-scoped HTTP surface. The same operations are also exposed as MCP tools so an assistant like Claude or ChatGPT can call them directly.
What you can do in v1
Write:
- Create, read, update, and delete Projects (the list returns each project's site managers, who is on site now, diary counts and last activity, and takes
status=archived), Tasks, and Form templates — building form templates over the API (or via an AI assistant) is expected to be the primary way templates get made. - Manage crew — assign and unassign users to projects, and set a site manager (or pass
siteManagerIdswhen you create the project). A project uses the project forms you tick: passformIdsonPOST /v1/projectsorPATCH /v1/projects/{id}(omit it on create for every active project form), andprojectIdsonPOST /v1/form-templatesto say which projects a new project form goes on. - Manage users — create, update, revoke, reinstate, and reset passwords. When you create a user you can make them a site manager of a project in the same call (
siteManagerProjectIds, a subset ofprojectIds). On a paid plan a user beyond the seats already paid for is charged (prorated, discounts applied) in one batched invoice within about 30 minutes; filling an available seat is free. Create, revoke and reinstate returnseatBilling(charge_queued,uses_available_seat,not_billableorunknown). - Log diary entries on behalf of a crew member, and upload documents,
diary photos, and standalone project photos (a photo attached straight to a
project, no diary entry) — register the file, then upload it to the secure link
we return. When attaching a photo you can pass
{ path, originalFilename }in place of a bare path to set the name it downloads as; a bare path still works and downloads under a generated name. Diary hours entered by hand move in 15-minute steps with a 12-hour maximum: senddurationMinutesas a multiple of 15 (0–720, e.g.465= 7h 45m) — preferred — or the legacy decimalhours(0–12, rounded to the nearest minute, in 0.25-hour steps). Entries created by a check-out can hold any whole minute (e.g.518= 8h 38m): exact minutes are the rule for DERIVED hours, not typed ones. Entries read back with both fields:durationMinutes, andhoursderived from it (minutes ÷ 60). - Manage induction templates — a business keeps a few (
/api/v1/induction-templates), each holding the induction text, the declaration visitors sign, and its own documents (upload them with the template'sdocuments/upload-urlanddocumentsendpoints, and organise them with itsfolders). A project uses exactly one template: setinductionTemplateIdwhen you create or edit it, orPATCH /api/v1/projects/{id}/inductionwith{ "templateId": … }. An edit to a template reaches every project using it; people who already signed keep exactly what they signed, because each registration records the template name, text, declaration and document titles. The default template (a new business starts with "Standard induction") can't be deleted, and nor can one a project still uses. A project's induction text and declaration are no longer sent toPATCH /api/v1/projects/{id}/induction: that is a422that points at the template. - Read a project's induction link — the URL visitors scan at the gate. Every
project carries an
inductionUrl, so you can put a site's induction link straight into your own onboarding email, app, or signage without reconstructing it. It isnullfor an archived project, whose link no longer resolves. - Add documents to a form — a form template can carry a Documents block
(
kind: "documents", at most one per form,confirmRead: trueto make people tick "I have read these" before submitting). Its files are the form template's own documents, uploaded with/api/v1/form-templates/{id}/documents/upload-urland…/documents, and grouped by…/folders. A submission answers the block with the ids of the documents it showed, and freezes their titles. - Read and update your business profile — name, website, the timezone
your dates are recorded in, the
geoStampingEnabledtoggle for location stamping, andhoursMode— how crew record their hours:diaryorcheck_in(ADR 0012). New businesses start oncheck_in; older businesses with no stored value read asdiary. - Set your business logo — upload a PNG/JPG/SVG (up to 5 MB) via the same
request-a-link-then-PUT flow as documents;
GET /api/v1/tenantreturns a signedlogoUrlto display it. - Generate document download links and an upgrade Checkout link.
- Organise documents into folders — list and create the folders of a project's OHS or Project Information library (or a template's documents), and file a document into one when you register it. Folders are one level deep and organisational only: putting a document in a folder never changes who can see it.
A project's address is geocoded into coordinates when you create it or change
the address, so give as precise an address as you can. If it can't be geocoded
the project is still created, with null coordinates — nothing fails. A project
also carries a free-text standardHours label (e.g. 07:00–15:00) shown on the
crew's check-in card — display only, never enforced. A diary entry may carry an
optional location reading (latitude, longitude, locationAccuracyM); on read,
each entry exposes a computed siteLocation verdict (on_site / off_site /
missing) against the project's coordinates, or null when the tenant has
location stamping switched off. Entries produced by a check-in/out shift have
no submit-time reading of their own — their siteLocation follows the shift (the
check-out event's verdict when there was one, the check-in's otherwise), and the
shift's own facts ride alongside: checkInAt, checkOutAt, checkInLocation,
checkOutLocation (each null when its event never happened — an auto-closed
shift has no check-out verdict), closedAutomaticallyAt/closedAutomaticallyReason,
and the site's siteTimezone for rendering the times.
Reading a diary closes what should already have closed. Any diary read —
GET /api/v1/diary-entries, the list_diary_entries MCP tool, or a browse in the app —
first closes the expired open shifts its scope reaches (12 hours after check-in, ADR 0012),
so the list you get back is the truth rather than what was last written. An entry the sweep
created carries origin: "auto_closed", createdBy: null, durationMinutes: null and
hours: null — hours missing, which is not the same as 0, and counts as zero in every
total until someone sets them — with closedAutomaticallyReason telling you why: 12h, or
site_archived when the site was archived (that one has real hours, always under 12). An
hourly database job closes the same shifts whether anyone reads or not, so a forgotten shift
cannot wait forever for someone to look at it. Writing never closes a shift: PATCH and
DELETE on these endpoints change only what you send.
Diary entries say who logged what. Every entry carries origin — manual, check_out,
auto_closed, or logged_for — plus createdBy/createdByName (who logged it) beside
userId/crewMemberName (whose hours they are). A create that names a crew member via
userId is a delegation: the entry lands origin: "logged_for" and the app shows
"Logged by [you] for [crew member]" — the same record a Site Manager makes with the For
picker in the app. Rows also carry derived marks: no_check_in, and possible_duplicate
on both entries when two same-day entries for one crew member plausibly cover a single
shift. Neither mark is stored; both are computed at read.
Status, location and readings. In check-in mode each entry also carries a derived
status: checked_out, no_check_out (auto-closed after 12 hours without a check-out) or
manual (typed by hand). readings lists the location readings behind it (when is
check_in, check_out or logged; each has its location verdict, latitude and longitude),
locationTag is the one tag the app shows (off_site wins over no_location; none when
every reading is on site), and locationFacet is what the location filter matches the entry by. Narrow the list
with status (repeatable; ignored in diary mode), location (on_site, off_site,
no_location; repeatable; ignored when location stamping is off) and photos
(with or without), on GET /api/v1/diary-entries and /pdf.
Who is on site right now. GET /api/v1/attendance/on-site (and the
list_on_site_now MCP tool) lists everyone who is checked in at this moment —
name, site, checkInAt, the siteTimezone to read it in, and the
checkInLocation verdict (on_site / off_site / missing, or null when
location stamping is off), and the reading's checkInLatitude / checkInLongitude — oldest check-in first, optionally narrowed with
?projectId=. A diary entry only exists after check-out, so this is the read
that answers "has Sam arrived?". Someone who isn't listed hasn't checked in, or
has already checked out (finished shifts are in the diary entries). A shift
12 hours old counts as closed and is left out. It is read-only: check-in and
check-out happen in the FOREMAN app.
Read (for aggregation): projects, tasks, users, diary entries, project photos (diary + standalone), form submissions, the induction register, who is on site now, and document metadata — the records an assistant reads to answer questions like "how many hours did Jamie log on Hawthorn this fortnight?".
Diary as a PDF: GET /api/v1/diary-entries/pdf takes the same filters as
GET /api/v1/diary-entries and streams one PDF of those entries, grouped project →
day, with descriptions, hours and photos (two per row). It's for sending a site's day
to someone who isn't on FOREMAN. At most 300 entries and 120 photos per PDF; over that,
the call answers 422 with a message naming the limit and the count, so you can add filters.
The induction register, across projects: GET /api/v1/induction-registrations lists every project's register, newest first, each entry carrying its projectId and projectName. Narrow it with projectId (repeatable), from and to (the day signed), role (worker or visitor) and whiteCard (missing or has). The record (GET /api/v1/induction-registrations/{id}) includes what they signed, as it was when they signed: the induction text they read, the documents they were shown (each with an id, title and folder) and blocks, the order the induction showed it in.
An induction as a PDF: GET /api/v1/induction-registrations/{id}/pdf
returns one register record as its signed PDF: the worker's details, the site address
and the declaration as they were when they signed, the signature, and when they signed.
projectId is optional on both. It's the document half of GET /api/v1/induction-registrations/{id}, one PDF per
induction (someone who signed twice has two). The IP address is never included.
Register entries carry userId — the uuid of the FOREMAN account that signed, or
null when the signature came in anonymously at the site's public induction link.
A linked entry settles that site's induction for the account: crew are asked to
sign a site's induction before their first check-in there and never again for
a site they've signed. The register is read-only over the API — signing happens in
the app, at the public induction link or the crew's combined sign-and-check-in tap.
Entries also carry role (worker or visitor) and noWhiteCard. A visitor, such
as an architect or a delivery, is never asked for a White Card, and a worker can say
they don't have one yet. In both cases whiteCardNumber is an empty string, so read
role and noWhiteCard rather than the empty value.
Filling in and submitting forms, and the public visitor-induction flow, stay in the app for now.
Dates and your timezone
FOREMAN separates two kinds of time, and the difference matters when you send dates:
- Calendar dates —
entryDateon a diary entry, and thefrom/tosubmission filters. These are plainyyyy-mm-dddays with no time or zone, and they are interpreted in your business's timezone, not UTC. - Timestamps —
createdAt,submittedAt,doneAt,uploadedAt. These are absolute instants in ISO-8601 UTC.
Your timezone is on GET /api/v1/whoami (and GET /api/v1/tenant). Read it
before sending a calendar date: at 7am in Sydney it is already "tomorrow"
relative to UTC, so a date computed from a UTC clock would be the wrong day — and
a diary entry dated ahead of your business's today is rejected as a future date.
Base URL and versioning
All endpoints live under /api/v1 on your FOREMAN deployment. /v1 is fixed for
this version. We add fields and endpoints without a new prefix and call out
anything that changes what an existing call does, below.
Changes
- Induction text and declaration moved to templates (step 7, November 2026).
PATCH /api/v1/projects/{id}/inductionnow only takes{ "templateId": … }: a body withcontentoracknowledgementreturns422pointing atPATCH /api/v1/induction-templates/{id}, where that text now lives. The MCP toolupdate_inductionwas removed; useupdate_induction_templateto edit the text andset_project_induction_templateto pick a template.
Sign up
You don't need the dashboard to start. A single unauthenticated call creates an active tenant and returns a working API key immediately — no browser, no waiting on a verification email:
curl -X POST https://app.foremanapp.com.au/api/v1/signup \
-H "Content-Type: application/json" \
-d '{"email":"me@example.com","businessName":"Acme Builders"}'
# { "apiKey": "…use it now", "tenantId": "…", "message": "…" }A code-capable AI assistant can do this for you and wire the key straight into its tools — see Connect an AI assistant. We email a link to set a dashboard password and confirm your email, but it gates nothing.
If the email is already registered, you get the same message with an empty
apiKey — we don't reveal whether an account exists, so grab your key from the
dashboard instead. Signup is also rate-limited per IP (429 if you retry too
often).
Next steps
- Authentication — get your tenant API key and send your first request.
- Connect an AI assistant (MCP) — connect Claude, ChatGPT, or another MCP client to your tenant.
- API reference — every endpoint, request, and response, generated from the OpenAPI contract.