Mind the Front Docs Examples For AI agents llms.txt

HTTP API

Public endpoints the widget calls, owner endpoints your tooling calls. Full contract: /openapi.json.

ContourPrefixHostAuth
Public/api/public/*apexnone; CORS open
Owner/api/*consolesession cookie, or X-Owner-Token

Owner operations are scoped to the business behind the credential. Another owner's resource returns 404.

Credentials

CredentialObtained fromScopeRevocation
publishableKeyconsoleidentifies a business; authorises nothing—
X-Owner-Tokenconsole, on requestevery owner operation for one businessissue a new one; the previous stops working at once
X-Visitor-TokenPOST /api/public/conversationsone visitor's request and its status—

Issuing a new owner token leaves the publishable key and the published config unchanged.

Rate limits

ScopeLimitApplies to
public reads, per IP60/minconfig, status, slots, showcase
public writes, per IP10/minconversations, requests, validation
generation, per business10/hourPOST /configs/generate

Over the limit: 429 with {"status":429,"detail":"Too many requests"}.

Errors

StatusMeaning
400a required header, parameter or field is missing or fails its constraints
401no session and no owner token
402the business has reached its plan limit: the widget does not show, the request is not taken, or the plan's generations are used up — GET /api/businesses/{id}/plan says which
404absent, or not yours — the two are not distinguished
409a conflict: the email is taken, the chosen time was taken meanwhile, the config is already published
413body over 64 KB
422validation rejected the document or the values; the body names the rule
429rate limit
503an optional integration is not configured (generation without an API key, calendar without OAuth credentials, password reset without email)

Body: application/problem+json with status and detail; errors on 422, field on 409.

Caching

GET /api/public/configs/{key} is ETagged and publicly cacheable; publishing invalidates it. GET /api/public/availability is no-store. GET /api/public/showcase is no-cache.

Public endpoints

MethodPathWhat it doesAuth
GET/api/public/configs/{publishableKey}Fetch the published config for a businessnone
POST/api/public/conversationsStart a visitor conversationnone
POST/api/public/submissionsSubmit a requestnone
GET/api/public/submissions/latestRead the visitor's latest requestX-Visitor-Token
GET/api/public/availabilityList free slots for an appointment fieldnone
GET/api/public/showcaseList the examples shown on the sitenone
POST/api/public/configs/validateValidate a config without storing itnone
GET/api/public/config-schemaFetch the canonical config JSON Schemanone

GET /api/public/configs/{publishableKey}

What the widget loads on mount. ETagged and publicly cacheable; publishing a new version invalidates it at once.

ParameterInRequiredDescription
publishableKeypathyesPublic key of the business, shown in the console.
If-None-MatchheadernoConditional request; a matching ETag returns 304.

Response: A process config. Its schema is served at GET /api/public/config-schema.

StatusMeaning
200The published config document.
304Not modified.
402The widget is unavailable: the business has reached its plan limit (GET /api/businesses/{businessId}/plan says which). The widget does not mount.
404No such key, or the business has never published.
429Per-IP read limit exceeded: 60 requests per minute by default.
curl https://mindthefront.com/api/public/configs/pk_live_8f21

POST /api/public/conversations

Issues the visitor token that ties a dialogue to a business.

BodyTypeRequired
publishableKeystringyes
ResponseTypeRequired
visitorTokenstringyes
StatusMeaning
201{ "visitorToken": "..." }
400A required header, parameter or field is missing or fails its constraints.
404Unknown publishable key.
429Per-IP write limit exceeded: 10 requests per minute by default.

POST /api/public/submissions

Values are validated against the schema of the published config.

BodyTypeRequired
visitorTokenstringyes
fieldsobjectyes
ResponseTypeRequired
idstring (uuid)yes
statusone of new, confirmed, rejectedyes
fieldsobjectyes
createdAtstring (date-time)yes
updatedAtstring (date-time) or nullyes
erasedAtstring (date-time) or nullyes
StatusMeaning
201The stored request with its status.
400A required header, parameter or field is missing or fails its constraints.
402The business has reached its plan limit, including the allowance for conversations started before it; the request is not stored.
404Unknown visitor token.
409The chosen time has just been taken; field names the appointment field.
422Values do not satisfy the published schema.
429Per-IP write limit exceeded: 10 requests per minute by default.

GET /api/public/submissions/latest

The visitor's latest request and its status. The token goes in a header, not in the query string.

ResponseTypeRequired
idstring (uuid)yes
statusone of new, confirmed, rejectedyes
fieldsobjectyes
createdAtstring (date-time)yes
updatedAtstring (date-time) or nullyes
erasedAtstring (date-time) or nullyes
StatusMeaning
200The request with its current status.
400A required header, parameter or field is missing or fails its constraints.
404No request for this token.
429Per-IP read limit exceeded: 60 requests per minute by default.

GET /api/public/availability

The declared schedule minus the owner's calendar, over a 14-day horizon. sourceUnavailable: true means the grid was built from the schedule alone and some of it may already be taken.

ParameterInRequiredDescription
publishableKeyqueryyesBusiness key.
fieldqueryyesName of a format: date-time field in the published config. Anything else returns 404.
ResponseTypeRequired
slotsarray of string (date-time)yes
timeZonestring or nullyes
durationMinutesintegeryes
sourceUnavailablebooleanyes
StatusMeaning
200slots, timeZone, durationMinutes, sourceUnavailable.
400A required header, parameter or field is missing or fails its constraints.
404Unknown key, or a field that is not an appointment field.
429Per-IP read limit exceeded: 60 requests per minute by default.

GET /api/public/showcase

Publishable key, business name and the description each example was generated from.

Response, array of objectsTypeRequired
publishableKeystringyes
businessNamestringyes
promptstringyes
StatusMeaning
200Examples in display order; an empty list when the showcase is empty.
429Per-IP read limit exceeded: 60 requests per minute by default.

POST /api/public/configs/validate

Runs the checks a save runs: JSON Schema first, then flow-lint. Nothing is stored and no key is needed. Status is 200 whether or not the document is valid. Each error carries path, message and rule (schema or flow-lint).

Body: A process config. Its schema is served at GET /api/public/config-schema.

ResponseTypeRequired
validbooleanyes
errorsarray of object: path, message, ruleyes
StatusMeaning
200{ "valid": true, "errors": [] }, or valid: false with one entry per problem.
400The body is not JSON, or a required parameter is missing.
413Body over 64 KB.
429Per-IP write limit exceeded: 10 requests per minute by default.
curl -X POST https://mindthefront.com/api/public/configs/validate \
  -H 'Content-Type: application/json' --data @config.json

GET /api/public/config-schema

The exact file the server validates against, not a copy of it. ETagged and publicly cacheable.

ParameterInRequiredDescription
If-None-MatchheadernoConditional request; a matching ETag returns 304.

Response: A JSON Schema 2020-12 document.

StatusMeaning
200JSON Schema 2020-12 document.
304Not modified.
curl https://mindthefront.com/api/public/config-schema

Account and session

MethodPathWhat it doesAuth
POST/api/auth/registerStart creating an owner accountnone
POST/api/auth/register/confirmConfirm the email and create the accountnone
POST/api/auth/loginSign innone
POST/api/auth/logoutSign outowner session only
GET/api/auth/meRead the signed-in accountowner session only
DELETE/api/auth/accountDelete the accountowner session only
POST/api/auth/password-resetRequest a password resetnone
POST/api/auth/password-reset/confirmSet a new passwordnone

POST /api/auth/register

Sends a confirmation link to the email; the account and its first business are created when the link is confirmed (confirmRegistration). A server without email configured creates the account at once and answers 201.

BodyTypeRequired
emailstring (email)yes
passwordstringyes
businessNamestringyes
agentbooleanno
ResponseTypeRequired
accountIdstring (uuid)yes
emailstringyes
businessobject: id, name, publishableKey, telegramChatIdyes
StatusMeaning
201Email is not configured on this server: the account and its business summary; sets the session cookie.
202The confirmation link is on its way. No account exists until it is confirmed.
400A required header, parameter or field is missing or fails its constraints.
409An account with this email already exists; field is email. No email is sent.
429Registration limit exceeded: 8 per minute per IP or 3 per hour per email by default.

POST /api/auth/register/confirm

Takes the token from the confirmation link (the part after #verify=). Creates the account and its first business and signs this client in.

BodyTypeRequired
tokenstringyes
ResponseTypeRequired
accountIdstring (uuid)yes
emailstringyes
businessobject: id, name, publishableKey, telegramChatIdyes
StatusMeaning
201The account and its business summary; sets the session cookie.
400The link is invalid, used or expired.
409An account with this email already exists; field is email.
429Login limit exceeded: 8 per minute per IP by default.

POST /api/auth/login

Sets the session cookie.

BodyTypeRequired
emailstring (email)yes
passwordstringyes
ResponseTypeRequired
accountIdstring (uuid)yes
emailstringyes
businessobject: id, name, publishableKey, telegramChatIdyes
StatusMeaning
200The account and its business summary; sets the session cookie.
400A required header, parameter or field is missing or fails its constraints.
401Wrong email or password.
429Login limit exceeded: 8 per minute per IP or 5 per hour per email by default.

POST /api/auth/logout

Invalidates the session and clears the cookie.

StatusMeaning
204Signed out.
401No owner session.

GET /api/auth/me

Account id, email and the business summary, including its publishable key. Session only; with a machine token use GET /api/businesses/current.

ResponseTypeRequired
accountIdstring (uuid)yes
emailstringyes
businessobject: id, name, publishableKey, telegramChatIdyes
StatusMeaning
200Account and business summary.
401No owner session.

DELETE /api/auth/account

Deletes the account at once with its business, configs, conversations, requests and calendar connection; Google access to the calendar is revoked first. The machine token stops working and the widget stops showing. Only a signed-in owner can do it: the machine token cannot.

BodyTypeRequired
emailstringyes
StatusMeaning
204Deleted; clears the session cookie.
400The email does not match the account, or the body fails its constraints.
401No owner session. The machine token is not accepted here.

POST /api/auth/password-reset

If an account uses this email, a link to set a new password is sent to it. The response is the same whether or not the account exists. The link works once, for 30 minutes.

BodyTypeRequired
emailstring (email)yes
StatusMeaning
202Accepted. Sent or not, the response does not say.
400A required header, parameter or field is missing or fails its constraints.
429Reset limit exceeded: 5 per minute per IP or 3 per hour per email by default.
503Email is not configured on this server.

POST /api/auth/password-reset/confirm

Takes the token from the reset link (the part after #reset=). Sets the password, signs out every other session of the account and signs this client in. The machine token does not change.

BodyTypeRequired
tokenstringyes
passwordstringyes
ResponseTypeRequired
accountIdstring (uuid)yes
emailstringyes
businessobject: id, name, publishableKey, telegramChatIdyes
StatusMeaning
200The account and its business summary; sets the session cookie.
400The password fails its constraints, or the link is invalid, used or expired.
429Login limit exceeded: 8 per minute per IP by default.

Owner endpoints

MethodPathWhat it doesAuth
POST/api/businesses/{businessId}/configsCreate a draft configX-Owner-Token or owner session
POST/api/businesses/{businessId}/configs/generateGenerate a draft from a descriptionX-Owner-Token or owner session
POST/api/businesses/{businessId}/configs/draftGet the editable draftX-Owner-Token or owner session
GET/api/configs/{configId}Read a configX-Owner-Token or owner session
PUT/api/configs/{configId}Replace a draft's documentX-Owner-Token or owner session
POST/api/configs/{configId}/publishPublish a draftX-Owner-Token or owner session
POST/api/businesses/{businessId}/availability-previewPreview free slots for an unsaved configX-Owner-Token or owner session
GET/api/businesses/{businessId}/submissionsList the requests of a businessX-Owner-Token or owner session
PATCH/api/submissions/{submissionId}/statusConfirm or decline a requestX-Owner-Token or owner session
PUT/api/businesses/{businessId}/telegramSet the Telegram chat for notificationsX-Owner-Token or owner session
GET/api/businesses/currentIdentify the business behind a credentialX-Owner-Token or owner session
GET/api/businesses/{businessId}/planPlan and usage of a businessX-Owner-Token or owner session
GET/api/businesses/{businessId}/owner-tokenReveal the machine tokenowner session only
POST/api/businesses/{businessId}/owner-token/rotateIssue a new machine tokenowner session only

POST /api/businesses/{businessId}/configs

Always creates a new draft with the next version; earlier drafts stay. Validated before it is stored; an invalid document is rejected with 422.

ParameterInRequiredDescription
businessIdpathyesYour business id.

Body: A process config. Its schema is served at GET /api/public/config-schema.

ResponseTypeRequired
idstring (uuid)yes
businessIdstring (uuid)yes
versionintegeryes
statusone of draft, publishedyes
configobjectyes
createdAtstring (date-time)yes
updatedAtstring (date-time) or nullyes
StatusMeaning
201The stored draft: id, version, config, status.
400The body is not JSON, or a required parameter is missing.
401No session and no owner token, or an unknown token.
404Absent, or not yours.
422The config fails the schema or flow-lint; errors lists each failure with path, message and rule.
curl -X POST https://console.mindthefront.com/api/businesses/$BUSINESS/configs \
  -H "X-Owner-Token: $TOKEN" -H 'Content-Type: application/json' --data @config.json

POST /api/businesses/{businessId}/configs/generate

The model assembles a config, the server stamps the time zone onto appointment fields, validates and re-prompts on errors up to the attempt limit. Without timeZone the connected calendar's zone is used; with neither the answer is 422.

ParameterInRequiredDescription
businessIdpathyesYour business id.
BodyTypeRequired
descriptionstringyes
timeZonestringno
ResponseTypeRequired
idstring (uuid)yes
businessIdstring (uuid)yes
versionintegeryes
statusone of draft, publishedyes
configobjectyes
createdAtstring (date-time)yes
updatedAtstring (date-time) or nullyes
StatusMeaning
201The stored draft.
400The body is not JSON, or a required parameter is missing.
401No session and no owner token, or an unknown token.
402Config generations of the plan are used up. Write the config yourself and save it with createDraft: that spends no generations.
404Absent, or not yours.
422No valid config after the attempt limit, or an appointment field with no time zone to take.
429Generation limit for this business exceeded: 10 per hour by default.
503Generation is not configured on this deployment.

POST /api/businesses/{businessId}/configs/draft

Returns the existing draft, or forks the published config into a new one. 404 when the business has neither.

ParameterInRequiredDescription
businessIdpathyesYour business id.
ResponseTypeRequired
idstring (uuid)yes
businessIdstring (uuid)yes
versionintegeryes
statusone of draft, publishedyes
configobjectyes
createdAtstring (date-time)yes
updatedAtstring (date-time) or nullyes
StatusMeaning
200The draft to edit.
401No session and no owner token, or an unknown token.
404Neither a draft nor a published config.

GET /api/configs/{configId}

Any config of your business, draft or published.

ParameterInRequiredDescription
configIdpathyesConfig id.
ResponseTypeRequired
idstring (uuid)yes
businessIdstring (uuid)yes
versionintegeryes
statusone of draft, publishedyes
configobjectyes
createdAtstring (date-time)yes
updatedAtstring (date-time) or nullyes
StatusMeaning
200The config.
401No session and no owner token, or an unknown token.
404Not yours, or absent.

PUT /api/configs/{configId}

Validated before it is stored, exactly as on creation. Published configs are not editable in place.

ParameterInRequiredDescription
configIdpathyesDraft id.

Body: A process config. Its schema is served at GET /api/public/config-schema.

ResponseTypeRequired
idstring (uuid)yes
businessIdstring (uuid)yes
versionintegeryes
statusone of draft, publishedyes
configobjectyes
createdAtstring (date-time)yes
updatedAtstring (date-time) or nullyes
StatusMeaning
200The updated draft.
400The body is not JSON, or a required parameter is missing.
401No session and no owner token, or an unknown token.
404Not yours, or absent.
409A published config cannot be edited; create a new draft.
422The config fails the schema or flow-lint; errors lists each failure with path, message and rule.

POST /api/configs/{configId}/publish

Makes the draft the config served to every widget with this business's key and invalidates the cached copy.

ParameterInRequiredDescription
configIdpathyesDraft id.
ResponseTypeRequired
idstring (uuid)yes
businessIdstring (uuid)yes
versionintegeryes
statusone of draft, publishedyes
configobjectyes
createdAtstring (date-time)yes
updatedAtstring (date-time) or nullyes
StatusMeaning
200The config, now published.
401No session and no owner token, or an unknown token.
404Not yours, or absent.
curl -X POST https://console.mindthefront.com/api/configs/$CONFIG/publish -H "X-Owner-Token: $TOKEN"

POST /api/businesses/{businessId}/availability-preview

Slots for a config sent in the body, before it is saved. Same engine and same calendar as the public endpoint.

ParameterInRequiredDescription
businessIdpathyesYour business id.
fieldqueryyesName of the appointment field in the submitted config.

Body: A process config. Its schema is served at GET /api/public/config-schema.

ResponseTypeRequired
slotsarray of string (date-time)yes
timeZonestring or nullyes
durationMinutesintegeryes
sourceUnavailablebooleanyes
StatusMeaning
200slots, timeZone, durationMinutes, sourceUnavailable.
400The body is not JSON, or a required parameter is missing.
401No session and no owner token, or an unknown token.
404No such field in the submitted config.

GET /api/businesses/{businessId}/submissions

Newest first, with values and statuses.

ParameterInRequiredDescription
businessIdpathyesYour business id.
Response, array of objectsTypeRequired
idstring (uuid)yes
statusone of new, confirmed, rejectedyes
fieldsobjectyes
createdAtstring (date-time)yes
updatedAtstring (date-time) or nullyes
erasedAtstring (date-time) or nullyes
StatusMeaning
200The requests.
401No session and no owner token, or an unknown token.
404Absent, or not yours.

PATCH /api/submissions/{submissionId}/status

The visitor sees the new status on the page they came back to.

ParameterInRequiredDescription
submissionIdpathyesRequest id.
BodyTypeRequired
statusone of new, confirmed, rejectedyes
ResponseTypeRequired
idstring (uuid)yes
statusone of new, confirmed, rejectedyes
fieldsobjectyes
createdAtstring (date-time)yes
updatedAtstring (date-time) or nullyes
erasedAtstring (date-time) or nullyes
StatusMeaning
200The request with its new status.
400A required header, parameter or field is missing or fails its constraints.
401No session and no owner token, or an unknown token.
404Not yours, or absent.
422Unknown status.

PUT /api/businesses/{businessId}/telegram

chatId: null stops notifications. The notification chat lives here, not in the config's integrations.

ParameterInRequiredDescription
businessIdpathyesYour business id.
BodyTypeRequired
chatIdstring or nullno
ResponseTypeRequired
idstring (uuid)yes
namestringyes
publishableKeystringyes
telegramChatIdstring or nullyes
StatusMeaning
200The business summary.
400A required header, parameter or field is missing or fails its constraints.
401No session and no owner token, or an unknown token.
404Absent, or not yours.

GET /api/businesses/current

What the machine token manages: business id, name and publishable key. The response carries no token and no account credentials.

ResponseTypeRequired
idstring (uuid)yes
namestringyes
publishableKeystringyes
telegramChatIdstring or nullyes
StatusMeaning
200Business id, name and publishable key.
401No session and no owner token, or an unknown token.
curl https://console.mindthefront.com/api/businesses/current -H "X-Owner-Token: $TOKEN"

GET /api/businesses/{businessId}/plan

The plan in force, its dates, usage in the current windows against the limits, prepaid requests and whether the widget shows — with the reason when it does not.

ParameterInRequiredDescription
businessIdpathyesYour business id.
ResponseTypeRequired
planone of free, basic, premium, internalyes
trialbooleanyes
assignedPlanone of free, basic, premium, internalyes
paidUntilstring (date-time) or nullyes
trialEndsAtstring (date-time) or nullyes
submissionsobject: used, limit, windowyes
packBalanceintegeryes
generationsobject: used, limit, windowyes
widgetobject: available, reasonyes
StatusMeaning
200The plan and usage.
401No session and no owner token, or an unknown token.
404Absent, or not yours.

GET /api/businesses/{businessId}/owner-token

Session only; a request authenticated with the token itself gets 401.

ParameterInRequiredDescription
businessIdpathyesYour business id.
ResponseTypeRequired
ownerTokenstringyes
StatusMeaning
200{ "ownerToken": "ot_..." }
401No owner session.
404Not your business.

POST /api/businesses/{businessId}/owner-token/rotate

The previous token stops working immediately. The publishable key and the published config are unchanged.

ParameterInRequiredDescription
businessIdpathyesYour business id.
ResponseTypeRequired
ownerTokenstringyes
StatusMeaning
200{ "ownerToken": "ot_..." } — the new token.
401No owner session.
404Not your business.

Calendar

Connecting a calendar needs a browser once: OAuth consent cannot be automated. Everything after that is machine-callable.

MethodPathWhat it doesAuth
GET/api/businesses/{businessId}/calendarRead the calendar connectionX-Owner-Token or owner session
POST/api/businesses/{businessId}/calendar/authorizeStart connecting a calendarX-Owner-Token or owner session
GET/api/businesses/{businessId}/calendar/calendarsList the calendars of the connected accountX-Owner-Token or owner session
POST/api/businesses/{businessId}/calendar/calendarChoose the calendar to read busy time fromX-Owner-Token or owner session
POST/api/businesses/{businessId}/calendar/disconnectDisconnect the calendarX-Owner-Token or owner session

GET /api/businesses/{businessId}/calendar

Whether a calendar is connected, which one, its time zone, and whether the connection needs re-authorising.

ParameterInRequiredDescription
businessIdpathyesYour business id.
ResponseTypeRequired
configuredbooleanyes
connectedbooleanyes
statusstring or nullyes
calendarIdstring or nullyes
calendarSummarystring or nullyes
timeZonestring or nullyes
StatusMeaning
200Connection state.
401No session and no owner token, or an unknown token.
404Absent, or not yours.

POST /api/businesses/{businessId}/calendar/authorize

Returns the consent URL; a person opens it in a browser.

ParameterInRequiredDescription
businessIdpathyesYour business id.
ResponseTypeRequired
authorizationUrlstring (uri)yes
StatusMeaning
200{ "authorizationUrl": "..." }
401No session and no owner token, or an unknown token.
404Absent, or not yours.
503Calendar integration is not configured on this deployment.

GET /api/businesses/{businessId}/calendar/calendars

What the owner picks from after consent.

ParameterInRequiredDescription
businessIdpathyesYour business id.
Response, array of objectsTypeRequired
idstringyes
summarystringyes
timeZonestring or nullyes
primarybooleanyes
StatusMeaning
200Calendars with ids, names and time zones.
401No session and no owner token, or an unknown token.
404No connection to list from.

POST /api/businesses/{businessId}/calendar/calendar

Its time zone is used by generation when the request names none.

ParameterInRequiredDescription
businessIdpathyesYour business id.
BodyTypeRequired
calendarIdstringyes
ResponseTypeRequired
configuredbooleanyes
connectedbooleanyes
statusstring or nullyes
calendarIdstring or nullyes
calendarSummarystring or nullyes
timeZonestring or nullyes
StatusMeaning
200Connection state after the choice.
400A required header, parameter or field is missing or fails its constraints.
401No session and no owner token, or an unknown token.
404No such calendar in the connected account.

POST /api/businesses/{businessId}/calendar/disconnect

Busy time stops narrowing the schedule; slots keep being offered from the declared hours with the usual caveat.

ParameterInRequiredDescription
businessIdpathyesYour business id.
StatusMeaning
204Disconnected.
401No session and no owner token, or an unknown token.
404Absent, or not yours.