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_…

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.

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.

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.

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

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.

<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.