Life of a request
One click in an App, followed from the button to the Action, the Event, the webhook, the Meter and the invoice line.
Every click in an App is a call to its API, and every call becomes one Action. Leaseline declares a Lease Noun; follow one renewal from the button to the invoice.
The click
Ines Duarte manages leases for Harbor Residential. She opens the lease for Unit 5C,, which ends on 2026-11-05, and presses Renew. The button is the form for Lease.renew, compiled from the Verb's inputs: 12 months, rent up 3%.
The App sends the same call any other client sends. Harbor Residential's property software makes it too:
curl -X POST https: //api.leaseline.app/ leases/ lease_4loEed1JG4/ renew \
-H "Authorization: Bearer $LEASELINE_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"months": 12, "increase": 0.03}'Who may
Three checks run before anything changes, in this order:
- The key or the session belongs to Harbor Residential's Tenant, and so does the lease. No query crosses Tenants.
- Ines Duarte holds the
managerPersona, whose Role has the Permission to callLease.renew. - Harbor Residential's
portfolioplan holds an Entitlement toLease.renewwith no cap.
A failed check returns a refused Action naming the check, and nothing else happens. On a capped plan, the refusal names the plan that lifts the cap.
The Action
The Verb's Function runs, moves the lease from renewing to renewed, and records one Action: done. The Action keeps who acted, for whom, through which Interface, with which key, and at which Version of the definition.
{
"api": "https: //api.leaseline.app",
"lease": {
"$id": "https: //api.leaseline.app/ leases/ lease_4loEed1JG4",
"$type": "Lease",
"unit": "Unit 5C, 76 Harbor Way",
"endsOn": "2027-11-05",
"status": "renewed"
},
"action": {
"$id": "https: //api.leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Lease.renew",
"status": "done"
}
}A person's click and an Agent's call leave the same record. Only by and via differ.
What follows
The Action's Event, Lease.renewed, fans out to everything that waits on it:
| Who reads it | What happens |
|---|---|
| Harbor Residential's webhook endpoint | Receives the Event, signed Leaseline-Signature |
| Every open screen on that lease | Updates live, with no reload |
| A Meter, when the plan meters renewals | Counts one, from done Actions only |
| The audit log | Shows the Action to Harbor Residential's admins |
| The Success Manager agent | Stops sending renewal reminders for that unit |
A refused or failed call never reaches a Meter, so it never reaches an Invoice.
Next
The App lifecycle covers how a change to the App itself goes live.