POST
/
api
/
v1
/
admin
/
landlords
Admin create landlord
curl --request POST \
  --url https://api.example.com/api/v1/admin/landlords
import requests

url = "https://api.example.com/api/v1/admin/landlords"

response = requests.post(url)

print(response.text)
const options = {method: 'POST'};

fetch('https://api.example.com/api/v1/admin/landlords', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/admin/landlords",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.example.com/api/v1/admin/landlords"

req, _ := http.NewRequest("POST", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/admin/landlords")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/api/v1/admin/landlords")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body

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

FieldTypeRequiredConstraintsExample
namestringyes1..200 chars, trimmed. Must be unique (case-insensitive).Leeds City Council
typeenumyesCOUNCIL or HOUSING_ASSOCIATION.COUNCIL
{
  "name": "Leeds City Council",
  "type": "COUNCIL"
}

Response — 201 Created

Returns the created landlord row (id, name, type, active, createdAt, updatedAt). active defaults to true.
{
  "id": "665f0a1b2c3d4e5f60718293",
  "name": "Leeds City Council",
  "type": "COUNCIL",
  "active": true,
  "createdAt": "2026-06-05T10:00:00.000Z",
  "updatedAt": "2026-06-05T10:00:00.000Z"
}

Error responses

StatusCodeMeaning
400VALIDATION_FAILEDMissing/blank name, or type not in the allowed set.
401UNAUTHENTICATEDMissing, malformed, expired, or non-admin-scope token.
403FORBIDDENAdmin authenticated but role is FINANCE (read-only).
409STATE_CONFLICTA landlord with that name already exists.

Side effects

  • Inserts a row into the landlords collection.
  • Writes a landlord.created admin audit-log row.

See also

curl

curl -X POST "https://api.swappr.co.uk/api/v1/admin/landlords" \
  -H "Authorization: Bearer $ADMIN_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Leeds City Council", "type": "COUNCIL" }'