Developer reference
Last checked 18 November 2026 · The two ways software talks to the SitesAI App: the REST API and the MCP connector.
The REST API is for your own scripts and servers. You send HTTPS requests with a key and get JSON back. The MCP connector is for AI assistants such as Claude, ChatGPT and Codex. Both act for one company, and both accept the same keys.
This page is a reference, not a sales page. Each statement was checked against the app's code or a request to the live service on 18 November 2026. It covers the SitesAI App (app.sitesai.net) only. SitesAI Estimate has its own connector, described on the AI connectors page. The last section lists what does not exist yet.
On this page: Two ways in · Keys and scopes · Sending a request · Errors · Rate limit · Paging · Two examples · Every endpoint · Website form intake · MCP connector · Check it yourself · What we do not have yet
Two ways in
| REST API | MCP connector | |
|---|---|---|
| Address | https://app.sitesai.net/api/ai/v1/… | https://app.sitesai.net/api/mcp/mcp |
| Made for | Your own scripts, servers and automation tools | AI assistants that speak MCP |
| Sign-in | A key in the Authorization or x-api-key header | OAuth sign-in from the AI client, or a key in the Authorization header |
| Format | JSON over HTTPS | MCP streamable HTTP over HTTPS |
| Shared | The same keys, one company per key, the same rate limit per key, the same AI audit log and the same monthly AI allowance. | |
Keys and scopes
A company owner or manager makes a key in the app. Other members are refused.
- Sign in and open app.sitesai.net/ai-keys (the AI access page).
- Choose New key, give it a name and choose its access.
- Choose Create key. The key is shown once, for a few minutes. Copy it then. It cannot be shown again.
There are three kinds of key. The scope is what the server checks.
| Access, as the app names it | Scope | What it can do |
|---|---|---|
| read only | read | Every GET endpoint below. It cannot use the endpoints that create, change or delete. |
| read + write | read write | Every endpoint below, including the ones that create, change or delete. |
| intake only | intake | Only the website form intake endpoint. It cannot read anything: every /api/ai/v1 request with it gets 403. |
- What a key looks like —
sai_followed by 32 characters (letters, digits,-and_). - How it is stored — the app keeps only a SHA-256 hash of the key, plus its first 12 characters so you can tell keys apart in the list.
- One company — a key belongs to the company it was made in. It acts for the whole company, with the same view of its records as the company owner. The company comes from the key, never from anything in the request. It sees another company's records only where the app shares them between the two companies, for example a subcontractor's shifts on a site you own, or the basics of a site another company has let you work on.
- Revoking — keys do not expire. Revoke a key on the same page; the next request with it gets
401. A revoked key can be switched back on there. - AI access — read and read + write keys use the company's AI access. A REST call counts toward the same monthly allowance as a connector call; the month is counted in UTC. The trial, the free tier and the AI add-on are explained on the AI connectors page and the pricing page. An intake key does not need AI access, and its calls to the intake endpoint are not counted.
Sending a request
- Base address —
https://app.sitesai.net/api/ai/v1. The paths in the tables below follow it. - The key — send it in either header:
Authorization: Bearer sai_YOUR_KEY x-api-key: sai_YOUR_KEY - Bodies — send JSON. Answers are JSON, except four:
/filecan return the file itself or a smaller copy of a picture,/quotes/{id}/pdfreturns a PDF, and/work/guideand/flows/design-guidereturn Markdown. - Browsers —
/api/ai/v1sends no CORS headers, so a web page on another site cannot call it from the browser. Call it from a server. The intake endpoint is the exception. - What is logged — each request that gets past the key check and the rate limit writes one line to the company's AI audit log: the time, the key, the company, the method and the path (without the query string). The data you send and the data returned are not in it. Lines are deleted after 90 days.
Errors
An error from an endpoint is JSON with one field, error, in words. The exceptions are a path that does not exist (see 404), a method the path does not have (405) and a fault inside the app (500).
{"error": "this key lacks the 'write' scope"}
| Status | When | Example error |
|---|---|---|
400 | A required field or parameter is missing, a value is not allowed, or the change is refused (for example deleting a lead that still has a quote). The words say which. | title is required |
401 | No key, a wrong key, or a revoked key. | unauthorized |
403 | The key lacks the scope the endpoint needs. | this key lacks the 'read' scope |
403 | AI access is refused: the company has used its free AI calls for the month, or the company is closed. The words say which, with the upgrade link where one applies. | — |
403 | An accounting endpoint marked “paid plan” on a company without one, or the phone-agent endpoint without the Voice add-on. | — |
404 | The record was not found in your company. A path that does not exist gets no JSON answer: on 18 November 2026 it redirected (307) to the app's sign-in page. | not found |
405 | The path exists but not with that method, for example PUT /overview. The body is empty. | — |
409 | Three cases: editing a quote that is no longer a draft (PUT /quotes/{id}), filing a capture that is already filed, and creating a lead type whose name already exists. | only a DRAFT quote can be edited |
413 | /file with as=auto, text or image: the file is too large to return that way. | — |
415 | /file: the file cannot be opened the way you asked, for example an image with as=text. | — |
429 | The key went over the rate limit. | rate limit exceeded |
500 | Something failed inside the app. The body may not be JSON. | — |
502 | An outside service failed: the file store, voice-note transcription or the accounting system. | file store error |
503 | A feature is switched off or not set up. | Chat is switched off for now. |
A request that works answers 200, or 201 on most endpoints that create a record. Treat any 2xx as success.
Rate limit
- 120 requests a minute for each key. Past that, requests get
429until the next minute. - The count runs in fixed clock minutes, so a burst that spans the turn of a minute can get up to 240 requests through in 60 seconds.
- REST and connector requests made with the same key share one count. On the connector, a request over the limit is refused with
401, as if the key were not valid. - A
429carries noRetry-Afterheader and no remaining-count header. Wait for the next minute and try again. - The intake endpoint adds a limit of its own: 20 requests a minute for each key.
Paging
Twelve lists page the same way: /accounts, /action-entries, /captures, /contacts, /dockets, /items, /leads, /maintenance-logs, /purchase-orders, /quotes, /stock-moves and /tasks. Send limit for the page size. The answer carries nextAfter; send it back as after to get the next page.
On /leads and /tasks, limit defaults to 50 and stops at 200, and nextAfter is null on the last page. With due=1 those two return one unpaged list instead (20 rows unless you send limit).
Two examples
Read the open leads (any read or read + write key):
curl -s "https://app.sitesai.net/api/ai/v1/leads?bucket=live&limit=5" \
-H "Authorization: Bearer sai_YOUR_KEY"
The answer has four fields: company, count, nextAfter and leads, the list itself. bucket takes live, won or closed. Other filters are q (search text), stage, type and assignee.
Create a task (needs a read + write key):
curl -s -X POST "https://app.sitesai.net/api/ai/v1/tasks" \
-H "Authorization: Bearer sai_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"title": "Call the client about the retaining wall", "due_at": "2026-11-20 09:00"}'
It answers 201 with {"ok": true, "task_id": "…"}. Only title is required. due_at is read as the company's local time, written YYYY-MM-DD HH:MM. Without assigned_email the task goes to the company account. A read-only key gets 403 and {"error": "this key lacks the 'write' scope"}.
Every endpoint
These are all 186 method-and-path pairs under /api/ai/v1 in the app's code. On 18 November 2026 each one answered the live service: 401 without a key, or 503 for the three chat endpoints, which are switched off.
Scope: read works with a read or a read + write key. write needs a read + write key. Every endpoint needs read, so an intake key works on none of them. {id} and the other names in braces stand for a record's id. /tags/{code} takes the tag's code, and /groups/{id} also takes the group's name.
Company, people and search
| Method | Path | What it does | Scope |
|---|---|---|---|
GET | /overview | Company snapshot: dashboard figures, lead pipeline, task buckets, timezone and locale (country, currency, tax label, week start, units). | read |
GET | /search | Search across the company's records. q (2 or more characters) is required; types narrows it. | read |
GET | /activity | What was added or changed in a time window, newest first. window (1h, 8h, 24h, 3d, 7d, 30d) or from and to; the default is the last 24 hours. | read |
GET | /calendar | Planned shifts, task due dates, lead follow-ups, document expiries and plan dates. from and to (YYYY-MM-DD) are required. | read |
GET | /setup-check | Every company setting on one list, with where to change it. | read |
GET | /members | Members that leads and tasks can be assigned to: email and name. Client logins are left out. | read |
POST | /members | Add a person as a pending connection. They join the team when they accept. email is required. | write |
GET | /public-page | The company's public page settings and what it would list. | read |
PATCH | /public-page | Change the public page options: address slug, what it shows, enquiries, service area. The page text and its on/off switch stay in the owner's profile. | write |
Leads, quotes and jobs
| Method | Path | What it does | Scope |
|---|---|---|---|
GET | /leads | The lead pipeline. Filters: q, stage, bucket, type, assignee; due=1 for follow-ups due now. Paged. | read |
POST | /leads | Create a lead. name is required. | write |
GET | /leads/{id} | One lead with its contacts, notes and tasks. | read |
PATCH | /leads/{id} | Change a lead. Only the fields you send change. | write |
DELETE | /leads/{id} | Delete a lead. Refused while it has a quote, task, note or attached contact. | write |
POST | /leads/{id}/contacts | Attach a directory contact to a lead (contact_id). | write |
DELETE | /leads/{id}/contacts | Detach a contact (contact_id). The contact stays in the directory. | write |
GET | /lead-types | The company's lead types. | read |
POST | /lead-types | Create a lead type. A company needs one active type before its first lead. | write |
PATCH | /lead-types/{typeId} | Change a lead type. Only the fields you send change. | write |
GET | /quotes | Quotes with subtotals before tax. Filters: q, status, lead. Paged. | read |
POST | /quotes | Create a draft quote for a lead (lead_id is required), with lines if you send them. Sending it to the client is done by a person in the app. | write |
GET | /quotes/{id} | One quote: header, lines, totals, and the client link once it has been sent. | read |
PUT | /quotes/{id} | Edit a draft's title, valid-until date and the text on its PDF. | write |
PATCH | /quotes/{id} | Record the outcome: accepted, rejected or cancelled. | write |
GET | /quotes/{id}/pdf | The quote as a PDF. A draft carries a DRAFT watermark. | read |
POST | /quotes/{id}/lines | Add a line to a draft quote. | write |
PATCH | /quotes/{id}/lines/{lineId} | Replace a line on a draft quote. description and qty are required. | write |
DELETE | /quotes/{id}/lines/{lineId} | Remove a line from a draft quote. | write |
GET | /services | The service catalogue with rates. Active services only, unless all=1. | read |
GET | /jobs | Active jobs (won leads) with site, crew, who is clocked in, contract value and last claim. With leadId: one job. | read |
POST | /jobs | Give a won job a site when it has none (lead_id). | write |
GET | /job-detail | One job, read quickly: the lead, its contract value, its quotes and its last five notes. leadId is required. | read |
GET | /contracts | The contract documents on a job. leadId is required; preview=1 also shows what a new one would contain. | read |
POST | /contracts | Issue a contract document. It is frozen as it stands that day. | write |
PATCH | /contracts | Change a contract's title, note or status, for example to void it. Once a contract is signed, its status can only change to void. | write |
GET | /sow-items | The scope of work and variations of a job, with the progress recorded against each line. | read |
POST | /sow-items | Add a scope line, raise a variation, or import a quote's lines as the scope. | write |
PATCH | /sow-items | Edit a line, or move it to draft, submitted, approved, rejected, complete or void. | write |
GET | /progress-claims | Progress claim reports for a job. leadId is required; draft=1 shows the next one. A claim is a report, not an invoice. | read |
POST | /progress-claims | Issue the next progress claim report. | write |
Directory and phone
| Method | Path | What it does | Scope |
|---|---|---|---|
GET | /accounts | Client and supplier companies. Filters: q, type, group. Paged. | read |
POST | /accounts | Create an account. name is required. | write |
GET | /accounts/{id} | One account with its groups, contacts and leads. | read |
PATCH | /accounts/{id} | Change an account. Only the fields you send change. | write |
DELETE | /accounts/{id} | Delete an account. Refused while anything points at it. | write |
GET | /contacts | People in the directory. Filters: q, group. Paged. | read |
POST | /contacts | Create a contact. full_name is required. | write |
GET | /contacts/{id} | One contact. | read |
PATCH | /contacts/{id} | Change a contact. Only the fields you send change. | write |
DELETE | /contacts/{id} | Delete a contact. Refused while it is attached to a lead or has notes. | write |
GET | /groups | Directory groups with their counts. | read |
POST | /groups | Create a group. | write |
GET | /groups/{id} | A group and the people and accounts on it. Anyone marked do-not-contact is left out. | read |
PATCH | /groups/{id} | Rename a group, or change who is on it. | write |
DELETE | /groups/{id} | Delete a group. Its accounts and contacts stay. | write |
GET | /lookup | Who is this phone number? Matches the last nine digits across contacts, accounts, members and leads. phone is required. | read |
GET | /call-brief | A short written brief for an incoming call: who is calling, their jobs and recent notes. An unknown number gets a one-line brief, not an error. phone is required. | read |
GET | /record-contacts | The people attached to a site or a task. | read |
POST | /record-contacts | Attach a contact to a site or task. With send_link, make a tracking link for a job, site or task instead; it is emailed when you also send email and contact_id. | write |
DELETE | /record-contacts | Detach a contact. Their tracking links stop working. | write |
GET | /phone-agent | The company's phone-agent settings. This one needs the Voice add-on instead of AI access. | read |
Tasks, notes, files and captures
| Method | Path | What it does | Scope |
|---|---|---|---|
GET | /tasks | Tasks. Filters: q, status (open, done, approved), assignee; due=1 for tasks due now. Paged. | read |
POST | /tasks | Create a task. title is required. | write |
GET | /tasks/{id} | One task. | read |
PATCH | /tasks/{id} | Change a task's status, assignee or due time. | write |
DELETE | /tasks/{id} | Delete an open task. Refused if it has sub-tasks, notes or recorded entries. | write |
POST | /comments | Add a note to a record, with one optional file: audio, a PDF or an image, up to 10 MB. It shows in the app's activity like any other note. | write |
PATCH | /comments/{id} | Edit a note's text. | write |
DELETE | /comments/{id} | Delete a note. | write |
GET | /files | Every file attached to the company's records, newest first. | read |
GET | /file | Open one file by the path another endpoint returned (p). as is raw (the default), auto, text or image. Only files on your company's records open. | read |
GET | /captures | The field feed: photos, voice notes and short notes from workers. By default, the ones still waiting to be filed. Paged. | read |
GET | /captures/{id} | One capture, with hints about where it belongs. transcribe=1 transcribes a voice note that has no transcript yet. | read |
PATCH | /captures/{id} | Change a capture's summary or labels, move it to another record, or dismiss it. Captures are never deleted. | write |
POST | /captures/{id}/file | File a capture onto a site, job, contact or task as a note in the worker's name. 409 if it is already filed. | write |
Sites, documents and compliance
| Method | Path | What it does | Scope |
|---|---|---|---|
GET | /sites | The company's sites. Active sites only, unless all=1. | read |
GET | /sites/{id} | One site in full. A subcontractor allowed on the site sees the basics and what applies to it. | read |
PATCH | /sites/{id} | Change a site's settings: name, address, location, clock-in rules, hours, timezone and more. Only for sites your company owns. | write |
POST | /sites/{id}/members | Put members or machines on a site. | write |
POST | /sites/{id}/crew | Move a person on the site under one of its subcontractors. | write |
POST | /sites/{id}/companies | Let a subcontractor company work on a site you own. | write |
DELETE | /sites/{id}/companies | Take that permission away (site_company_id). | write |
GET | /sites/{id}/requirements | The documents a site asks for. | read |
PUT | /sites/{id}/requirements | Set the whole list of documents a site asks for. | write |
GET | /sites/{id}/compliance | Who is missing which document on a site. | read |
GET | /join-links | The join links for one site (site_id). | read |
POST | /join-links | Make a join link for a site. Whoever opens it and signs in is on the site. | write |
DELETE | /join-links | Turn a join link off (link_id). | write |
GET | /doc-types | Document types: the shared ones and the company's own. | read |
POST | /doc-types | Create a company document type, or get the one that already has that name. | write |
PATCH | /doc-types | Rename or retire one of the company's own document types. | write |
GET | /documents | Every document the company can see, with its expiry status. | read |
POST | /documents | Record a document, without a file, for the company, a member or a machine. | write |
POST | /documents/submissions | Submit a document against a site's requirement. | write |
PATCH | /documents/submissions/{id} | Accept or reject a submission on a site you own. | write |
GET | /compliance | Documents about to expire, submissions waiting for review, and missing documents. | read |
GET | /operation-compliance | Who is set to do an operation without the documents it needs. | read |
GET | /tags | NFC and QR tags, with how often each was tapped. | read |
POST | /tags | Register a tag. It returns the code and the web address to put on the sticker. | write |
DELETE | /tags/{code} | Revoke a tag. Every tap after that is refused and logged. | write |
Time, roster, dockets and plans
| Method | Path | What it does | Scope |
|---|---|---|---|
GET | /worktime | Shifts worked: who, where, times and signatures. Up to 200 rows, newest first. | read |
GET | /worktime/{id} | One shift in full: its operations, prestart checks, materials and, where recorded, movements. | read |
PATCH | /worktime/{id} | Edit a finished shift's times, break or comment. Refused once a supervisor has signed it. If the worker had signed, their signature is cleared and they sign again. | write |
GET | /worktime/summary | Hour totals for a date range, by member, by site, or both. | read |
GET | /worktime/live | Who is clocked in now, and where. With work (a shift id), where the person on that shift went. | read |
GET | /worktime/movements | Totals for shifts that recorded movement: loads, kilometres, moving and stopped time. | read |
GET | /shifts | Planned shifts (offers to members) and their status. | read |
POST | /shifts | Offer a shift to a member, or several members over several dates. Each member is emailed. | write |
GET | /shifts/{id} | One planned shift. | read |
PATCH | /shifts/{id} | Accept, reject, cancel, re-offer or reassign a shift (action). A reject needs a reason. The people concerned are emailed. | write |
GET | /shifts/no-shows | Accepted shifts today that started more than 15 minutes ago with no clock-in. | read |
GET | /dockets | Dockets: one per operator, machine, site, operation and day. Paged. Signing is done by people in the app. | read |
GET | /dockets/{id} | One docket with its lines. A signed docket shows the lines as they were signed. | read |
GET | /plans | Every site that has a plan, with its stages and milestones. | read |
GET | /plans/{siteId} | One site's plan: its rows and the links between them. | read |
POST | /plans/{siteId} | Build or change a site's plan. The ops list is applied in one transaction: all of it, or none. | write |
Operations and the work model
| Method | Path | What it does | Scope |
|---|---|---|---|
GET | /actions | Operation types: the units of work recorded in the field. | read |
POST | /actions | Create an operation type. | write |
PATCH | /actions | Change or retire an operation type. Only the fields you send change. Operation types are never deleted. | write |
GET | /actions/{id}/requirements | The document types an operation needs. | read |
PUT | /actions/{id}/requirements | Set that whole list. | write |
GET | /action-assignments | Which members, roles or sites each operation type is connected to. | read |
POST | /action-assignments | Connect an operation type to a member, a role or a site. | write |
DELETE | /action-assignments | Remove a connection (id). Recorded entries keep their history. | write |
GET | /action-offers | Operations your company offers to subcontractors on a site, or that other companies offer to yours. | read |
POST | /action-offers | Offer an operation on one of your sites to a subcontractor company. | write |
DELETE | /action-offers | Withdraw an offer (id). | write |
GET | /action-entries | Recorded operations, such as truck loads and deliveries. Paged. | read |
GET | /work/guide | How the work model fits together, as Markdown. | read |
GET | /work/preview | What one member will see when they open the app. member_email is required. | read |
Processes, SOPs, flows and workflows
| Method | Path | What it does | Scope |
|---|---|---|---|
GET | /processes | The company's processes. | read |
POST | /processes | Create a process. | write |
GET | /processes/{id} | One process with its steps. | read |
PATCH | /processes/{id} | Change a process. Only the fields you send change. | write |
DELETE | /processes/{id} | Delete a process. One that workers have run is archived instead. | write |
GET | /processes/{id}/steps | The process's steps, in order. | read |
PUT | /processes/{id}/steps | Set the whole step list (sop_ids, in order). | write |
POST | /processes/{id}/steps | Add an existing SOP as a step, or move a step up or down. | write |
DELETE | /processes/{id}/steps | Take a SOP out of this process (sop_id). It stays in the library. | write |
GET | /sops | The SOP library. | read |
POST | /sops | Create a SOP, and optionally add it as the last step of a process. | write |
GET | /sops/{id} | One SOP, and the processes that use it. | read |
PATCH | /sops/{id} | Change a SOP. The change shows in every process that uses it. | write |
DELETE | /sops/{id} | Delete a SOP from the library. One that workers have run is archived instead. | write |
POST | /sops/{id}/next | Add a branch from this step to another SOP. | write |
DELETE | /sops/{id}/next | Remove a branch (edge_id). | write |
GET | /checklists | Checklists with their items. | read |
POST | /checklists | Create a checklist. | write |
GET | /flows/assignments | Who follows which guided flow. | read |
POST | /flows/assignments | Give a process to a member, a role or a site as a guided flow. | write |
DELETE | /flows/assignments | Remove an assignment (id). Past runs are kept. | write |
GET | /flows/runs | Guided-flow runs: who walked which flow, when, and how far they got. | read |
GET | /flows/runs/{id} | One run, with every completed step. | read |
GET | /flows/step-types | The step types a SOP can have, with their settings. | read |
GET | /flows/design-guide | The guide to designing flows, as Markdown. | read |
GET | /workflows | The company's workflows. | read |
POST | /workflows | Make a workflow. | write |
GET | /workflows/{id} | One workflow with its steps, assignments, links and runs. | read |
PATCH | /workflows/{id} | Change a workflow. | write |
DELETE | /workflows/{id} | Switch a workflow off. Its links stop working; its runs are kept. | write |
GET | /workflows/{id}/links | The links that carry a workflow. A link's address is shown only when it is made. | read |
POST | /workflows/{id}/links | Make a link for a workflow. | write |
DELETE | /workflows/{id}/links | Turn a link off (link_id). | write |
Equipment, maintenance and stock
| Method | Path | What it does | Scope |
|---|---|---|---|
GET | /items | The item catalogue: equipment, stock and consumables. flag=hire or flag=sale for what can be hired or bought. Paged. | read |
GET | /machines/{id} | One machine: where it is, its service schedule, where it has been, what is attached to it, its fuel and parts. | read |
PATCH | /machines/{id} | Move a machine, attach it to another, change its status or serial, or correct its move history. | write |
GET | /maintenance-logs | Prestart checks and service logs, per machine. Paged. | read |
POST | /maintenance-logs | Import old service history. Send dry_run first to see what would be written. | write |
DELETE | /maintenance-logs | Undo one whole import (importId). | write |
GET | /maintenance-logs/{id} | One log with every check line and its photos. | read |
GET | /prestart-due | Machines that still need today's prestart check. The checks themselves are done on the phone. | read |
GET | /purchase-orders | Purchase orders. With po_id, one order with the quantities ordered and received. Paged. | read |
GET | /stock-levels | Stock on hand for each item in each location, with its value. | read |
GET | /stock-locations | Where stock is kept: yards, site stores, fuel tanks, vehicles. With location_id, one location in detail. | read |
GET | /stock-moves | The stock ledger: every movement, with its quantity and cost. Paged. | read |
POST | /stock-moves | Record that stock was used. Mistakes are reversed, never deleted. | write |
Accounting integration (Xero)
The endpoints marked “paid plan” answer 403 unless the company is on a paid plan, for example with a paid seat or the AI add-on.
| Method | Path | What it does | Scope |
|---|---|---|---|
GET | /integrations | The accounting connection's status. | read |
GET | /integrations/options | The lists in Xero that a mapping picks from. Paid plan. | read |
GET | /integrations/mappings | The saved mappings of one kind: member, customer, operation, service or site. | read |
POST | /integrations/mappings | Save a mapping. Paid plan. | write |
GET | /integrations/push | Preview the timesheets a push would send. from and to are required. Paid plan. | read |
POST | /integrations/push | Send a period's timesheets to Xero as drafts. Paid plan. | write |
GET | /integrations/pushes | The record of past pushes. | read |
Switched off
Chat is switched off. These three endpoints are in the code but answer 503 with Chat is switched off for now.
| Method | Path | What it does | Scope |
|---|---|---|---|
GET | /chats | Answers 503. | read |
GET | /chats/{id}/messages | Answers 503. | read |
POST | /chats/{id}/messages | Answers 503. | write |
Website form intake
An intake key is for one job: adding a new lead from a form on your website. It works on one endpoint, which sits outside /api/ai/v1:
POST https://app.sitesai.net/api/intake/lead
- Key — an intake key or a read + write key. Send it in
Authorization: Bearer, inx-api-key, or as akeyfield in the body. - Body — JSON or
application/x-www-form-urlencoded, at most 10,000 characters (413above that). - Fields — at least one of
contact_name,contact_emailandcontact_phone(400without one). Also read:company,message,page_url,project_type,name,sourceandlead_type_id. - Bots — a form that sends a non-empty
websitefield gets{"ok": true}, and nothing is saved. Keep that field hidden from people. - Answer —
201and{"ok": true, "lead_id": "…"}. - Browsers — this endpoint answers pre-flight requests and allows any origin, so a page on your own site can post to it directly.
- Limit — 20 requests a minute for each key, as well as the 120 that applies to every key.
A key placed in a web page can be read by anyone who views the page source. An intake key found that way can add leads to your company. It cannot read or change anything else. /api/ai/v1 refuses its requests and the connector refuses its tool calls, but those requests are still logged and still count toward the company's monthly AI allowance. Revoke it on the AI keys page if it is misused.
The MCP connector
- Address —
https://app.sitesai.net/api/mcp/mcp, over MCP streamable HTTP. - Sign-in — OAuth 2.1 (authorisation code with PKCE) from the AI client, or a key from the AI keys page in an
Authorization: Bearerheader. Only company owners and managers can approve the consent screen, and the connection is read-only unless they choose read and write there. - OAuth details — the server publishes its metadata at
https://app.sitesai.net/.well-known/oauth-authorization-serverandhttps://app.sitesai.net/.well-known/oauth-protected-resource. It supports theS256code challenge, client registration at its registration endpoint, and the scopesreadandwrite. The token it issues is a key like any other: it is listed on the AI keys page, it does not expire, and it can be revoked there. - Tool profiles —
opsis the default and needs no query string. Add?profile=litefor the small inbox and phone-agent set, or?profile=fullfor every tool. Same key, same data; only the tool list changes. A call to a tool that is not in the profile is refused with an error that names the profile and the address to use instead. - Limits — the connector shares the REST API's rate limit per key, its audit log and its monthly AI allowance.
How to turn the connector on, and what its tools do, is on the AI connectors page. The AI access page in the app also gives the steps for Claude, Claude Code and Codex. Neither is repeated here.
Check it yourself
You can check two things without a key.
curl -s -i https://app.sitesai.net/api/ai/v1/overview
This answers 401 with {"error":"unauthorized"}, and carries no Access-Control-Allow-Origin header.
curl -s https://app.sitesai.net/.well-known/oauth-authorization-server
This returns the connector's OAuth metadata as JSON.
What we do not have yet
- Webhooks. The app does not call a web address of yours when a record changes. To see changes, ask
/activityfor a time window. The only web address a company can set for the app to post to is the optional Google Chat space link, and the app accepts only a Google Chat address there. - An OpenAPI (Swagger) file, or any other machine-readable description of the API. This page is the description.
- An SDK or client library. Use any HTTP client.
- A sandbox or test environment. Every key works on its company's live data. Build with a read-only key first.
- Finer scopes. There are three kinds of key. A read + write key can use every write endpoint, and every read or read + write key sees the whole company.
- Key expiry or IP restrictions. A key works from anywhere until it is revoked.
- Rate-limit headers. Responses do not say how many requests are left, and a
429has noRetry-After. - CORS on
/api/ai/v1. Browser pages on other sites cannot call it. - A changelog, version policy or deprecation notice for the API. The path says
v1. There is nov2. - Some actions on purpose. Signing or confirming a docket, sending a quote to the client and doing a machine prestart check are done by people in the app. The API has no endpoint for them.
- A public status page, or a published uptime figure. The Terms of Service cover availability.
Questions, or an endpoint that does not do what this page says? Email admin@sitesai.net. How data reaches an AI client, and what is kept, is in our Privacy Policy, section 8.