Skip to content
FacilydevelopersDashboard
Build with Facily
DocsREST APIsEnroll Lease Autopay
Search the full API reference Esc to close

Enroll Lease Autopay

Leases · REST API reference

Get support
POST/v1/leases/{lease_id}/autopay
Enroll the lease in autopay (spec 10.1).

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/leases/<LEASE_ID>/autopay' \
  --header "Authorization: Bearer $FACILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "consent_version": "string",
  "payment_method_id": "00000000-0000-4000-8000-000000000001",
  "charge_day_offset": 0,
  "max_amount": 0
}'
An example for building your request, not an executed call. Check required fields, allowed values, and environment configuration before sending.

Parameters

lease_idpath · stringrequired

Format: uuid

Request body

application/json · Required

charge_day_offsetinteger

Days after the due date to charge. 0 charges on the due date.

Default: 0 · Minimum: 0 · Maximum: 28

consent_versionstringrequired

Identifier of the autopay disclosure text the tenant agreed to, e.g. autopay-2026-09.

Min length: 1 · Max length: 50

max_amountnumber | string | null

Optional per-attempt cap. Must be at least the lease's rent; null means no cap.

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

Show max_amount schema
number | string | null

Optional per-attempt cap. Must be at least the lease's rent; null means no cap.

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

Stored method to charge. Must belong to this lease's tenant and be chargeable.

Format: uuid

Responses

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

200Successful Response
JSON · generated example
{
  "data": {
    "charge_day_offset": 0,
    "consecutive_failures": 0,
    "enrolled_at": "2026-10-29T12:00:00Z",
    "id": "00000000-0000-4000-8000-000000000001",
    "is_active": false,
    "lease_id": "00000000-0000-4000-8000-000000000001",
    "payment_method_id": "00000000-0000-4000-8000-000000000001",
    "tenant_id": "00000000-0000-4000-8000-000000000001",
    "consent_version": "string",
    "consented_at": "2026-10-29T12:00:00Z",
    "last_charge_at": "2026-10-29T12:00:00Z",
    "last_charge_status": "string"
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

dataAutopayEnrollmentResponserequired
Show data schema
charge_day_offsetintegerrequired
consecutive_failuresintegerrequired
consent_versionstring | null
Show consent_version schema
string | null
Variant 1: string
string
Variant 2: null
null
consented_atstring | null

Format: date-time

Show consented_at schema
string | null
Variant 1: string
string
Variant 2: null
null
enrolled_atstringrequired

Format: date-time

idstringrequired

Format: uuid

is_activebooleanrequired
last_charge_atstring | null

Format: date-time

Show last_charge_at schema
string | null
Variant 1: string
string
Variant 2: null
null
last_charge_statusstring | null
Show last_charge_status schema
string | null
Variant 1: string
string
Variant 2: null
null
lease_idstringrequired

Format: uuid

max_amountstring | null

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

Show max_amount schema
string | null
Variant 1: string
string
Variant 2: null
null
next_attempt_onstring | null

Format: date

Show next_attempt_on schema
string | null
Variant 1: string
string
Variant 2: null
null
payment_method_idstringrequired

Format: uuid

suspended_atstring | null

Format: date-time

Show suspended_at schema
string | null
Variant 1: string
string
Variant 2: null
null
suspension_reasonstring | null
Show suspension_reason schema
string | null
Variant 1: string
string
Variant 2: null
null
tenant_idstringrequired

Format: uuid

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 leases operations
Build something that works beautifully.

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

Enroll Lease Autopay | Facily Developers