REST endpoints for messaging in ServFlo: 9 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}/messaging/settings
Quiet hours (in the organization's timezone; default 21:00–08:00), the cap on automated messages per customer per day, sender name, reply-to, business phone and review link. Read-only.
GET /organizations/{organizationId}/messaging/channels
The provider of each channel: test mode (log only, the default) or the connected provider with its sender, the last four characters of its credential, its webhook URLs (inbound texts, delivery status, bounces) and the last test. Never returns credentials. Read-only.
Sends data out: sets the channel's provider: test (log only), or resend / postmark / sendgrid / mailgun / ses (EMAIL) or twilio (SMS) with its sender and credentials. Credentials are encrypted at rest and never returned; leave a credential blank to keep the stored one. From then on messages really go out through it.
Permission
channels.manage (Owner, Admin)
Risk
sensitive, OAuth scope servflo.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.
MCP tool
messaging_setChannel (toolset settings)
Approval
Waits for your approval in ServFlo when called with an API key or a connected app: the first call answers 428 APPROVAL_REQUIRED; once you approve it, repeat the call with the X-ServFlo-Approval header. See Approvals.
POST /organizations/{organizationId}/messaging/channels/{channel}/test
Sends a message: a short test email or text to the given address through the channel's provider (in test mode it is only logged, SENT_TEST). The outcome is recorded on the provider and in the message log.
Permission
channels.manage (Owner, Admin)
Risk
sensitive, OAuth scope servflo.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.
MCP tool
messaging_testSend (toolset settings)
Approval
Over MCP, this tool asks for your OK first (in the AI app when it supports it, otherwise in ServFlo). See Approvals.
System: a message the customer asked for themselves (a portal sign-in code; its code is scrubbed once sent). One of AUTOMATION, MANUAL, TEST, INBOUND, CAMPAIGN, SYSTEM.
channel
enum
One of EMAIL, SMS.
purpose
enum
One of TRANSACTIONAL, MARKETING.
status
enum
One of QUEUED, DEFERRED, SENDING, SENT, SENT_TEST, DELIVERED, FAILED, BOUNCED, SKIPPED, CANCELLED, RECEIVED.
statusReason
string or null
provider
string or null
toAddress
string or null
fromAddress
string or null
subject
string or null
preview
string
The first 160 characters of the body.
customerId
string or null
customerName
string or null
ruleId
string or null
ruleName
string or null
campaignId
string or null
The marketing campaign it belongs to (source CAMPAIGN).
POST /organizations/{organizationId}/messaging/simulate-reply
Test mode only (no SMS provider connected): processes a text as if the customer sent it from from, exactly like a signed Twilio webhook: STOP / START / HELP change consent, the reply is logged as an inbound message and message.replied ends cadences. 400 with a real provider (replies come from its webhook).
Permission
channels.manage (Owner, Admin)
Risk
write, OAuth scope servflo.write. Write: creates or changes records inside the business; nothing leaves it.
POST /organizations/{organizationId}/messaging/simulate-email
Test mode only (ServFlo email not live): processes an email as if the customer sent it, exactly like one received through SES: to the reply address of inReplyToMessageId (one of this business's emails), else to the business's ServFlo address. It lands in the Inbox matched to the customer, tells the staff and forwards a copy. 400 when ServFlo email is live.
Permission
channels.manage (Owner, Admin)
Risk
write, OAuth scope servflo.write. Write: creates or changes records inside the business; nothing leaves it.
POST /organizations/{organizationId}/messaging/run
Customer-facing: runs this organization's engine once without waiting for the worker: arms and fires due RELATIVE timers (reminders), runs due scheduled rules, advances cadences and sends due messages. The outbox (events) is consumed for every organization in order, as the worker does. now is for tests only (refused in production).
Permission
engagement.manage (Owner, Admin)
Risk
sensitive, OAuth scope servflo.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.
MCP tool
messaging_runNow (toolset settings)
Approval
Over MCP, this tool always waits for your approval in ServFlo. See Approvals.