Download OpenAPI specification:
API for integration with Homebase360 customer and job management system
Simple endpoint to verify API key authentication is working correctly. Returns basic information about the authenticated business account.
curl -X GET "https://us-central1-homebase-360.cloudfunctions.net/api/v1/ping" \ -H "x-api-key: your-api-key-here" \ -H "Content-Type: application/json"
{- "success": true,
- "data": {
- "message": "API authentication successful",
- "email": "your-business-email@example.com",
- "timestamp": "2023-11-07T19:43:00.000Z"
}
}Retrieves customer information based on search criteria. Multiple search parameters can be combined and will return customers matching ANY of the provided criteria (logical OR). If no criteria is provided, returns empty array.
| customerId | string Example: customerId=Ekk9AvDeDihAEU8CMT0W Specific customer ID to look for |
| phone | string Example: phone=+13031234567 Customer's mobile phone number (E.164 format, e.g. +13038284444) |
string Example: email=john.smith@example.com Customer's email address | |
| identifiers | string Example: identifiers=abc123,+13038284444,john@example.com Comma-separated list of customer IDs, phone numbers, or email addresses (max 100 identifiers) |
| limit | integer <= 100 Default: 25 Example: limit=50 Maximum number of results to return (max 100, default 25) |
curl -X GET "https://us-central1-homebase-360.cloudfunctions.net/api/v1/customers?customerId=Ekk9AvDeDihAEU8CMT0W" \ -H "x-api-key: your-api-key-here" \ -H "Content-Type: application/json"
{- "success": true,
- "data": [
- {
- "customerId": "Ekk9AvDeDihAEU8CMT0W",
- "businessId": "xsUrbqrcTQSyFjJOtpEZyC0BUUK2",
- "firstName": "John",
- "lastName": "Smith",
- "displayName": "John Smith",
- "phone": {
- "mobile": "+13038284444",
- "home": "+13035551234",
- "work": "+13037778888",
- "additional": "+13039990000",
- "property1": "string",
- "property2": "string"
}, - "email": [
- "john.smith@example.com"
], - "address": [
- "123 Main St, Denver, CO 80202"
], - "notifications": true,
- "notes": "Prefers afternoon appointments",
- "tags": [
- "VIP",
- "Referral"
], - "attachments": [ ],
- "dateAdded": "2023-04-15T10:30:00Z",
- "lastUpdated": "2023-04-20T15:45:00Z",
- "lastJob": "2023-04-18T09:00:00Z"
}
]
}Creates a new customer with the provided information. Requires at least firstName or lastName, and at least one contact method (phone or email).
| firstName | string Customer's first name |
| lastName | string Customer's last name |
object (Phone) All phone numbers must be in E.164 format (e.g. +13038284444) | |
Array of strings List of email addresses (max 2). Can also provide as comma or semicolon-separated string. | |
| address | Array of strings List of physical addresses (max 2). Can also provide as semicolon or asterisk-separated string. |
| notes | string Default: "" Additional notes about the customer |
| tags | Array of strings Tags for categorization. Can also provide as comma, semicolon, or asterisk-separated string. |
| notifications | boolean Default: true Whether the customer should receive notifications |
{- "firstName": "John",
- "lastName": "Smith",
- "phone": {
- "mobile": "+13038284444",
- "home": "+13035551234"
}, - "email": [
- "john.smith@example.com"
], - "address": [
- "123 Main St, Denver, CO 80202"
], - "notes": "Prefers afternoon appointments",
- "tags": [
- "VIP",
- "Referral"
], - "notifications": true
}{- "success": true,
- "data": {
- "customerId": "Ekk9AvDeDihAEU8CMT0W"
}
}Updates an existing customer's information
| customerId required | string ID of the customer to update |
| firstName | string Customer's first name |
| lastName | string Customer's last name |
object (Phone) All phone numbers must be in E.164 format (e.g. +13038284444) | |
Array of strings List of email addresses | |
| address | Array of strings List of physical addresses |
| notes | string Additional notes about the customer |
| tags | Array of strings Tags for categorization |
| notifications | boolean Whether the customer should receive notifications |
{- "firstName": "John",
- "lastName": "Smith Updated",
- "phone": {
- "mobile": "+13038284444"
}, - "notes": "Updated notes",
- "notifications": false
}{- "success": true,
- "data": {
- "message": "Customer updated"
}
}Retrieves jobs based on search criteria. If no criteria provided, returns the current day's jobs.
| jobId | string Specific job ID to look for |
| startDate | string <date-time> Start date in ISO 8601 format (e.g. "2023-05-15T00:00:00Z") - jobs starting on/after this date |
| endDate | string <date-time> End date in ISO 8601 format (e.g. "2023-05-15T23:59:59Z") - jobs starting on/before this date |
| limit | integer <= 100 Default: 50 Maximum number of results to return (max 100) |
{- "success": true,
- "data": [
- {
- "jobId": "jKv8AvFrRihBTU7CMQ9Z",
- "businessId": "xsUrbqrcTQSyFjJOtpEZyC0BUUK2",
- "customerId": "Ekk9AvDeDihAEU8CMT0W",
- "customer": {
- "customerId": "Ekk9AvDeDihAEU8CMT0W",
- "businessId": "xsUrbqrcTQSyFjJOtpEZyC0BUUK2",
- "firstName": "John",
- "lastName": "Smith",
- "displayName": "John Smith",
- "phone": {
- "mobile": "+13038284444",
- "home": "+13035551234",
- "work": "+13037778888",
- "additional": "+13039990000",
- "property1": "string",
- "property2": "string"
}, - "email": [
- "john.smith@example.com"
], - "address": [
- "123 Main St, Denver, CO 80202"
], - "notifications": true,
- "notes": "Prefers afternoon appointments",
- "tags": [
- "VIP",
- "Referral"
], - "attachments": [ ],
- "dateAdded": "2023-04-15T10:30:00Z",
- "lastUpdated": "2023-04-20T15:45:00Z",
- "lastJob": "2023-04-18T09:00:00Z"
}, - "lineItems": [
- {
- "name": "Window Cleaning",
- "description": "Cleaning all windows",
- "quantity": 1,
- "unitPrice": "150.00",
- "taxRate": {
- "name": "Standard",
- "rate": "7.00"
}, - "saveHidden": true
}
], - "start": "2023-05-15T14:30:00Z",
- "end": "2023-05-15T16:30:00Z",
- "jobTotal": 160.5,
- "note": "Please call customer before arrival",
- "timezone": "America/New_York",
- "isRecurring": false,
- "dateAdded": "2023-04-15T10:30:00Z",
- "lastUpdated": "2023-04-20T15:45:00Z"
}
]
}Creates a new job associated with a customer
| customerId required | string Customer ID (must exist in your account) |
| start required | string <date-time> Start date and time in ISO 8601 format |
| end required | string <date-time> End date and time in ISO 8601 format (must be after start) |
required | Array of objects (LineItem) non-empty List of items/services for the job (minimum 1 item required) |
| note | string Default: "" Note for the job (optional) |
LeadSource (string) or object Lead source information (optional). Accepts string format or legacy object format for backwards compatibility |
{- "customerId": "Ekk9AvDeDihAEU8CMT0W",
- "start": "2023-05-15T14:30:00Z",
- "end": "2023-05-15T16:30:00Z",
- "lineItems": [
- {
- "name": "Window Cleaning",
- "description": "Cleaning all windows",
- "quantity": 1,
- "unitPrice": "150.00",
- "taxRate": {
- "name": "Standard",
- "rate": "7.00"
}
}
], - "note": "Please call customer before arrival"
}{- "success": true,
- "data": {
- "jobId": "jKv8AvFrRihBTU7CMQ9Z"
}
}Updates an existing job's information
| jobId required | string ID of the job to update |
| start | string <date-time> New start date and time in ISO 8601 format |
| end | string <date-time> New end date and time in ISO 8601 format |
| note | string New note for the job |
{- "start": "2023-05-15T15:00:00Z",
- "end": "2023-05-15T17:00:00Z",
- "note": "Customer requested a later time"
}{- "success": true,
- "data": {
- "message": "Job updated"
}
}Retrieves leads based on search criteria. Returns non-archived leads matching the provided filters.
| leadId | string Fetch a specific lead by ID |
| customerId | string Fetch all leads for a specific customer |
| status | string Enum: "new" "first_contact" "second_contact" "third_contact" "on_hold" Filter by lead status |
| limit | integer <= 100 Default: 25 Maximum number of results to return |
curl -X GET "https://us-central1-homebase-360.cloudfunctions.net/api/v1/leads?status=new&limit=10" \ -H "x-api-key: your-api-key-here" \ -H "Content-Type: application/json"
{- "success": true,
- "data": [
- {
- "leadId": "abc123",
- "leadNumber": 42,
- "customer": {
- "customerId": "Ekk9AvDeDihAEU8CMT0W",
- "businessId": "xsUrbqrcTQSyFjJOtpEZyC0BUUK2",
- "firstName": "John",
- "lastName": "Smith",
- "displayName": "John Smith",
- "phone": {
- "mobile": "+13038284444",
- "home": "+13035551234",
- "work": "+13037778888",
- "additional": "+13039990000",
- "property1": "string",
- "property2": "string"
}, - "email": [
- "john.smith@example.com"
], - "address": [
- "123 Main St, Denver, CO 80202"
], - "notifications": true,
- "notes": "Prefers afternoon appointments",
- "tags": [
- "VIP",
- "Referral"
], - "attachments": [ ],
- "dateAdded": "2023-04-15T10:30:00Z",
- "lastUpdated": "2023-04-20T15:45:00Z",
- "lastJob": "2023-04-18T09:00:00Z"
}, - "status": "new",
- "lineItems": [
- {
- "name": "Window Cleaning",
- "description": "Cleaning all windows",
- "quantity": 1,
- "unitPrice": "150.00",
- "taxRate": {
- "name": "Standard",
- "rate": "7.00"
}, - "saveHidden": true
}
], - "note": "Customer interested in monthly service",
- "leadSource": "Online",
- "dateAdded": "2023-05-15T14:30:00Z",
- "lastUpdated": "2023-05-15T14:30:00Z"
}
]
}Creates a new lead with smart customer lookup/creation. This intelligent endpoint handles three scenarios:
Scenario 1: Existing Customer by ID
Provide the customerId field to create a lead for an existing customer. Returns 404 if customer not found.
Scenario 2: Phone-based Lookup/Merge
Provide customer details including phone.mobile. The API will:
Scenario 3: New Customer
Provide customer details without customerId or phone.mobile. The API will:
You can either provide a customerId, or a name and a contact method: firstName/lastName and any-phone/email.
| customerId | string Method 1: Existing customer ID |
| firstName | string Method 2: Customer's first name (at least firstName or lastName required if using customer details) |
| lastName | string Method 2: Customer's last name (at least firstName or lastName required if using customer details) |
object (Phone) All phone numbers must be in E.164 format (e.g. +13038284444) | |
Array of strings Method 2: List of email addresses | |
| address | Array of strings Method 2: List of physical addresses |
| notes | string Method 2: Additional notes about the customer |
| tags | Array of strings Method 2: Tags for categorization |
| notifications | boolean Method 2: Whether customer should receive notifications |
Array of objects (LineItem) Array of line items (optional for leads) | |
| note | string Note about the lead |
| leadSource | string (LeadSource) Source of the lead. Use "Online" for online sources, "Direct" for direct contact/referrals, or provide a custom source name (e.g., "Facebook Ad", "Google Ads", "Referral Partner"). Custom sources will be automatically created and associated with your business. |
| status | string Default: "new" Enum: "new" "first_contact" "second_contact" "third_contact" "on_hold" Initial status of the lead |
| assignedTo | Array of strings Array of employee IDs to assign the lead to |
{- "customerId": "Ekk9AvDeDihAEU8CMT0W",
- "lineItems": [
- {
- "name": "Window Cleaning",
- "description": "All windows",
- "quantity": 1,
- "unitPrice": "150.00"
}
], - "note": "Customer interested in monthly service",
- "leadSource": "Online",
- "status": "new"
}{- "success": true,
- "data": {
- "leadId": "lead789",
- "customerId": "cust456",
- "leadNumber": 43
}
}Updates an existing lead's information. Only non-archived leads can be updated.
| leadId required | string ID of the lead to update |
| status | string Enum: "new" "first_contact" "second_contact" "third_contact" "on_hold" Updated lead status |
| note | string Updated note for the lead |
Array of objects (LineItem) Replacement array of line items | |
| assignedTo | Array of strings Replacement array of employee IDs |
| leadSource | string (LeadSource) Source of the lead. Use "Online" for online sources, "Direct" for direct contact/referrals, or provide a custom source name (e.g., "Facebook Ad", "Google Ads", "Referral Partner"). Custom sources will be automatically created and associated with your business. |
{- "status": "first_contact",
- "note": "Called customer, discussed options. Following up next week."
}{- "success": true,
- "data": {
- "message": "Lead updated"
}
}Sends an SMS or MMS message to a customer's mobile phone. Requires an active Enterprise subscription. Subject to daily rate limits (500 SMS/day).
Provide either mobilePhone or customerId (or both):
phone.mobile of an existing customerphone.mobile on filemobilePhone must match the customer's phone.mobile| mobilePhone | string Customer's mobile phone in E.164 format. Must belong to an existing customer. |
| customerId | string Customer ID. Customer must have a mobile phone on file. |
| message | string <= 200 characters Message text. Max 200 characters. Required if no mediaUrl. |
| mediaUrl | string <uri> HTTPS URL of media to send as MMS. Required if no message. |
{- "mobilePhone": "+13031234444",
- "message": "Your appointment is confirmed for tomorrow at 2pm"
}{- "success": true,
- "data": {
- "mobilePhone": "+13031234444",
- "customerId": "abc123",
- "timestamp": "2024-01-15T14:30:00.000Z",
- "rateLimits": {
- "dailyUsed": 5,
- "dailyLimit": 500
}
}
}Returns the current messaging usage stats and daily rate limits for the business.
curl -X GET "https://us-central1-homebase-360.cloudfunctions.net/api/v1/messages/stats" \ -H "x-api-key: your-api-key-here" \ -H "Content-Type: application/json"
{- "success": true,
- "data": {
- "limits": {
- "perDay": 500
}, - "usage": {
- "dailyUsed": 50,
- "dailyRemaining": 450
}
}
}