REST endpoints for agreements in ServFlo: 5 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}/jobs/{jobId}/agreements
The job's pre-service agreements (pending, signed with name, time and IP, or withdrawn) with the frozen wording. Technicians: their own jobs. Read-only.
POST /organizations/{organizationId}/jobs/{jobId}/agreements
The job's pending agreement, or a new one with its wording frozen now (the chosen template, else the service type's, else the default). Returns it with its signing link; nothing is sent (POST …/agreements/send sends it). Technicians: their own jobs (to sign on site).
POST /organizations/{organizationId}/jobs/{jobId}/agreements/send
Sends to the customer: emails and/or texts the job's customer the agreement's signing link (made as in POST …/agreements if needed). Consent and quiet hours apply. Returns the agreement and how each channel went.
Permission
serviceReports.publish (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
agreements_send (toolset serviceReports)
Approval
Over MCP, this tool asks for your OK first (in the AI app when it supports it, otherwise in ServFlo). See Approvals.
POST /organizations/{organizationId}/jobs/{jobId}/agreements/{agreementId}/sign
The client signs on the technician's device (or on paper): typed name and an optional drawn signature (PNG data URL). Marked as recorded by staff. Pass the textHash of the wording the client was shown (GET …/agreements, or the offline packet): if the agreement's wording is no longer that, nothing is signed (409) and the client must be shown the current wording. 409 also when it is already signed or withdrawn. Re-checks the job's reports (one waiting for the agreement may open and be sent to the client). Emits agreement.signed. The technician app replays it with X-ServFlo-Occurred-At (signed when it happened).