Developers & AI agents
Everything a team member can do in Segui, an AI agent or script can do too, through the same rules and only inside your workspace. Segui offers a remote MCP server for AI agents and a REST API with an OpenAPI spec. Agents can also read llms.txt. Website forms send their entries to a form link.
Authentication
An admin opens Settings → API & AI agents and clicks Connect agent. Segui creates an API key (sgi_…), shows it once and shows the setup for your tool with the right URL. Send it with every request:
Authorization: Bearer sgi_…
- A key acts as the admin who created it, with the rights chosen for it: member (inquiries, notes, tasks, notifications, invoices) or admin (also pipeline, settings, packages, invoice settings and website form links), optionally read only.
- Keys work only in their workspace. They stop working when they are revoked, when their creator leaves the team, and while the workspace is locked by billing.
- Limit: 120 requests per minute per key (HTTP 429 with
Retry-After).
Quickstart
The API lives at https://api.segui.app. The first call lists the inquiries whose next step is due, the second creates an inquiry whose next step is due on 1 October (reminderOn is the date of the next step).
curl -H "Authorization: Bearer $SEGUI_API_KEY" https://api.segui.app/api/v1/inquiries/due
curl -X POST https://api.segui.app/api/v1/inquiries \
-H "Authorization: Bearer $SEGUI_API_KEY" -H "Content-Type: application/json" \
-H "Idempotency-Key: form-4711" \
-d '{"familyName":"Muster","firstName":"Anna","email":"anna@example.com","reminderOn":"2026-10-01"}'
MCP setup
The MCP endpoint is https://api.segui.app/mcp (Streamable HTTP, stateless; protocol 2026-07-28 and the earlier 2025 versions).
Claude Code
claude mcp add --transport http segui https://api.segui.app/mcp --header "Authorization: Bearer sgi_…"
Claude Desktop and claude.ai
Settings → Connectors → Add custom connector. URL https://api.segui.app/mcp, header Authorization: Bearer sgi_….
Codex
# ~/.codex/config.toml
[mcp_servers.segui]
url = "https://api.segui.app/mcp"
bearer_token_env_var = "SEGUI_API_KEY"
Hermes
# ~/.hermes/config.yaml
mcp_servers:
segui:
url: "https://api.segui.app/mcp"
headers:
Authorization: "Bearer sgi_…"
Other MCP clients
{"mcpServers": {"segui": {"type": "http", "url": "https://api.segui.app/mcp",
"headers": {"Authorization": "Bearer sgi_…"}}}}
Tools and endpoints
Every MCP tool is also a REST endpoint under /api/v1. Resources: segui://workspace, segui://pipeline, segui://team, segui://due-today.
- Inquiries:
search_inquiries, list_due_today, get_inquiry, create_inquiry, update_inquiry, move_inquiry, update_inquiry_step, set_reminder, clear_reminder, assign_advisor, unassign_advisor, mark_inquiry_lost, mark_inquiry_invoiced, delete_inquiry, restore_inquiry, delete_inquiry_permanently - Notes:
list_notes, add_note, update_note, delete_note - Tasks:
list_tasks, get_task, create_task, update_task, complete_task, delete_task, restore_task - Pipeline and team:
get_pipeline, update_pipeline, remove_stage, list_team - Notifications:
list_notifications, archive_notification, archive_all_notifications - Reports:
get_report(Business and trial),export_inquiries_csv(every plan) - Workspace:
get_workspace, update_workspace, set_feature, list_form_links, create_form_link, revoke_form_link(create_form_linkreturns the linkhttps://api.segui.app/form?token=…) - Invoices:
list_invoices, get_invoice, create_invoice, update_invoice, delete_invoice, restore_invoice, send_invoice, send_payment_reminder, record_payment, remove_payment, cancel_invoice, duplicate_invoice, get_invoice_settings, update_invoice_settings - Ready to invoice:
list_invoice_proposals, dismiss_invoice_proposal, restore_invoice_proposal, set_invoice_proposal_rule - Recurring invoices:
list_recurring_invoices, get_recurring_invoice, create_recurring_invoice, update_recurring_invoice, pause_recurring_invoice, end_recurring_invoice, create_due_invoices - Packages:
list_packages, create_package, update_package, delete_package - Payers:
list_payers, set_payer, remove_payer - Waiting list:
list_waitlist, add_to_waitlist, reorder_waitlist, remove_from_waitlist - Documents:
list_documents, create_document_upload_url, add_document, update_document, delete_document, restore_document, get_document_link, create_document_link, revoke_document_link, set_document_categories - Appointments:
list_appointments
Only admin keys change the pipeline, workspace settings, optional features, document categories, packages, where invoices are proposed, website form links and the invoice settings (they hold the bank account). Everything else is open to member keys, as in the app.
Invoices
Amounts are in minor units of the workspace currency: 12500 is CHF 125.00. An invoice starts as a draft; send_invoice gives it its number and emails it with the PDF and Swiss QR-bill ("email": false only issues it). It is then open, overdue after its due date, paid once the payments recorded with record_payment cover it, or cancelled. Sent invoices are never changed: cancel and duplicate them. Nothing goes out by itself.
create_invoicewith aninquiryIdfills in the recipient from the inquiry;packageIdsadds the packages like a click in the app: the deposit first, the balance once the deposit invoice went out.list_invoice_proposalsshows what the app lists under «Ready to invoice»: inquiries at the step or column the workspace bills at, and balances that are due. Bill one withcreate_invoice, or wave it off withdismiss_invoice_proposal.- Recurring invoices bill the same lines every month, quarter or semester:
create_due_invoicesmakes the drafts of the due periods (never twice),send_invoicesends them. - The language
de-enneeds the featurebilingualInvoices, the child on an invoice (child) the featureinvoicePayers; otherwise the answer is 403FEATURE_OFF.get_workspaceshows the features, an admin switches them withset_feature. - During the free trial a workspace sends at most 10 invoice emails a day and 30 in total (402
TRIAL_LIMIT).record_paymentaccepts anIdempotency-Key, so a retry never books a payment twice.
curl -X POST https://api.segui.app/api/v1/invoices \
-H "Authorization: Bearer $SEGUI_API_KEY" -H "Content-Type: application/json" \
-H "Idempotency-Key: oct-muster" \
-d '{"inquiryId":"k57…","subject":"Schulgeld Oktober","positions":[{"description":"Schulgeld","quantity":1,"unitPrice":240000}]}'
curl -X POST https://api.segui.app/api/v1/invoices/k97…/send \
-H "Authorization: Bearer $SEGUI_API_KEY" -H "Content-Type: application/json" -d '{}'
list_appointments lists the first calls booked through the workspace's booking calendar, with time and video link.
Children, waiting list, payers and documents
A child is addressed by its inquiry and its childId: get_inquiry returns children, each with a fixed id. update_inquiry replaces the whole list of children: send every child back with its id to rename or reorder it. A child left out, or renamed without its id, counts as removed: its waiting-list places and payer are deleted and its documents move to the family.
- Waiting list (feature
waitlistand the places plan):add_to_waitlistputs a child at the end of a grade's list for a school year (2027= 2027/28);list_waitlistalso lists the grade ids. - Payers (feature
invoicePayers):set_payerstores who pays for a child instead of the parents.create_invoicewithinquiryIdandchildIdputs the child on the invoice and sends it to that payer. - Documents are uploaded in two steps:
create_document_upload_url, then POST the file's bytes to that URL with itsContent-Type(the answer holds astorageId), thenadd_document. At most 15 MB; PDF, images and Office files.create_document_linkgives the family an upload page without an account.
curl -X POST https://api.segui.app/api/v1/documents/upload-url -H "Authorization: Bearer $SEGUI_API_KEY"
curl -X POST "$UPLOAD_URL" -H "Content-Type: application/pdf" --data-binary @zeugnis.pdf
curl -X POST https://api.segui.app/api/v1/inquiries/k57…/documents \
-H "Authorization: Bearer $SEGUI_API_KEY" -H "Content-Type: application/json" \
-d '{"storageId":"kg2…","name":"zeugnis.pdf","childId":"a1b2c3d4","category":"Zeugnisse"}'
The next step of an inquiry is its first timeline step that is neither done nor skipped. Its date is the reminder: that day the inquiry shows up in Today and in the notifications of the people assigned. set_reminder sets the date of the next step, clear_reminder removes it, list_due_today lists the inquiries whose next step is due (overdue first), and reminderOn on an inquiry is the same date. Tasks are separate internal to-dos, not part of the timeline.
Conventions
- JSON in and out. Days as
YYYY-MM-DD, timestamps as ISO 8601. - Lists return
{"items": [...], "nextCursor": "..."}; passcursorfor the next page. - Creates accept an
Idempotency-Keyheader (MCP:idempotencyKey); a retry within 24 hours returns the first result. - Errors:
{"error": {"code": "NOT_FOUND", "message": "..."}}with 400, 401, 402 (billing, plan or trial limit), 403 (role, read only or a feature switched off), 404, 409, 429. GET /api/v1returns a JSON overview (name, version, links to the docs, OpenAPI and MCP) with a valid key and 401 without, handy to test a key.sourceof an inquiry says how it arrived:email(inquiry address),form(form link),wix(form link with a Wix payload),manual(typed in the app) orapi(create_inquiry). Changed in September 2026: before, every inquiry from an integration hadwebsite_form.
Website forms
Each form link (Settings → Integrations, or create_form_link) takes the entries of any website form: POST https://api.segui.app/form?token=…. No API key is needed; the token identifies the form link.
- Formats: Wix forms, JSON,
application/x-www-form-urlencodedandmultipart/form-data. Files in a multipart form (up to 10, 15 MB each; PDF, images, Office) become documents of the new inquiry; other files are dropped, the inquiry is always stored. - Common field names are recognised, regardless of case:
firstName,first_nameorvorname;lastName,last_nameornachname;name(split into first and last name);email;phoneortelefon;messageornachricht;companyorfirma. - Without email and without phone the answer is 400 and nothing is stored.
- JSON requests get JSON back. An HTML form is sent on to the address in its
redirector_nextfield, for example your thank-you page; without it Segui shows a short thank-you page. - The token in a page's HTML
actionis public: anyone can send inquiries with it. If it is abused, revoke the form link and create a new one.
<form action="https://api.segui.app/form?token=…" method="post">
<input name="name"> <input name="email" type="email"> <input name="phone">
<textarea name="message"></textarea>
<input type="hidden" name="redirect" value="https://your-agency.com/thanks">
<button>Send</button>
</form>
OpenAPI
The full spec is served at https://api.segui.app/api/v1/openapi.json and is generated from the same definitions as the MCP tools.