REST endpoints for customer messaging in ServFlo: 2 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}/messaging
For each contact method of the customer: OK to text, suppression (bounce, complaint, STOP), marketing and service-email choices with who made them, and whether an automation may send transactional and marketing messages there (with the reason when not). The message history is GET /messages?customerId=…. Read-only.
Records the customer's consent as told to staff: OK to text (sms), marketing (marketing), service emails (transactionalEmail). Turning anything off is always allowed. Refused (409): switching texts on for a number that replied STOP (only the customer can, by texting START), and opting back into marketing or service emails an address that unsubscribed itself. Emits consent.changed.
Permission
customers.write (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
customerMessaging_setConsent (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.