Connect your systems
A developer's guide to a product's External API (version 1) and its webhooks: how your website's backend, your CRM or your ERP reads and changes the product's entries, and keeps its own copy up to date.
API reference (OpenAPI 3.1, YAML)
1. Your data, in one sentence
The business owns its data. The product stores and processes the working copy of it, decides its current state, and gives the business API, webhook and export access to all of it. Your systems keep their own copy from the product's events and change the product through the API — never the other way round.
2. Credentials
- The product's owner issues a credential on the product's page, under Connect your systems. It belongs to one product of one organization and reaches nothing else, whatever address it is sent to.
- It is shown once. Only a fingerprint is kept, so it cannot be shown again: if it is lost, the owner rotates it. Rotating or revoking takes effect on the very next request.
- It holds the least it needs, per kind of entry: Read, Create, Change,
Documents, Share links, and the product's own actions one by one. There is no
administrator scope. One more, Put a PDF (
files), is held only where the owner ticks it by name: it puts a PDF into a file field of an entry, such as a CV your website received, and removes the file such a field holds (§9). Another, Assessment detail (detail), is granted by the owner by name too: it reads a timed assessment's questions, answers and criterion scores (§9). No other scope implies either. - A credential's scopes are fixed when it is issued, and every private link belongs to the credential that shared it. To add a scope to a system that already shares links, the owner issues it a second credential for the new work; replacing the first would leave the links it shared out of its reach.
- Keep it on your server. Never in a web page, a browser script, local storage, a mobile app or a URL. Responses carry no CORS headers, a cookie authenticates nothing, and a credential in a URL is refused. If a browser must act on one entry, your server shares a private link (§8) and hands the browser that.
- Do not build an open proxy: your backend calls a fixed set of operations your site needs.
3. Requests
The address is shown, ready to copy, beside the credentials on the product's page:
https://<your FoloForge address>/api/v1/installations/<installation>. Every
request carries the credential:
Authorization: Bearer ffk_<64 hexadecimal characters>
A success is { "data": … }; a list adds "next_cursor" and
"has_more". A failure is { "error": { "code", "message", "request_id", … } }
(§11). Bodies are application/json, at most 128 KB and 16 levels deep, arriving within 15
seconds. The one exception is a PDF put into an entry's file field: its body is the PDF itself (§9).
4. Operations
Paths are relative to /api/v1.
| Method | Path | What it does |
|---|---|---|
| GET | /me | The credential making the request and the installation it reaches. |
| GET | /installations/{installation} | The installation, the released version the credential works against, and what the credential may do. |
| GET | /installations/{installation}/collections | The kinds of entry this credential may use, each with its fields, references and actions. |
| GET | /installations/{installation}/collections/{collection} | One kind of entry's schema. |
| GET | /installations/{installation}/records/{collection} | A page of entries, filtered and sorted by the product's own bounded grammar. |
| POST | /installations/{installation}/records/{collection} | Create an entry. Send an Idempotency-Key. |
| GET | /installations/{installation}/records/{collection}/{id} | One entry, with its revision (ETag). |
| PATCH | /installations/{installation}/records/{collection}/{id} | Change some fields, guarded by the revision you read (If-Match). |
| POST | /installations/{installation}/records/{collection}/{id}/actions/{action} | Perform one of the product's declared actions, guarded by If-Match. |
| GET | /installations/{installation}/records/{collection}/{id}/documents | The documents an entry was made from. |
| GET | /installations/{installation}/records/{collection}/{id}/documents/{digest} | Download one of them — the exact file, checked against its digest. |
| GET | /installations/{installation}/records/{collection}/{id}/files/{field} | Download the file an entry holds in one of its file fields: the exact bytes, checked against the digest the entry carries. |
| PUT | /installations/{installation}/records/{collection}/{id}/files/{field} | Put one PDF into a file field of an entry, replacing the file it held: the PDF's own bytes as the body, with an Idempotency-Key. The answer says whether it holds text (text). Only with Put a PDF (§9). |
| DELETE | /installations/{installation}/records/{collection}/{id}/files/{field} | Remove the file an entry holds in a file field that takes PDF, such as a CV sent by mistake, with an Idempotency-Key. Only with Put a PDF (§9). |
| GET | /installations/{installation}/records/{collection}/{id}/assessment | An entry's timed assessment, where the product declares one: where it stands, its result and its integrity summary. With ?detail=1 and Assessment detail, every question with the answer and each criterion's score. |
| GET | /installations/{installation}/records/{collection}/{id}/links | The private links this credential shared for an entry. |
| POST | /installations/{installation}/records/{collection}/{id}/links | Share an entry through a private link. The token is returned once. |
| PATCH | /installations/{installation}/links/{link} | Move the deadline of a live link this credential shared: expiresAt or expiresInDays. |
| DELETE | /installations/{installation}/links/{link} | Withdraw a link this credential shared. |
5. Reading and paging
curl -s "$FOLOFORGE/installations/$INST/records/positions?filter[status]=open&sort=title&limit=50" \
-H "Authorization: Bearer $FOLOFORGE_TOKEN"
filter[<field>]=<value>on a field the schema marks filterable; repeat it to match any of several values (up to 50).filter[<field>][gte]=<value>andfilter[<field>][lte]=<value>bound a filterable number, money, date or datetime field from below and from above, each bound included and each given at most once:filter[budget][gte]=100000&filter[budget][lte]=500000(minor units),filter[dueOn][gte]=2026-10-01. An entry with no value is in no range. A datetime bound is one moment, written withZor an offset, and is compared with each entry's moment however that one was written; the+of an offset is written%2Bin an address (filter[reviewedAt][gte]=2026-10-01T12:00:00%2B03:00), because a bare+arrives as a space.sort=<field>on a sortable field,order=asc|desc,limitfrom 1 to 200 (default 50).cursoris the previous page'snext_cursor, sealed to that exact query.- Money is a whole number of minor units (
6000000is €60,000.00); a choice is its option id; a reference is an entry id your credential can read. - A field of type
catalogis a choice too: its schema names thecatalogits options come from (skills: every skill of the product's assessment, each id"<domain>.<competency>") and lists them asoptions. A write sends one of those ids; anything else is refused (422). An entry saved before its field was a choice keeps what it holds, and is read back as it is. - A file is a small object that says what the file is, and never its bytes (§9). A file field that holds no file is absent from the entry.
6. Writing safely
curl -s -X POST "$FOLOFORGE/installations/$INST/records/candidates" \
-H "Authorization: Bearer $FOLOFORGE_TOKEN" -H "Content-Type: application/json" \
-H "Idempotency-Key: careers:6f1c2a0e" \
-d '{"data":{"position":"rec-…","fullName":"Dana Lee","email":"dana@example.com"}}'
Idempotency-Keyon every write: the same key with the same request within 24 hours is answered like the first success, and nothing is created twice. Use your own id for the logical action (crm:CRM-1001).If-Matchis required on a change and an action: without it the answer is428; if the entry changed since the revision you read,412 revision_conflict— read it again, decide, and send your change against the new revision.- An entry's state — the field the product's actions move — changes only through those actions. A field the kind of entry does not declare is refused, never silently ignored.
- A file field is never written with an entry's data: a write that names one is refused with
422 validation_failed, whatever it sends for it. A PDF goes into one through its own route (§9).
7. Actions
The product's own actions, with exactly the rules its application enforces. A transition moves a state
along a declared path ("input": {"to": "…"}); a set changes its declared fields; an
AI action proposes the declared fields and uses the organization's AI allowance, like a person pressing
it. A move the current state does not allow is 409 action_refused, and nothing changes.
An upload action takes a file, so it is not performed here: the answer is
422 request_refused. A credential holds an upload in order to give it to a private link it
shares (§8).
8. Private links
POST …/records/{collection}/{id}/links with {"run": true, "expiresInDays": 7, "label":
"Interview"} returns a url to send the person. The token is returned once and stored nowhere;
a retry with the same key answers 409 link_token_not_replayable. A link is never stronger than the
credential that made it, always expires (an exact expiresAt instant, or expiresInDays
1–90, never both; with neither, the organization's own default where it set one, else 14 days — the
installation's invitations says which), and is withdrawn with DELETE
…/links/{link}.
When the installation's served release declares an assessment plan and assessment-plan is enabled,
the create-link response includes assessment inside data, beside the link fields.
GET /installations/{installation} includes the same object under data.assessment,
so your backend can describe the effort before sharing a link. Student Training release 24 includes:
{ "data": {
"assessment": {
"planned": true,
"effort": {
"conversation": true,
"modules": { "most": 3, "minutes": { "min": 8, "max": 25 } },
"behavioral": { "minutes": { "min": 5, "max": 20 } },
"days": 7
}
}
} }
These are the served definition's own estimates: a conversation, professional modules, and a behavioral module.
modules.most is the most professional modules a plan is made with (the definition's
plan.modules.max); the mandatory behavioral module is added after them, outside this count. Minute ranges use the plan estimator's question counts and
times, rounded to whole minutes. days is the time to finish from conversation confirmation.
The whole object is omitted for releases without a plan (including Student Training 22 and Talent Intelligence 9),
when the capability is off, or when any number cannot be derived. Validate it as a whole: planned and
conversation must be true; numbers must be integers, most 1–20, minutes 1–180 with
min no greater than max, and days 1–60. Otherwise keep your existing invitation copy.
An idempotent retry preserves the original assessment at the top level beside error
while the capability is on, even if the served
release changes; it still returns 409 link_token_not_replayable, without the token or PIN.
A deadline is the time a person has to start: a sitting begun before it may be finished after it,
up to 7 days after (the link then reads expired, with continuesUntil set).
PATCH …/links/{link} with one of expiresAt / expiresInDays moves a
live link's deadline; a withdrawn link, or one whose deadline has passed, is never reopened — share a new one.
Add "pin": true to a link that starts the product's session ("run": true) and the
answer also carries pin: six digits, returned once and stored only as a check. Until the PIN is
entered on a device, the link shows only a form that asks for it. Send the PIN to the person separately from the
link. A PIN on a link without "run": true is refused with 400 pin_needs_run.
To let the person send a file, name an upload action your credential holds:
{"capability": "act", "actions": ["<the upload action>"]}. The link's page then offers
the upload, for the entry the link is for and for no other.
9. Documents and files
When the product's AI reads an uploaded file to make an entry, the entry pins it. With Documents on
that kind of entry, GET …/documents/{digest} returns the exact bytes, typed by the format the
product verified. Uploading happens on the product's own page, through a private link — not through the
API.
A product that runs a timed assessment through a private link (one shared with
"run": true) writes its result into the entry the link was made for, as an ordinary change:
your record.updated webhook sees it. GET …/records/{collection}/{id}/assessment,
with Read on that kind of entry, says more: status (not_started,
in_progress, finishing while scores are being made, reported), the
result the platform computed (the score out of 100, the level, the product's recommendation and why, each
competency's percentage), and the integrity summary: a band (low, medium,
high, or review when a strong signal is present) and each signal's sentence. A
signal is something worth a person's look, never a verdict. The candidate's answers and the criterion
scores come only with ?detail=1, and only to a credential the owner granted Assessment
detail (detail) on that kind of entry. Asked without it, the answer is the plain one,
nothing refused, with "detail": "not_granted".
A planned assessment. Where the product plans an assessment in modules (one
for each domain the candidate is assessed in, and a behavioral module every plan carries), the sitting also has
plan, from the moment the plan is made and while the candidate works through it: each module's
kind, category, status, why it is there, its estimate, when it started and completed, how many questions it
asked, its supplemental rounds and what the platform decided after each reflection, and, for a
completed module only, its latest snapshot (each skill's and domain's figures, provisional). A module
that is not completed shows no figure. plan.complete says the required modules done of all
required, the behavioral module's state and whether the plan is whole; plan.finished says how it
ended. Its optional incomplete array copies the stored completion markers, such as
["behavioral"]; it is absent when no array of strings was stored. Its undone array
lists module ids still unfinished, such as ["m3"], including a behavioral module that ended short.
behavioral says what the workplace stories showed, in words
(strong, some, mixed, not_observed) and counts of stories,
never a score or a label of the person, and how the candidate said they prefer to work. A sitting that continues
an earlier one says which (continuation.from). The candidate's own words (the quote a module was
planned from, a reflection, the stories' quotes) come only with ?detail=1 and Assessment
detail; what they said would help them is never given. Every other sitting answers exactly as before.
"plan": { "revision": 3, "active": null, "finished": null,
"complete": { "required": [1, 1], "behavioral": "pending", "full": false },
"modules": [ { "id": "m1", "kind": "professional", "label": "Backend Development", "category": "required",
"status": "completed", "why": { "code": "applied" }, "asked": 11, "rounds": [ { "n": 1, "asked": 3 } ],
"reflections": [ { "n": 1, "outcome": "supplemental" } ], "snapshot": { "why": "round", "skills": [ … ] } } ] },
"behavioral": { "dimensions": null, "aspects": null,
"preferences": { "arrangement": "hybrid", "availability": "From December", "overlap": "Four hours",
"remote": "some", "onsite": "extensive", "tools": "Slack, Jira" } }
A product can also keep a file on an entry itself, in a field whose type is file: a
proof, a signed form, a photo. Reading the entry returns that field as what the file is, and never its
bytes:
"artwork": { "filename": "cards.pdf", "format": "pdf", "bytes": 48213,
"sha256": "<64 hexadecimal characters>", "uploadedAt": "…", "uploadedBy": "link:…" }
- With Read on that kind of entry,
GET …/records/{collection}/{id}/files/{field}returns the exact bytes as a download, typed by the format the product verified when the file arrived.X-File-SHA256is the digest of what is sent, the one the entry carries. 404means the field holds no file, or is not a file field.410 gonemeans the bytes that are kept are missing, or are not what was uploaded: they are not sent.- The API takes no file. A write that names a file field is refused, and so is an upload action. People upload on the product's own pages: your team on the entry's page, and someone outside through a private link that carries the upload (§8). There is one exception, below: a PDF put by a credential that holds Put a PDF.
- A file is one of PDF, PNG or JPG, of at most 8 MB, and a field may take fewer formats or less: the
schema gives each file field's
formatsandmaxBytes. - Files are kept exactly as they arrive. None is checked for viruses: treat a downloaded file as you would any file from a stranger.
A PDF your own system received — such as the CV an applicant sent with their
application on your website — goes into a file field of the entry, so that nobody uploads it twice. The owner
grants it on purpose: Put a PDF (files) on that kind of entry, which needs Read on
it too and is never part of any other scope.
curl -s -X PUT "$FOLOFORGE/installations/$INST/records/candidates/$ID/files/cv" \
-H "Authorization: Bearer $FOLOFORGE_TOKEN" -H "Content-Type: application/pdf" \
-H "Idempotency-Key: careers:cv:6f1c2a0e" \
--data-binary @cv.pdf
{ "data": { "field": "cv", "size": 48213, "sha256": "<64 hexadecimal characters>", "replaced": false, "text": true } }
- The body is the PDF itself, sent as
application/pdf, at most 5 MB (or the field'smaxByteswhere it is lower). A body that says, or turns out, to be larger is refused before it is kept:413. - An
Idempotency-Keyis required (400 idempotency_key_requiredwithout one). The same key with the same bytes is answered like the first success and stores nothing again; the same key with other bytes is409 idempotency_conflict. A key is remembered for 24 hours: use one per file's bytes and per attempt to send them (for example<entry>-cv-<sha256 prefix>-<attempt>), the same key for the retries of one attempt. textsays whether the CV reader finds text in it:truefor a PDF of text,falsefor a scan or an image saved as a PDF, which is stored all the same. It never carries the text. An assessment that reads the entry's CV tells the applicant it is already there only where this istrue.- The field must be a file field that takes PDF (
422 validation_failedotherwise), and the bytes must be a whole PDF that can be read: one that is not a PDF, is cut short, damaged or password-protected is422 not_a_pdf. - Without Put a PDF on that kind of entry:
403 scope_missing, before any entry is looked at. An entry of another installation, or none:404. If-Matchis optional: sent, a stale revision is412; absent, the PDF takes the field's place whatever else changed.- The file replaces the one the field held (
"replaced": true); the entry's history keeps the change. The entry's ordinaryrecord.updatedwebhook follows, with ids only: nothing carries the file or its text. The product's audit log records which credential put it there, the field, the format, the size and the digest, never a name.
Removing it — a CV sent by mistake — is the same route with
DELETE, the same scope and a required Idempotency-Key, and no body:
curl -s -X DELETE "$FOLOFORGE/installations/$INST/records/candidates/$ID/files/cv" \
-H "Authorization: Bearer $FOLOFORGE_TOKEN" -H "Idempotency-Key: careers:cv-remove:6f1c2a0e"
{ "data": { "field": "cv", "removed": true, "size": 48213, "sha256": "<64 hexadecimal characters>" } }
- A field that holds no file, or an entry of another installation, is
404; without Put a PDF,403 scope_missing; a staleIf-Match,412. The same key replays the answer and removes nothing again. - The entry's
record.updatedwebhook follows ("file": "removed", ids only), and the audit log records which credential removed it, never a name. - An assessment that already read the CV keeps the text it took, with the contact details removed: removing the file does not unread it.
A CV your website hands to an assessment: create the entry, put the CV, then share the link, in that order. The CV is read once, when the applicant's conversation is first read (after their introduction), if the entry holds it then. Give Put a PDF to a second credential that holds Read and Put a PDF only, and keep the first for entries and links. Before an applicant sends a CV you pass on, tell them it goes to the assessment, where its text, without their contact details, is read by an AI model, and that they can remove it at the start: that is your organization's duty.
10. Webhooks — keeping your copy in step
The owner adds your address under Connect your systems and copies its signing secret, shown once. Each change to an entry is sent, signed, at least once:
{ "id": "dl-4b1e…", "event": { "id": "ev-…", "type": "record.updated", "at": "…",
"resource": { "collection": "opportunities", "id": "rec-…" },
"changes": { "stage": { "from": "sent", "to": "approved" } } } }
- Verify the
x-foloforge-signature: t=<unix seconds>,v1=<hex>header, wherev1 = HMAC-SHA256(secret, "<t>.<raw body>"). Compare in constant time and refuse atmore than five minutes old. - Deduplicate on the body's
id— the same on every retry of one delivery. - An event is a signal, not the state. Read the entry through the API and apply it only if its revision is newer than yours: events can arrive late or out of order, and a later read may already show a newer state.
- Ignore your own echo (an event your credential caused names it), or a two-way sync loops.
A planned assessment (§9) has two events of its own, sent only to an address registered
with them named in its list of events (ask the platform's operator: the form under Connect your
systems adds an address for entry changes only). An address registered without naming them keeps
receiving entry changes only.
assessment.module_completed when a module of the candidate's plan completes, and
assessment.plan_finished when the plan ends. They carry ids, the module's kind and category, and the
plan's completeness: never a score, a quote, a reflection or a preference. Read the assessment through the API
for the rest.
{ "id": "dl-9c2e…", "event": { "id": "ev-1f0e…", "type": "assessment.module_completed", "at": "…",
"namespace": "inst-…", "record": { "collection": "candidates", "id": "rec-…" }, "sitting": "4387…",
"module": { "id": "m1", "kind": "professional", "category": "required" } } }
{ "id": "dl-77a1…", "event": { "id": "ev-0b3d…", "type": "assessment.plan_finished", "at": "…",
"namespace": "inst-…", "record": { "collection": "candidates", "id": "rec-…" }, "sitting": "4387…",
"complete": { "required": [1, 1], "behavioral": "completed", "full": true } } }
import { createHmac, timingSafeEqual } from "node:crypto";
export function verify(secret, rawBody, header) {
const m = String(header || "").match(/^t=(\d+),v1=([a-f0-9]{64})$/);
if (!m || Math.abs(Date.now() / 1000 - Number(m[1])) > 300) return false;
const want = Buffer.from(`t=${m[1]},v1=${createHmac("sha256", secret).update(`${m[1]}.${rawBody}`).digest("hex")}`);
const got = Buffer.from(String(header));
return want.length === got.length && timingSafeEqual(want, got);
}
11. Errors
| HTTP | code | Meaning |
|---|---|---|
| 400 | invalid_request | A key the operation does not take, a body that is not an object, or an If-Match that is not a revision. |
| 400 | invalid_json | The body is not valid JSON. |
| 400 | invalid_query | A list parameter outside the bounded grammar. |
| 400 | invalid_cursor | A cursor that was forged, or minted for a different query. |
| 400 | invalid_idempotency_key | Not 1–255 visible ASCII characters. |
| 400 | idempotency_key_required | A PDF put, or a file removal, without an Idempotency-Key (§9). |
| 400 | credential_in_url | A credential in the URL. |
| 400 | pin_needs_run | A PIN asked for on a link that does not start the product's session (§8). |
| 401 | unauthorized | No valid credential — missing, unknown, revoked, expired or rotated (never said which). |
| 403 | scope_exceeded | A link stronger than the credential that would make it. |
| 403 | scope_missing | A PDF put or a file removal by a credential without Put a PDF on that kind of entry (§9). |
| 404 | not_found | Absent, another installation's, or outside your scopes — the same answer for all three. |
| 405 | method_not_allowed | See Allow. |
| 408 | request_timeout | The body did not arrive within 15 seconds (a PDF: within 120 seconds, and never 30 seconds without a byte). |
| 409 | action_refused | The action is not possible from the entry's current state. |
| 409 | not_available | The product is switched off, so a link would not open. |
| 409 | not_shareable | The product has no screen that could show this entry through a link. |
| 409 | link_token_not_replayable | A retried link (§8). |
| 409 | link_not_active | A deadline asked of a link that was withdrawn: it never opens again. Share a new one (§8). |
| 409 | link_expired | A deadline asked of a link whose deadline has passed. Share a new one to give the person more time (§8). |
| 409 | idempotency_conflict | The key already put other bytes into this field; a new file takes a new key (§9). |
| 410 | gone | A document no longer kept, or an entry's file whose kept bytes are missing or are not what was uploaded. |
| 412 | revision_conflict | The entry changed since your If-Match; see current_revision. |
| 413 | payload_too_large | Over 128 KB, an entry over 64 KB, or a PDF over 5 MB or over what its field takes. |
| 415 | unsupported_media_type | Not application/json (a PDF put: not application/pdf). |
| 422 | validation_failed | Does not fit the schema; fields lists each problem. |
| 422 | idempotency_key_reused | The key was used for a different request. |
| 422 | not_a_pdf | A PDF put whose body is not a whole PDF that can be read; nothing was stored (§9). |
| 422 | request_refused | Refused for the reason the message gives. |
| 428 | precondition_required | A change or an action without If-Match. |
| 429 | rate_limited | Wait for Retry-After seconds. |
| 500 | internal_error | The product's failure; quote request_id. |
| 502 | ai_failed | The AI did not produce usable values for this entry; nothing changed. |
| 503 | unavailable | Try again shortly; nothing changed. |
| 503 | ai_unavailable | The AI cannot be reached right now; nothing changed. |
12. Limits
Per credential: 600 reads and 120 writes a minute, 30 link shares, 60 document downloads and 60 downloads of
entries' files, and 20 PDFs put into or removed from entries (two arriving at once). Per product, every
credential together: 3,000 requests a minute. Requests without a valid credential, per address: 30 every ten
minutes. A 429 says when to try again.
13. What version 1 does not do
- Delete an entry — removal will arrive as an action the product declares, not as a raw delete.
- Upload a document — people upload on the product's own page, through a private link.
- Upload, replace or remove an entry's file, other than a PDF put, or removed, by a credential that holds Put a PDF (§9). People do that on the product's own pages, and someone outside through a private link that carries the upload.
- Run arbitrary queries — no SQL, no join, no full-text search, no aggregate.
- Use your own database as the live store — keep a mirror instead (§10).
14. Security checklist
- The credential is in your server's secret store, never in a browser, an app, a repository or a URL.
- It holds the least it needs; one credential per system, so revoking one affects one.
- Your backend calls a fixed set of operations: it is not a proxy.
- Every write carries an Idempotency-Key from your own logical id; every change carries If-Match.
- Webhooks are verified, deduplicated on their id, and applied by revision; your own echo is ignored.
- A browser that must act on one entry gets a private link from your server, never the credential.