REST endpoints for lines in ServFlo: 4 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.
The signed-in person's line: their own number (texts and calls go out from it) or the business's, and their mobile. What the phone dock and the app show. Read-only.
The signed-in person's mobile and whether it rings for their line's calls (when no app or browser answers), also the phone rung first when they call out through their phone. Changes nothing the customer sees.
PUT /organizations/{organizationId}/lines/{userId}
MONEY when buyE164 is given: buys that number (one GET /phone/numbers/available offered) as the person's own line, billed monthly as phone usage. OWN_NUMBER: their texts and calls go through their own number (bought now, or phoneNumberId, a business number that isn't anyone's); calls to it ring only them and texts to it are theirs. BUSINESS_NUMBER: they use the business's numbers; a number that was theirs stays on the business, unassigned. A sole-proprietor texting registration allows one number, so it refuses own numbers.
Permission
lines.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
lines_set (toolset marketing)
Plan
Needs the Phone system add-on.
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.