Enroll the authenticated tenant in autopay
POST
/api/portal/autopay
const url = 'https://api.getvespy.com/api/portal/autopay';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"authorizationLanguageVersion":"example","leaseId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","paymentMethodId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.getvespy.com/api/portal/autopay \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "authorizationLanguageVersion": "example", "leaseId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "paymentMethodId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
authorizationLanguageVersion
required
string
leaseId
required
string format: uuid
paymentMethodId
required
string format: uuid
Examplegenerated
{ "authorizationLanguageVersion": "example", "leaseId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "paymentMethodId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”Default Response
Media typeapplication/json
object
autopay
required
object
amountStrategy
required
string
createdAt
required
string format: date-time
dayOfMonth
required
integer
fixedAmountCents
required
integer
frequency
required
string
id
required
string format: uuid
leaseId
required
string format: uuid
nextRunAt
required
string format: date-time
paymentMethodId
required
string format: uuid
status
required
string
tenantId
required
string format: uuid
updatedAt
required
string format: date-time
Example
{ "autopay": { "amountStrategy": "balance_due", "frequency": "monthly", "status": "active" }}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}Default Response
Media typeapplication/json
object
code
string
errors
Array<object>
object
code
required
string
message
required
string
path
required
string
message
required
string
Examplegenerated
{ "code": "example", "errors": [ { "code": "example", "message": "example", "path": "example" } ], "message": "example"}