Admin create landlord
Landlords
Admin create landlord
Add a council or housing association to the curated landlords reference list.
POST
Admin create landlord
Overview
Adds a landlord to the curated reference list so it appears in the onboarding landlord autocomplete. Use this to fill gaps the seed data missed, without redeploying.Authentication
Bearer <accessToken> with scope: 'admin' required (requireAdmin).
Role-gated to SUPER and MODERATOR. FINANCE is read-only on the landlords surface.
Request body
| Field | Type | Required | Constraints | Example |
|---|---|---|---|---|
name | string | yes | 1..200 chars, trimmed. Must be unique (case-insensitive). | Leeds City Council |
type | enum | yes | COUNCIL or HOUSING_ASSOCIATION. | COUNCIL |
Response — 201 Created
Returns the created landlord row (id, name, type, active, createdAt, updatedAt). active defaults to true.
Error responses
| Status | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_FAILED | Missing/blank name, or type not in the allowed set. |
| 401 | UNAUTHENTICATED | Missing, malformed, expired, or non-admin-scope token. |
| 403 | FORBIDDEN | Admin authenticated but role is FINANCE (read-only). |
| 409 | STATE_CONFLICT | A landlord with that name already exists. |
Side effects
- Inserts a row into the
landlordscollection. - Writes a
landlord.createdadmin audit-log row.