OrganicAgent API Documentation

Build custom integrations, connect Zapier/Make.com, or automate your workflow.

Authentication

All API requests require an API key. Include it in the request header:

X-API-Key: your_api_key_here

Get your API key from Dashboard → Settings → API.

Rate limit: 100 requests per minute per API key.

Leads

POST/api/v1/leads

Create a new lead

Body (JSON):

{
  "name": "John Smith",
  "email": "john@example.com",
  "phone": "(555) 123-4567",
  "source": "zillow",
  "propertyAddress": "123 Main St, Miami, FL",
  "notes": "Interested in 3BR homes"
}

Required: name

Response:

{
  "success": true,
  "leadId": "abc123"
}
GET/api/v1/leads

List leads

Query params: ?status=new&limit=50&offset=0

Response:

{
  "leads": [
    {
      "id": "abc123",
      "name": "John Smith",
      "email": "john@example.com",
      "status": "new"
    }
  ],
  "total": 1
}

Example: Create a lead with curl

curl -X POST https://organicagent.io/api/v1/leads \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key_here" \
  -d '{"name": "Jane Doe", "email": "jane@example.com", "phone": "555-0100"}'

Listings

GET/api/v1/listings

List active listings

Response:

{
  "listings": [
    {
      "id": "lst1",
      "address": "456 Oak Ave, Miami, FL",
      "price": 750000,
      "bedrooms": 4,
      "bathrooms": 3,
      "sqft": 2400
    }
  ]
}

Clients

POST/api/v1/clients

Create a new client

Body (JSON):

{
  "name": "Jane Doe",
  "email": "jane@example.com",
  "phone": "(555) 987-6543"
}

Required: name, email

Response:

{
  "success": true,
  "clientId": "cli456"
}
GET/api/v1/clients

List clients

Response:

{
  "clients": [
    {
      "id": "cli456",
      "name": "Jane Doe",
      "email": "jane@example.com",
      "buyingStage": "Searching"
    }
  ]
}

Webhooks

Register webhooks in Dashboard → Settings → API to receive real-time notifications when events occur.

Available Events

EventDescription
lead.createdA new lead is created (website form, email import, API, guide download)
client.createdA new client signs up or is created via API
listing.createdA new listing is added
showing.requestedA client requests a property showing
client.stage_changedA client's pipeline stage is updated

Webhook Payload

{
  "event": "lead.created",
  "timestamp": "1711234567890",
  "agentId": "sarah-johnson",
  "data": {
    "name": "John Smith",
    "email": "john@example.com",
    "phone": "555-0100",
    "source": "zillow"
  }
}

Signature Verification

Each webhook includes an HMAC-SHA256 signature in the X-OrganicAgent-Signature header. Verify it using your webhook secret:

const crypto = require("crypto");

const signature = crypto
  .createHmac("sha256", webhookSecret)
  .update(JSON.stringify(payload.data) + payload.timestamp)
  .digest("hex");

const isValid = signature === request.headers["x-organicagent-signature"];

Headers included: X-OrganicAgent-Signature, X-OrganicAgent-Timestamp, X-OrganicAgent-Event

Error Responses

StatusMeaning
400Bad request — missing or invalid parameters
401Unauthorized — invalid or missing API key
404Not found
429Rate limited — too many requests
500Server error

OrganicAgent API v1 · Questions? support@organicagent.io