DevelopersAPI referenceService reports

Agreement templates API

REST endpoints for agreement templates 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.

OperationEndpointRisk
List agreement templatesGET /organizations/{organizationId}/agreement-templatesread
Create an agreement templatePOST /organizations/{organizationId}/agreement-templateswrite
Get an agreement templateGET /organizations/{organizationId}/agreement-templates/{agreementTemplateId}read
Update an agreement templatePATCH /organizations/{organizationId}/agreement-templates/{agreementTemplateId}write
Delete an agreement templateDELETE /organizations/{organizationId}/agreement-templates/{agreementTemplateId}sensitive

List agreement templates

GET /organizations/{organizationId}/agreement-templates

Pre-service agreement wordings, the default first. Read-only.

PermissionserviceReports.read (Owner, Admin, Dispatcher, Technician, Member)
Riskread, OAuth scope servflo.read. Read: reads only.
MCP toolagreementTemplates_list (toolset serviceReports)

Example

curl "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/agreement-templates" \
  -H "Authorization: Bearer $SERVFLO_API_KEY"

Response

200: the answer's fields

An array of objects:

FieldTypeDescription
idstring
namestring
bodystringSafe HTML; {business} is replaced by the business's name.
serviceTypeIdsarray of string
isDefaultboolean
archivedAtstring (date-time) or null

Create an agreement template

POST /organizations/{organizationId}/agreement-templates

An agreement wording for some service types (or the default). Agreements already sent keep the wording they were sent with. Have your own wording reviewed; ServFlo's default is a plain starting point, not legal advice.

PermissionserviceReports.manage (Owner, Admin)
Riskwrite, OAuth scope servflo.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolagreementTemplates_create (toolset serviceReports)

Request body

FieldTypeRequiredDescription
namestringYesUp to 200 characters.
bodystringYesThe wording (safe HTML); {business} becomes the business's name.
serviceTypeIdsarray of stringNoService types this agreement is for. Up to 500 items.
isDefaultbooleanNoUsed for service types without their own.
archivedbooleanNo

Example

curl -X POST "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/agreement-templates" \
  -H "Authorization: Bearer $SERVFLO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Dana Whitfield","body":"string"}'

Response

201: the answer's fields
FieldTypeDescription
idstring
namestring
bodystringSafe HTML; {business} is replaced by the business's name.
serviceTypeIdsarray of string
isDefaultboolean
archivedAtstring (date-time) or null

Get an agreement template

GET /organizations/{organizationId}/agreement-templates/{agreementTemplateId}

One pre-service agreement wording with its service types and default flag. Read-only.

PermissionserviceReports.read (Owner, Admin, Dispatcher, Technician, Member)
Riskread, OAuth scope servflo.read. Read: reads only.
MCP toolagreementTemplates_get (toolset serviceReports)

Parameters

NameInTypeRequiredDescription
agreementTemplateIdpathstringYes

Example

curl "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/agreement-templates/{agreementTemplateId}" \
  -H "Authorization: Bearer $SERVFLO_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
idstring
namestring
bodystringSafe HTML; {business} is replaced by the business's name.
serviceTypeIdsarray of string
isDefaultboolean
archivedAtstring (date-time) or null

Update an agreement template

PATCH /organizations/{organizationId}/agreement-templates/{agreementTemplateId}

Changes the fields sent. Agreements already made keep their frozen wording.

PermissionserviceReports.manage (Owner, Admin)
Riskwrite, OAuth scope servflo.write. Write: creates or changes records inside the business; nothing leaves it.
MCP toolagreementTemplates_update (toolset serviceReports)

Parameters

NameInTypeRequiredDescription
agreementTemplateIdpathstringYes

Request body

FieldTypeRequiredDescription
namestringNoUp to 200 characters.
bodystringNoThe wording (safe HTML); {business} becomes the business's name.
serviceTypeIdsarray of stringNoService types this agreement is for. Up to 500 items.
isDefaultbooleanNoUsed for service types without their own.
archivedbooleanNo

Example

curl -X PATCH "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/agreement-templates/{agreementTemplateId}" \
  -H "Authorization: Bearer $SERVFLO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Dana Whitfield","body":"string","serviceTypeIds":["serviceType_id"]}'

Response

200: the answer's fields
FieldTypeDescription
idstring
namestring
bodystringSafe HTML; {business} is replaced by the business's name.
serviceTypeIdsarray of string
isDefaultboolean
archivedAtstring (date-time) or null

Delete an agreement template

DELETE /organizations/{organizationId}/agreement-templates/{agreementTemplateId}

Destructive: deletes the wording. Agreements already sent or signed keep theirs.

PermissionserviceReports.manage (Owner, Admin)
Risksensitive, OAuth scope servflo.sensitive. Sensitive: moves money, deletes, sends or shows something to a customer, or grants or revokes access.
MCP toolagreementTemplates_delete (toolset serviceReports)
ApprovalOver MCP, this tool always waits for your approval in ServFlo. See Approvals.

Parameters

NameInTypeRequiredDescription
agreementTemplateIdpathstringYes

Example

curl -X DELETE "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/agreement-templates/{agreementTemplateId}" \
  -H "Authorization: Bearer $SERVFLO_API_KEY"

Response

200: the answer's fields
FieldTypeDescription
oktrue

On this page