Working with Clients through the API
This guide will walk you through how to create, modify, and retrieve lead and opportunity records using the Builder Prime API. Whether you're integrating Builder Prime into your CRM or just syncing data from another app, this article will help you get started.
Authentication
All API requests must be authenticated using a secret key, which you'll receive from your Builder Prime account. This key should be included in every request:
- Security Header: The secret key must be included in the request headers with the key
x-api-key. - Content Type: For
POSTrequests (Create and Modify), the headerContent-Type: application/jsonis required.
Base URL/endpoint
All requests begin with this format:
https://<builder-prime-subdomain>.builderprime.com/api/clients
Replace <builder-prime-subdomain> with the unique subdomain for your Builder Prime account (provided by your administrator).
For example, for the account customhomes.builderprime.com, the API endpoint would be in the format https://customhomes.builderprime.com/api/clients
Creating a New Client (Lead/Opportunity)
Endpoint:
POST https://<builder-prime-subdomain>.builderprime.com/api/clients/v1
Content-Type: application/json
Example JSON Body:{ "firstName": "John", "lastName": "Smith", "email": "johnsmith3@gmail.com", "mobilePhone": "+18005554444", "addressLine1": "123 Main Street", "city": "Los Angeles", "state": "CA", "zip": "12345", "companyName": "Widgets Galore", "leadStatusName": "Lead Received", "leadSourceName": "Facebook", "salesPersonFirstName": "Alice", "salesPersonLastName": "Thompson", "secretKey": "YOUR_SECRET_KEY", "customFields": [ { "customFieldName": "Budget", "customFieldValue": "5000" }, { "customFieldName": "Referred By", "customFieldValue": "Axl Rose" } ]}
Tips:
-
Phone numbers should be in E.164 format: start with
+followed by the country code. -
Omit fields that aren't needed. Do not send empty strings—those will be ignored.
-
leadStatusName,leadSourceName,className, and similar fields must match exactly with Builder Prime’s configured values.
Modifying an Existing Client
Endpoint:
POST https://<builder-prime-subdomain>.builderprime.com/api/clients/v1/<opportunityId>
Replace <opportunityId> with the internal ID of the lead/opportunity you want to update (which you can find using the GET request explained below).
Content-Type: application/json
Example JSON Body:
{ "firstName": "John", "email": "johnsmith_updated@gmail.com", "mobilePhone": "+18005557777", "leadStatusName": "In Progress", "secretKey": "YOUR_SECRET_KEY"}Only include fields you want to change. Omitting a field means “leave it unchanged.”
Retrieving Clients (Leads/Opportunities)
Endpoint:
GET https://<builder-prime-subdomain>.builderprime.com/api/clients
Headers: x-api-key: YOUR_SECRET_KEY
Optional Query Parameters:
| Parameter | Description |
|---|---|
last-modified-since |
Only return leads modified after a certain date (in milliseconds since the epoch). |
lead-status |
Filter by lead status (e.g., Lead Received). |
lead-source |
Filter by source (e.g., Facebook). |
dialer-status |
Filter by dialer status. |
phone |
Search by phone number (recommended in E.164 format). |
limit |
Maximum number of records to return (max 500). |
page |
Page number to use with limit (starts at 0). |
Example Request:
GET: https://<builder-prime-subdomain>.builderprime.com/api/clients?lead-status=Lead%20Received&limit=100
Headers:
x-api-key: YOUR_SECRET_KEY
Example Response: { "id": 1035, "firstName": "Eli", "lastName": "Manning", "emailAddress": "eli@giants.com", "city": "East Rutherford", "state": "NJ", "leadStatusName": "Job Paid", "salesPersonFirstName": "Alice", "projectTypeDescription": "Window replacement" }
Best Practices
-
Test your requests using a tool like Postman before deploying.
-
Double-check spelling of all list values like
leadStatusName—they must exactly match the options in Builder Prime. -
Keep your secret key private. Do not share it or expose it in frontend code.
Need Help?
If you run into issues or need clarification, contact your Builder Prime support rep via email at support@builderprime.com.