DevelopersAPI reference

Organizations API

REST endpoints for organizations 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
Update organizationPATCH /organizations/{organizationId}write
Name the business (first run)POST /organizations/{organizationId}/namewrite
Create logo upload URLPOST /organizations/logo-upload-urlwrite
Your role and permissions in an organizationGET /organizations/{organizationId}/permissionsread
Set the business logo (content in the request)POST /organizations/{organizationId}/logo/contentwrite

Update organization

PATCH /organizations/{organizationId}

Renames the organization (in Base316 first), sets its logo path from POST /organizations/logo-upload-url (null removes it) and/or its IANA timezone (today, overdue dates, the membership scheduler, report days and on-time arrival are counted in it from then on) and/or its trade (what the website builder, the AI receptionist and the pricebook's starter items start from, and what Flo is told; changing it changes no existing records). Returns the organization.

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

Request body

FieldTypeRequiredDescription
namestringNoUp to 64 characters.
logostring or nullNo
timezonestringNoIANA timezone, e.g. America/Chicago. Up to 100 characters.
tradeenumNoThe business's trade, e.g. hvac, plumbing, car-detailing (the website builder's trades), or "other". Starts the pricebook, website and AI receptionist from that trade. One of hvac, plumbing, electrical, roofing, lawn-care, landscaping, tree-care, pest-control, house-cleaning, carpet-cleaning, window-cleaning, pressure-washing, pool-spa, painting, handyman, garage-doors, appliance-repair, locksmith, junk-removal, moving, flooring, remodeling, solar, septic-drain, chimney-fireplace, irrigation, car-detailing, other.

Example

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

Response

200: the answer's fields
FieldTypeDescription
idstring
namestring
needsNamebooleanMade at sign-up with the person's name and not named yet: POST /organizations/{organizationId}/name.
needsPlanbooleanNamed but no plan chosen yet (first run): GET /billing/plan-options, then POST /billing/choose-plan (plan "trial" keeps the free trial).
slugstring
logostring or null
tradestring or nullThe business's trade key (e.g. hvac, car-detailing, "other"); null = not chosen yet.
equipmentLabelsobjectWhat equipment is called here, e.g. Vehicle / Vehicles (GET /equipment-labels).
equipmentLabels.singularstring
equipmentLabels.pluralstring
timezonestringThe business's IANA timezone (e.g. America/Chicago): today, due dates, the scheduler and report days are counted in it.
rolestringThe caller's Base316 role key here: owner, admin, dispatcher, technician or member.
permissionsarray of stringThe caller's effective permissions here.
memberCountinteger

Name the business (first run)

POST /organizations/{organizationId}/name

The first step after sign-up: sets the business's name (in Base316 first) and its timezone, and makes its URL slug from the name. With trade (stored on the business), the pricebook gets that trade's starter services, materials and fees in place of the generic starter items (see POST /pricebook/starter). Naming also queues the business's automatic texting number (bought by the worker in its ServFlo account, included on every plan) and makes ServFlo email its email provider unless one was chosen; neither happens before the business is named. Once named, use PATCH /organizations/{organizationId} to rename (the slug then stays). 409 when the business was named already.

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

Request body

FieldTypeRequiredDescription
namestringYesUp to 64 characters.
timezonestringNoIANA timezone, e.g. America/Chicago. Up to 100 characters.
tradeenumNoThe business's trade, e.g. hvac, plumbing, car-detailing (the website builder's trades), or "other". Starts the pricebook, website and AI receptionist from that trade. One of hvac, plumbing, electrical, roofing, lawn-care, landscaping, tree-care, pest-control, house-cleaning, carpet-cleaning, window-cleaning, pressure-washing, pool-spa, painting, handyman, garage-doors, appliance-repair, locksmith, junk-removal, moving, flooring, remodeling, solar, septic-drain, chimney-fireplace, irrigation, car-detailing, other.

Example

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

Response

200: the answer's fields
FieldTypeDescription
idstring
namestring
needsNamebooleanMade at sign-up with the person's name and not named yet: POST /organizations/{organizationId}/name.
needsPlanbooleanNamed but no plan chosen yet (first run): GET /billing/plan-options, then POST /billing/choose-plan (plan "trial" keeps the free trial).
slugstring
logostring or null
tradestring or nullThe business's trade key (e.g. hvac, car-detailing, "other"); null = not chosen yet.
equipmentLabelsobjectWhat equipment is called here, e.g. Vehicle / Vehicles (GET /equipment-labels).
equipmentLabels.singularstring
equipmentLabels.pluralstring
timezonestringThe business's IANA timezone (e.g. America/Chicago): today, due dates, the scheduler and report days are counted in it.
rolestringThe caller's Base316 role key here: owner, admin, dispatcher, technician or member.
permissionsarray of stringThe caller's effective permissions here.
memberCountinteger

Create logo upload URL

POST /organizations/logo-upload-url

Step 1 of changing the logo: returns a signed URL to PUT a PNG to, and its path. Then save the path with PATCH /organizations/{organizationId} (logo).

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

Request body

FieldTypeRequiredDescription
organizationIdstringYesThe organization whose logo is changing.

Example

curl -X POST "https://app.servflo.ai/api/organizations/logo-upload-url" \
  -H "Authorization: Bearer $SERVFLO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"organizationId":"organization_id"}'

Response

200: the answer's fields
FieldTypeDescription
signedUploadUrlstring (uri)
pathstring

Your role and permissions in an organization

GET /organizations/{organizationId}/permissions

The caller's role in the organization and every permission it grants, with the catalog's descriptions. Check this before attempting writes: a call needing a permission you lack is refused with 403. Read-only.

Permissionorganization.read (Owner, Admin, Dispatcher, Technician, Member)
Riskread, OAuth scope servflo.read. Read: reads only.
MCP toolorganizations_permissions (toolset settings, in the default set)

Example

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

Response

200: the answer's fields
FieldTypeDescription
rolestring
roleNamestring
permissionsarray of string
POST /organizations/{organizationId}/logo/content

Replaces the business's logo in one call: send contentBase64 or a public sourceUrl (a PNG, JPEG or WebP image, up to 10 MB). It appears in the app, on customer pages, quotes and invoices. Returns the logo path.

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

Request body

FieldTypeRequiredDescription
fileNamestringNoThe file's name, e.g. receipt.jpg (default: from the URL, else 'file'). Up to 500 characters.
contentTypestringNoMIME type, e.g. image/jpeg or application/pdf. Optional: taken from a data: URL, the URL's answer or the file's first bytes. Up to 200 characters.
contentBase64stringNoThe file's bytes as base64 (a data: URL is accepted too). Up to 10 MB. Give this or sourceUrl.
sourceUrlstring (uri)NoA public http(s) URL ServFlo downloads the file from (up to 10 MB, 20 s, 3 redirects; private and internal addresses are refused). Give this or contentBase64. Up to 2000 characters.

Example

curl -X POST "https://app.servflo.ai/api/organizations/$ORGANIZATION_ID/logo/content" \
  -H "Authorization: Bearer $SERVFLO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fileName":"string","contentType":"string","contentBase64":"string"}'

Response

200: the answer's fields
FieldTypeDescription
logostringThe logo's storage path (the organization's logo).

On this page