Skip to content
FacilydevelopersDashboard
Build with Facily
DocsREST APIsCreate Fee Rule
Search the full API reference Esc to close

Create Fee Rule

Billing · REST API reference

Get support
POST/v1/facilities/{facility_id}/fee-rules

Authentication

Bearer API key or Facily session, subject to permissions and facility scope.

Authentication and scope

Request example

Replace bracketed path values with real IDs from your environment. The body, where shown, is generated from the schema and uses illustrative values.

cURL
curl --request POST \
  --url 'https://api.staging.facily.ai/v1/facilities/<FACILITY_ID>/fee-rules' \
  --header "Authorization: Bearer $FACILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "code": "string",
  "fee_type": "flat",
  "frequency": "one_time",
  "name": "string",
  "amount": 0,
  "applicable_unit_group_ids": [
    "00000000-0000-4000-8000-000000000001"
  ],
  "facility_ids": [
    "00000000-0000-4000-8000-000000000001"
  ],
  "fee_base": "rent",
  "is_active": true,
  "is_taxable": false,
  "kind": "fee",
  "percentage": 0
}'
An example for building your request, not an executed call. Check required fields, allowed values, and environment configuration before sending.

Parameters

facility_idpath · stringrequired

Format: uuid

Request body

application/json · Required

amountnumber | string | null

Required for flat; refused otherwise.

Pattern: ^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,11}0*$)\d{0,8}\.\d{0,2}0*$)

Show amount schema
number | string | null

Required for flat; refused otherwise.

Variant 1: number
number
Variant 2: string
string
Variant 3: null
null
applicable_unit_group_idsstring[] | null

Unit groups the fee applies to, each in a covered facility; null for all units.

Show applicable_unit_group_ids schema
string[] | null

Unit groups the fee applies to, each in a covered facility; null for all units.

Variant 1: string[]
string[]
Variant 2: null
null
codestringrequired

Product code. Stored upper-case; spaces allowed. Unique among live fees covering a facility.

Min length: 1 · Max length: 50

facility_idsstring[] | null

Facilities the fee applies at. Omit for the facility in the path; [] for every facility (Corporate, needs an organization-wide grant). A non-empty list must include the path facility.

Show facility_ids schema
string[] | null

Facilities the fee applies at. Omit for the facility in the path; [] for every facility (Corporate, needs an organization-wide grant). A non-empty list must include the path facility.

Variant 1: string[]
string[]
Variant 2: null
null
fee_basestring | null

Required for percentage: what the percentage is of.

Values: "rent", "rent_plus_insurance", "rent_plus_all"

Show fee_base schema
string | null

Required for percentage: what the percentage is of.

Variant 1: string
string

Values: "rent", "rent_plus_insurance", "rent_plus_all"

Variant 2: null
null
fee_typestringrequired

flat (a fixed amount), percentage (of fee_base), or custom (amount entered when charged or added).

Values: "flat", "percentage", "custom"

frequencystringrequired

one_time (charged), monthly or annual (added to a lease). Cannot change later; a percentage fee must recur.

Values: "one_time", "monthly", "annual"

is_activeboolean

Turned off stops new attachments; existing ones keep billing.

Default: true

is_taxableboolean

Whether sales tax is charged on this fee.

Default: false

kindstring

fee or service.

Default: "fee" · Values: "fee", "service"

namestringrequired

Description shown to staff and on the ledger line.

Min length: 1 · Max length: 100

percentagenumber | string | null

Required for percentage (above 0, at most 100).

Maximum: 100 · Pattern: ^(?!^[-+.]*$)[+-]?0*(?:\d{0,3}|(?=[\d.]{1,6}0*$)\d{0,3}\.\d{0,2}0*$)

Show percentage schema
number | string | null

Required for percentage (above 0, at most 100).

Variant 1: number
number
Variant 2: string
string
Variant 3: null
null
requiredboolean

Added to every new lease at move-in; staff cannot remove it from one lease. Not for custom.

Default: false

Responses

Expand a status to inspect its schema. Generated examples show structure and synthetic values.

200Successful Response
JSON · generated example
{
  "data": {
    "amount": "<VALUE_MATCHING_PATTERN>",
    "applicable_unit_group_ids": [
      "00000000-0000-4000-8000-000000000001"
    ],
    "code": "string",
    "created_at": "2026-10-29T12:00:00Z",
    "facility_ids": [
      "00000000-0000-4000-8000-000000000001"
    ],
    "fee_base": "string",
    "fee_type": "string",
    "frequency": "string",
    "id": "00000000-0000-4000-8000-000000000001",
    "is_active": false,
    "is_taxable": false,
    "kind": "string",
    "name": "string",
    "percentage": "<VALUE_MATCHING_PATTERN>",
    "required": false
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

dataFeeRuleResponserequired
Show data schema
amountstring | nullrequired

The fixed amount of a flat fee.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

Show amount schema
string | null

The fixed amount of a flat fee.

Variant 1: string
string
Variant 2: null
null
applicable_unit_group_idsstring[] | nullrequired

Unit groups the fee applies to; null for all.

Show applicable_unit_group_ids schema
string[] | null

Unit groups the fee applies to; null for all.

Variant 1: string[]
string[]
Variant 2: null
null
codestringrequired

Product code, upper-case.

created_atstringrequired

When the fee was created.

Format: date-time

facility_idsstring[]required

Facilities the fee applies at. Empty means every facility.

Show facility_ids schema
string
fee_basestring | nullrequired

What a percentage fee is a percentage of.

Show fee_base schema
string | null

What a percentage fee is a percentage of.

Variant 1: string
string
Variant 2: null
null
fee_typestringrequired

flat, percentage, or custom.

frequencystringrequired

one_time, monthly or annual.

idstringrequired

Unique identifier for this fee.

Format: uuid

is_activebooleanrequired

Whether the fee can be added or charged now.

is_taxablebooleanrequired

Whether sales tax is charged on this fee.

kindstringrequired

fee or service.

live_attachment_countinteger

Leases currently carrying this fee.

Default: 0

namestringrequired

Description shown to staff and on the ledger line.

percentagestring | nullrequired

The percentage of a percentage fee.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

Show percentage schema
string | null

The percentage of a percentage fee.

Variant 1: string
string
Variant 2: null
null
requiredbooleanrequired

Added to every new lease at move-in.

metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
400Validation error
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
401Unauthenticated
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
403Permission denied
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
404Not found
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
409Business logic error
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
503Temporary failure
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
Continue exploringAll billing operations
Build something that works beautifully.

Facily API · Contract v1.200 · Reviewed October 29, 2026

Create Fee Rule | Facily Developers