/v1/facilities/{facility_id}/autopay-attemptsAuthentication
Bearer API key or Facily session, subject to permissions and facility scope.
Authentication and scopeRequest 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 --request GET \
--url 'https://api.staging.facily.ai/v1/facilities/<FACILITY_ID>/autopay-attempts' \
--header "Authorization: Bearer $FACILY_API_KEY"Try a request
Staging · read-onlyExplore your organization with a read-only request to staging.
Parameters
facility_idpath · string | stringrequiredFormat: uuid
statequery · stringDefault: "failed" · Values: "failed", "suspended", "scheduled"
limitquery · integerDefault: 100 · Minimum: 1 · Maximum: 200
Responses
Expand a status to inspect its schema. Generated examples show structure and synthetic values.
200Successful Response
{
"data": [
{
"consecutive_failures": 0,
"enrollment_id": "00000000-0000-4000-8000-000000000001",
"facility_id": "00000000-0000-4000-8000-000000000001",
"lease_id": "00000000-0000-4000-8000-000000000001",
"method_type": "string",
"payment_method_id": "00000000-0000-4000-8000-000000000001",
"state": "failed",
"tenant_id": "00000000-0000-4000-8000-000000000001",
"tenant_name": "string",
"amount": "<VALUE_MATCHING_PATTERN>",
"attempt_kind": "string",
"card_brand": "string"
}
],
"meta": {
"request_id": "string"
},
"pagination": {
"has_more": false,
"limit": 0,
"cursor": "string",
"total_count": 0
},
"metrics": {
"cards": {},
"computed_at": "2026-10-29T12:00:00Z",
"is_stale": false,
"scope": "facility"
}
}application/json
dataAutopayAttemptResponse[]requiredShow data schema
amountstring | nullAmount of the most recent attempt. Null when none has been made.
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
Show amount schema
string | nullAmount of the most recent attempt. Null when none has been made.
Variant 1: string
stringVariant 2: null
nullattempt_kindstring | nullscheduled, retry, or manual, for the most recent attempt.
Show attempt_kind schema
string | nullscheduled, retry, or manual, for the most recent attempt.
Variant 1: string
stringVariant 2: null
nullcard_brandstring | nullCard brand, for a card.
Show card_brand schema
string | nullCard brand, for a card.
Variant 1: string
stringVariant 2: null
nullconsecutive_failuresintegerrequiredDeclines in a row since the last success or cured balance.
enrollment_idstringrequiredThe autopay enrollment this row is about.
Format: uuid
facility_idstringrequiredThe facility of the lease, so a row read under `all` says whose it is.
Format: uuid
failure_reasonstring | nullWhy the most recent attempt failed, in terms suitable for showing to staff.
Show failure_reason schema
string | nullWhy the most recent attempt failed, in terms suitable for showing to staff.
Variant 1: string
stringVariant 2: null
nulllast_attempted_atstring | nullWhen the most recent attempt was made.
Format: date-time
Show last_attempted_at schema
string | nullWhen the most recent attempt was made.
Variant 1: string
stringVariant 2: null
nulllast_fourstring | nullLast four digits of the stored instrument.
Show last_four schema
string | nullLast four digits of the stored instrument.
Variant 1: string
stringVariant 2: null
nulllast_payment_idstring | nullThe most recent attempt's payment record.
Format: uuid
Show last_payment_id schema
string | nullThe most recent attempt's payment record.
Variant 1: string
stringVariant 2: null
nulllease_idstringrequiredThe lease the enrollment charges.
Format: uuid
method_typestringrequiredHow the money would arrive: card or ach.
next_attempt_onstring | nullWhen autopay will try again. Null when no retry is scheduled.
Format: date
Show next_attempt_on schema
string | nullWhen autopay will try again. Null when no retry is scheduled.
Variant 1: string
stringVariant 2: null
nullpayment_method_idstringrequiredThe stored instrument autopay charges.
Format: uuid
statestringrequiredWhich queue this row was listed under.
Values: "failed", "suspended", "scheduled"
suspended_atstring | nullWhen autopay stopped attempting. Null while the enrollment is live.
Format: date-time
Show suspended_at schema
string | nullWhen autopay stopped attempting. Null while the enrollment is live.
Variant 1: string
stringVariant 2: null
nullsuspension_reasonstring | nullWhy it stopped: consecutive_failures, method_removed, staff, or cancelled.
Show suspension_reason schema
string | nullWhy it stopped: consecutive_failures, method_removed, staff, or cancelled.
Variant 1: string
stringVariant 2: null
nulltenant_idstringrequiredThe tenant who gave the mandate.
Format: uuid
tenant_namestringrequiredThe tenant's display name, for the queue row.
unit_numberstring | nullThe unit on the lease, where one is assigned.
Show unit_number schema
string | nullThe unit on the lease, where one is assigned.
Variant 1: string
stringVariant 2: null
nullmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequiredmetricsEmbeddedMetrics | nullShow metrics schema
EmbeddedMetrics | nullVariant 1: EmbeddedMetrics
cardsobjectrequiredcomputed_atstring | nullrequiredFormat: date-time
Show computed_at schema
string | nullVariant 1: string
stringVariant 2: null
nullis_stalebooleanrequiredscopestringrequiredValues: "facility", "portfolio"
Variant 2: null
nullpaginationPaginationBlockrequiredPagination metadata for list responses.
Show pagination schema
cursorstring | nullShow cursor schema
string | nullVariant 1: string
stringVariant 2: null
nullhas_morebooleanrequiredlimitintegerrequiredtotal_countinteger | nullShow total_count schema
integer | nullVariant 1: integer
integerVariant 2: null
null400Validation error
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired401Unauthenticated
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired403Permission denied
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired404Not found
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired409Business logic error
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired503Temporary failure
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired