Book a demo Start free trial
Developers

Authentication & scopes

Every request carries an API key as a Bearer token. A key belongs to one agency, holds a list of scopes, and can be limited to an IP range, an expiry date and an environment.

The header

Authorization: Bearer lf_live_k3j9x2mqA7bC9dEfGhIjKlMnOpQrStUvWxYz0123

Keys are never accepted in a query string. A missing, unknown, revoked or expired key, a call from outside the key's IP allow-list, or a key used in the wrong environment all answer 401 as problem+json with a one-line reason.

Two environments

PrefixBound toIssued by
lf_live_…A real agencyThe agency's owner or manager, in Settings → API & webhooks
lf_test_…The sandbox agency onlyLetfold, when a partner request is approved; delivered by a one-time link

A test key can never reach a real agency and a live key can never reach the sandbox: the environment is checked on every call.

Scopes

Each route is guarded by one scope, named resource:read or resource:write. A key that lacks the scope gets 403 naming it. Writes exist only where listed; there are no money writes and no property-identity writes in v1.

GroupScopeGrants
Agency & branchesagency:readRead the agency profile and its branches
Propertiesproperties:readRead properties, marketing details and photos
Landlordslandlords:readRead landlords
Tenantstenants:readRead tenants
Leads (enquiries)leads:readRead enquiries
leads:writeCreate enquiries (POST /leads)
Viewingsviewings:readRead viewings
viewings:writeBook viewings, change status and feedback
Tenanciestenancies:readRead tenancies and rent schedules
Paymentspayments:readRead rent payments and arrears (read-only)
Maintenancemaintenance:readRead repair tickets and their notes
maintenance:writeRaise tickets, change status, add notes
Contractorscontractors:readRead contractors
Documentsdocuments:readList documents and get short-lived download links
documents:writeUpload documents
Certificates & compliancecompliance:readRead safety certificates
compliance:writeAdd safety certificates
Taskstasks:readRead tasks
tasks:writeCreate tasks
Webhookswebhooks:manageManage webhook endpoints and deliveries
Personal datapii:readUnmask email addresses, phone numbers and dates of birth

Personal data

Email addresses, phone numbers, dates of birth and postal addresses of landlords, tenants, leads, viewing attendees and contractors are masked unless the key holds pii:read: "m***@ellery.example", "07*** ***123", null for a date of birth. Every such representation carries "pii_masked": true|false so your code can tell. Ask for pii:read only when you have a lawful basis and a signed data processing agreement.

Restrictions on a key

  • IP allow-list: single addresses or IPv4 CIDR ranges. Calls from anywhere else are refused.
  • Expiry: an optional date after which the key stops working.
  • Developer email: where we send notice of breaking changes and deprecations.

Rolling and revoking

Roll issues a replacement with the same settings; the old key keeps working for 24 hours so you can switch without downtime. Revoke stops a key immediately (401 on the next call). Both are logged in the agency's audit trail, and every write the key makes is stamped source: api:<key name> there too.

Who the key acts as

Inside the agency, API writes are recorded against the agency's owner account with the key's name as the source. Branch-restricted staff accounts are never used, so a key sees the whole agency.