REST endpoints for customer portal in ServFlo: 6 operations with parameters, request and response fields, permissions and curl examples.
Base URL: https://app.servflo.ai/api. Every call needs Authorization: Bearer sfk_… (Authentication); {organizationId} ($ORGANIZATION_ID in the examples) is your business's id.
GET /organizations/{organizationId}/customers/{customerId}/portal
The customer's working portal link (/portal/{token}), or null when there is none (never made, revoked or expired), with when it was last opened. Read-only, but the token is a credential: do not share it unless asked.
POST /organizations/{organizationId}/customers/{customerId}/portal
EXPOSES TO THE CUSTOMER / REVOKES: issues a new passwordless portal link for the customer. Any earlier link is revoked in the same step (it stops working), so share the new one. The portal shows only this customer's balance, visits, quotes, invoices, service history and properties. Nothing is emailed.
Permission
portal.manage (Owner, Admin, Dispatcher)
Risk
sensitive, OAuth scope servflo.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.
MCP tool
portalLinks_create (toolset customers)
Approval
Over MCP, this tool asks for your OK first (in the AI app when it supports it, otherwise in ServFlo). See Approvals.
Destructive: the customer's portal link stops working at once (404 for anyone who opens it). Create a new one to restore access. Returns how many links were revoked.
Permission
portal.manage (Owner, Admin, Dispatcher)
Risk
sensitive, OAuth scope servflo.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.
MCP tool
portalLinks_revoke (toolset customers)
Approval
Over MCP, this tool always waits for your approval in ServFlo. See Approvals.
GET /organizations/{organizationId}/customers/{customerId}/portal-sessions
The devices where this customer is signed in to their portal (/c/{slug}), newest use first: how they signed in, browser and device, address, when, last use and expiry. Live sessions only. Read-only.
Revokes access: ends one of the customer's portal sessions at once (the device must sign in again with a code). Another customer's session is 404. List them with GET …/portal-sessions first.
Permission
portal.manage (Owner, Admin, Dispatcher)
Risk
sensitive, OAuth scope servflo.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.
MCP tool
customerSessions_revoke (toolset customers)
Approval
Over MCP, this tool always waits for your approval in ServFlo. See Approvals.
POST /organizations/{organizationId}/customers/{customerId}/portal-sessions/revoke-all
Revokes access: ends every portal session of the customer at once. They can sign in again with a code sent to their email or phone on file. Returns how many sessions ended.
Permission
portal.manage (Owner, Admin, Dispatcher)
Risk
sensitive, OAuth scope servflo.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.
MCP tool
customerSessions_revokeAll (toolset customers)
Approval
Over MCP, this tool always waits for your approval in ServFlo. See Approvals.