Incident Report: AgentOS API URL Path Misalignment (v0.1.64)
Incident Report: AgentOS API URL Path Misalignment
Severity: Critical
Version Identified: v0.1.64
Affected Files:src/lib/letmc/*.ts
Status: Fix Required
Summary
A systematic URL path misalignment has been discovered across all outbound AgentOS API service calls in src/lib/letmc/*.ts. Every service file is constructing endpoint URLs using an incorrect /v3/{shortName}/lettings/... or /v3/{shortName}/sales/... structure that does not match the paths expected by live-api.letmc.com.
As a result, virtually every portal feature — landlord dashboards, tenant views, company verification, settings, messaging, and affiliate links — will receive 404 Not Found responses from the live AgentOS API.
Background
The myProp portal integrates with AgentOS via a set of outbound HTTP calls defined in the original Lambda endpoint specification. Those spec paths follow the pattern:
/{clientName}/{entity}/{entityID}/...
The service files in src/lib/letmc/*.ts were built using a different URL convention — one that includes a /v3/ API version prefix and domain-partitioned namespaces (/lettings/, /sales/) that do not exist in the target API.
Detailed Breakdown
URL Structure Comparison
# What the code currently sends:
GET /v3/{shortName}/lettings/landlords/{id}/properties
GET /v3/{shortName}/company
GET /v3/{shortName}/settings/overrides
GET /v3/{shortName}/advertising/affiliatelinks/{personType}
# What the AgentOS API expects:
GET /{clientName}/landlord/{LandlordID}/insights
GET /{clientName}/company/verify
GET /{clientName}/overrides
GET /{clientName}/affiliates/{personType}
Full Endpoint Mapping
| Domain | Incorrect (Built) | Correct (Spec) |
|---|---|---|
| Landlord insights | /v3/{shortName}/lettings/landlords/{id}/properties | /{clientName}/landlord/{LandlordID}/insights |
| Landlord tenancies | /v3/{shortName}/lettings/landlords/{id}/... | /{clientName}/landlord/{LandlordID}/tenancies |
| Tenant details | (non-conformant) | /{clientName}/tenant/{tenantID}/ |
| Company verify | /v3/{shortName}/company | /{clientName}/company/verify |
| Overrides/settings | /v3/{shortName}/settings/overrides | /{clientName}/overrides |
| Messaging notes | (non-conformant) | /{clientName}/messaging/notes/{userID}/{offset}/{count}/ |
| Affiliate links | /v3/{shortName}/advertising/affiliatelinks/{personType} | /{clientName}/affiliates/{personType} |
| Payment requests | /{clientName}/payments/requests/{personID} | /{clientName}/payments/requests/{personID} ✅ |
The payments endpoint is the only endpoint confirmed to be correct.
Required Fix
All service files under src/lib/letmc/*.ts must be updated to match the original Lambda outbound endpoint specification exactly.
Rules to Apply
- Remove the
/v3/prefix. No AgentOS endpoint uses a versioned prefix. - Remove
/lettings/and/sales/segments. These namespace segments do not exist in the spec. - Use the correct entity path structure. Replace constructed resource paths with the exact paths from the spec:
// ❌ Before
`/v3/${shortName}/lettings/landlords/${id}/properties`
// ✅ After
`/${clientName}/landlord/${LandlordID}/insights`
// ❌ Before
`/v3/${shortName}/company`
// ✅ After
`/${clientName}/company/verify`
// ❌ Before
`/v3/${shortName}/settings/overrides`
// ✅ After
`/${clientName}/overrides`
// ❌ Before
`/v3/${shortName}/advertising/affiliatelinks/${personType}`
// ✅ After
`/${clientName}/affiliates/${personType}`
// ❌ Before (messaging — non-conformant)
// ✅ After
`/${clientName}/messaging/notes/${userID}/${offset}/${count}/`
- Do not modify
/{clientName}/payments/requests/{personID}— this is already correct.
Portal Features Affected
All portal features are blocked until this fix is applied:
- 🔴 Landlord dashboard — tenancies, property insights, financial statements
- 🔴 Tenant portal — tenancy details, rent statements, maintenance
- 🔴 Agency/company verification — login and session bootstrap will fail
- 🔴 Settings & overrides — portal configuration will not load
- 🔴 Messaging & notes — all communication features unavailable
- 🔴 Affiliate links — buyer/vendor/landlord contact resolution broken
- 🟢 Payment requests — unaffected
Testing After Fix
After updating all service files, verify each corrected endpoint against live-api.letmc.com using a valid {clientName} and entity ID. Confirm that:
/{clientName}/company/verifyreturns a200response/{clientName}/landlord/{LandlordID}/tenanciesreturns tenancy data/{clientName}/tenant/{tenantID}/returns tenant detail/{clientName}/overridesreturns the agency configuration/{clientName}/affiliates/{personType}returns affiliate link data/{clientName}/messaging/notes/{userID}/{offset}/{count}/returns notes
References
- Original Lambda outbound endpoint specification
src/lib/letmc/*.ts— all service files require changeslive-api.letmc.com— target AgentOS API host