Developer API

MyBusinessTree API

Build on a foundation of verified trust. Access business listings, blockchain-backed reviews, PoP scores, fraud detection, and more through our REST API.

Quick Start

Make your first API call in seconds.

cURL

bash
curl -X GET https://mybusinesstree.com/api/businesses \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

JavaScript / Fetch

javascript
const res = await fetch(
  "https://mybusinesstree.com/api/businesses",
  {
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json",
    },
  }
);

const data = await res.json();
console.log(data.businesses);

Example Response

json
{
  "businesses": [
    {
      "id": "biz_abc123",
      "name": "Sunrise Coffee Co.",
      "slug": "sunrise-coffee-co",
      "category": "Food & Beverage",
      "popScore": 87,
      "reviewCount": 142,
      "verified": true
    }
  ],
  "total": 1,
  "page": 1
}

API Endpoints

Explore our full suite of APIs. Click any category to view its endpoints.

Code Examples

Common patterns for integrating with our platform.

Submit a Review

javascript
const response = await fetch(
  "https://mybusinesstree.com/api/reviews",
  {
    method: "POST",
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      businessId: "biz_abc123",
      rating: 5,
      title: "Outstanding service",
      body: "Friendly staff, great quality...",
      verificationMethod: "receipt",
    }),
  }
);

// Review is recorded on Empire Chain automatically
const { review, chainHash } = await response.json();

Verify a Chain Record

javascript
const hash = "0x3a7f...c9e1";
const res = await fetch(
  `https://mybusinesstree.com/api/chain/verify/${hash}`,
  {
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
    },
  }
);

const { valid, block, timestamp } = await res.json();
console.log(valid); // true β€” record is intact

Authentication

MyBusinessTree uses two forms of authentication depending on the context:

API Keys

For server-to-server integrations. Generate keys from your developer dashboard. Pass via the Authorization: Bearer header.

Clerk Session Tokens

For client-side and user-facing integrations. Uses Clerk for identity management with session-based tokens. Ideal for frontend apps.

bash
# API Key authentication
curl -H "Authorization: Bearer mbt_live_abc123..." \
  https://mybusinesstree.com/api/businesses

# Clerk session (frontend SDK handles this)
# Session tokens are attached automatically
# when using the Clerk provider

Rate Limits

Fair usage limits keep the platform fast and reliable for everyone.

TierRequests / minRequests / dayBurst
Seed (Free)301,00010
Sprout605,00020
Growth12025,00050
Harvest300100,000100
Canopy600Unlimited200

Rate limit headers (X-RateLimit-Remaining, X-RateLimit-Reset) are included in every response. If you exceed limits, you will receive a 429 Too Many Requests response.

Ready to Build on Verified Trust?

Get started with our API today. Create your developer account, generate an API key, and start integrating blockchain-backed trust into your application.