Developer Hub — Kituo cha Waendelezaji

Build on Makazi.io

Unganisha mfumo wako wa mali na soko la Makazi.io. Upload properties in bulk, auto-tag photos with AI, and access real-time market analytics.

API Capabilities

Uwezo wa API

Quickstart Guide

Mwongozo wa Kuanza Haraka

1

Generate an API Key

Go to your API Management page and generate a new key. Copy the key immediately — it's shown only once.

2

Make Your First Request

Tuma ombi lako la kwanza — Send your first request using cURL:

bash
curl -X POST https://makazi.io/api/v1/listings/bulk \
  -H "Content-Type: application/json" \
  -H "X-API-Key: mkz_live_YOUR_KEY_HERE" \
  -d '{
    "listings": [
      {
        "title": "Penthouse ya Kisasa Masaki",
        "description": "3BR penthouse with ocean views...",
        "property_type": "apartment",
        "price": 4500000,
        "currency": "TZS",
        "bedrooms": 3,
        "bathrooms": 2,
        "amenities": ["pool", "gym", "parking"],
        "images": ["https://example.com/img1.jpg"]
      }
    ]
  }'
3

Check the Response

Each listing returns a success/failure result with the listing ID:

json
{
  "summary": {
    "total": 1,
    "succeeded": 1,
    "failed": 0,
    "test_mode": false
  },
  "results": [
    {
      "index": 0,
      "success": true,
      "listing_id": "a1b2c3d4-e5f6-..."
    }
  ]
}

API Reference

Rejea ya API

Endpoints

POST/api/v1/listings/bulk

Create up to 100 listings in a single request

GET/api/v1/listings/bulk

Check API key status and usage statistics

Authentication — Uthibitishaji

All API requests must include an X-API-Key header with your enterprise API key.

HeaderTypeDescription
X-API-KeystringYour mkz_live_ or mkz_test_ key
Content-TypestringMust be application/json

Listing Object Schema

FieldTypeRequiredDescription
titlestringRequiredListing title
descriptionstringRequiredFull description
property_typeenumRequiredapartment, house, studio, room, commercial, land
pricenumberRequiredMonthly rent amount
currencystringOptionalTZS (default) or USD
bedroomsintegerOptionalNumber of bedrooms
bathroomsintegerOptionalNumber of bathrooms
area_sqmnumberOptionalProperty size in square meters
addressstringOptionalStreet address
latitudenumberOptionalGPS latitude
longitudenumberOptionalGPS longitude
amenitiesstring[]OptionalList of amenities (e.g., pool, gym)
imagesstring[]OptionalArray of image URLs
video_urlstringOptionalVideo tour URL
whatsapp_numberstringOptionalContact WhatsApp number
location_iduuidOptionalReference to locations table

Rate Limits & Errors — Mipaka na Makosa

100 listings per request — Split larger batches into multiple calls

60 requests per minute — Per API key rate limit

StatusMeaning
201Created — All or some listings succeeded
400Bad Request — Invalid body or all listings failed
401Unauthorized — Missing or malformed API key
403Forbidden — Key revoked or insufficient tier
429Rate Limited — Too many requests

Code Examples

Mifano ya Msimbo

JSNode.js / JavaScript

javascript
import axios from 'axios';

const MAKAZI_API = 'https://makazi.io/api/v1';
const API_KEY = process.env.MAKAZI_API_KEY;

async function uploadListings(listings) {
  const { data } = await axios.post(
    `${MAKAZI_API}/listings/bulk`,
    { listings },
    { headers: { 'X-API-Key': API_KEY } }
  );

  console.log(`✅ ${data.summary.succeeded} uploaded`);
  console.log(`❌ ${data.summary.failed} failed`);
  return data;
}

PYPython

python
import requests

API_KEY = "mkz_live_YOUR_KEY_HERE"
BASE_URL = "https://makazi.io/api/v1"

response = requests.post(
    f"{BASE_URL}/listings/bulk",
    headers={"X-API-Key": API_KEY},
    json={
        "listings": [
            {
                "title": "Studio Apartment Mikocheni",
                "description": "Modern studio...",
                "property_type": "studio",
                "price": 800000,
                "bedrooms": 1,
                "bathrooms": 1,
            }
        ]
    }
)

data = response.json()
print(f"Uploaded: {data['summary']['succeeded']}")

Tenant Safety Guide

Mwongozo wa Usalama wa Mpangaji

Verify Before You Pay

Thibitisha Kabla ya Kulipa

Always visit the property in person. Never send money before seeing the unit and meeting the landlord face-to-face.

Use Official Receipts

Tumia Risiti Rasmi

Request a signed rental agreement and official receipt for all payments. Keep copies of everything.

Report Suspicious Listings

Ripoti Tangazo Tata

If a deal seems too good to be true, report it. Use the flag button on any listing or contact support.

Know Your Rights

Jua Haki Zako

Under Tanzanian law, landlords must provide a written tenancy agreement. You have the right to a habitable dwelling.

Ready to Build? — Uko Tayari Kujenga?

Get your Enterprise API key and start uploading properties to the largest rental marketplace in Tanzania.

Get Started