Code Examples

    Working requests for every core capability

    Copy-paste examples in curl, TypeScript, and Python for the most common URBLD workflows: creating leads, booking jobs, issuing invoices, and reading events.

    What are the most common URBLD API workflows?

    Create a lead, book an appointment, generate an estimate, send a contract for signature, convert a signed contract into a job, issue an invoice, and record a payment. All seven fit into a single sequence of API calls under one lifecycle_number.

    Create a lead

    bash
    curl -X POST https://api.urbld.com/v1/leads \
      -H "Authorization: Bearer $TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "Jane Homeowner",
        "phone": "+15551234567",
        "email": "jane@example.com",
        "source": "google_ads",
        "service_needed": "roof_replacement",
        "address": "123 Elm St, Austin, TX 78701"
      }'

    Book an appointment

    ts
    const res = await fetch("https://api.urbld.com/v1/appointments", {
      method: "POST",
      headers: {
        Authorization: `Bearer ${token}`,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        lead_id: leadId,
        starts_at: "2026-07-10T14:00:00-05:00",
        duration_minutes: 60,
        assigned_to: "user_01HABC",
        type: "estimate",
      }),
    });
    const appointment = await res.json();

    Generate an estimate

    python
    estimate = requests.post(
        "https://api.urbld.com/v1/estimates",
        headers={"Authorization": f"Bearer {token}"},
        json={
            "customer_id": customer_id,
            "line_items": [
                {"description": "Asphalt shingle replacement", "quantity": 22, "unit": "square", "unit_price": 425},
                {"description": "Underlayment", "quantity": 22, "unit": "square", "unit_price": 45},
            ],
            "tax_rate": 0.0825,
        },
        timeout=10,
    ).json()

    Ask Jarvis (AI manager)

    bash
    curl -X POST https://api.urbld.com/v1/jarvis/ask \
      -H "Authorization: Bearer $TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "prompt": "How many leads are unassigned older than 24 hours?",
        "channels": ["dashboard"]
      }'

    Jarvis is grounded — it must call internal tools for every count or list and cannot hallucinate metrics. See the Jarvis feature page.

    Send an SMS via the unified inbox

    ts
    await fetch("https://api.urbld.com/v1/messages", {
      method: "POST",
      headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json" },
      body: JSON.stringify({
        channel: "sms",
        to_customer_id: customerId,
        body: "Hi Jane — confirming your estimate visit tomorrow at 2pm.",
      }),
    });
    FAQ

    Frequently Asked Questions

    Straight answers about how URBLD runs the business end-to-end.