General Information
Using the API
Finding API key for a Team
-
Click this link while logged into your Brokerkit account, or visit the “Account Settings” section of your Brokerkit account, then click the “Copy to Clipboard” button to copy your API Key for your Team.
API URL
Request Headers
- Authorization: Token token=YOUR API KEY
- Content-Type: application/json
Response Codes
Response Code | Returned when |
200 OK | Successful GET request |
201 Created | The resource has been successfully created |
204 No Content | The resource has been successfully updated |
400 Bad Request | The request is erroneous (e.g., a required parameter was not provided) |
401 Unauthorised | Failed API authorization |
403 Forbidden | No access to a resource (e.g., makes a lead create request but has no create lead permission) |
404 Not Found | The requested resource was not found |
422 Unprocessable Entity | The request was valid but failed because of validation errors (e.g., the request tried to create a new user with an email that already exists) |
Other things to keep in mind:
-
When a parameter is required, it is marked as "REQUIRED FIELD." All other fields are optional.
-
Request parameters must be encoded in UTF-8.
Thing | Value |
URL | /leads |
Method | POST |
Response | Lead or error list |
Please Note:
- API Testing
- If you include the test parameter with the boolean value "true," the API will not save the lead to the DB and notify users subscribed to new lead notifications, but if the value is set to "false," the API will save the lead to the DB and notify users subscribed to new lead notifications
- If the test parameter is set to true: "test: true":
- In the request parameters, the email will not be populated in the response, and the response will have `"email": null.`
- Once the test is set to false or removed from parameters, an email will be populated as expected.
- Updating duplicate records
- We have implemented a system for detecting duplicate records.
- Duplicate matches occur on two fields:
- 1) Records will match on any "email" addresses
- 2) Or records will match on any "agent_id".
- If there are duplicate records:
- It will update found records with data from the new contact.
- If there is no duplicate record: It will create a new record.
Example Parameters:
Parameter Name |
Example |
The field name in the user interface |
Comment |
test |
false |
N/A |
IT SHOULD BE A BOOLEAN VALUE, NOT A STRING. If you include the test(true) parameter, the API will not save the lead to the DB and notify. |
product |
retention |
N/A |
When this parameter is used, an agent in retention will be created vs. a lead in recruiting. |
first_name |
Peet |
Full Name | |
last_name |
Peeter |
Full Name | |
birthday |
24/03/1975 |
Birthday | |
phone |
+11111111111 |
Cell Phone |
should be a valid phone number |
other_phone |
+11111111111 |
Other Phone |
Should be a valid phone number |
office_phone |
+11111111111 |
Office Phone |
Should be a valid phone number |
|
peet@example.com |
Email (Main) | |
agent_id |
a68d4b23 |
Agent ID | |
bucket |
default |
Normal/Archived |
Should be "default", "backlog" or "archived" |
status |
new_lead |
Status |
Should be "new_lead", "contact_attempt", "contact_made", "appt_set", "needs_evaluated", "onboarding", "active" |
note |
#NOTE |
Referrer Notes | |
source |
Abstrakt |
Source |
|
currently_at |
RE-MAX United |
Company Name | |
alt_address |
1111 A Shangri, New York, NY 11111, USA |
Home address | |
alt_city |
New York |
Home City | |
alt_state |
NY |
Home State | |
alt_zip |
11111 |
Home zip | |
office_address |
1111 N Tatum, New York, NY 11111, USA |
Office address | |
office_city |
New York |
Office city | |
office_state |
NY |
Office state | |
office_zip |
11111 |
Office zip | |
kpa_taken |
true |
Personality Assessment Taken | |
active_listings_count |
111 |
Active Listing | |
production_ytd |
10000 |
Total $ Production LTM | |
rating |
4 |
Rating |
An integer from 4 to 10 |
production_label |
mega |
Production Label |
Should be "mega", "super", "mid", "low", "new", "in_school", "not_licensed"!!! otherwise, you will get an error. |
owner_email |
test@getbrokerkit.com |
Owner |
|
referrer_email |
test@getbrokerkit.com |
Referrer |
|
Recruiting Lead Example:
curl -X POST \ https://api.getbrokerkit.com/v2/leads \ -H 'Authorization: Token token=Your Team Token' \ -H 'Content-Type: application/json' \ -d '{ "test": false, "first_name": "Peet", "last_name": "Peeter", "birthday": "24/03/1975", "phone": "+11111111111", "email": "peet@example.com", "agent_id": "a68d4b23", "bucket": "default", "status": "new_lead", "note": "#NOTE", "source": "Abstrakt", "currently_at": "RE-MAX United", "alt_address": "1111 A Shangri, New York, NY 11111, USA", "alt_city": "New York", "alt_state": "NY", "alt_zip": "1111", "office_address": "1111 N Tatum, New York, NY 11111, USA", "office_city": "New York", "office_state": "NY", "office_zip": "11111", "kpa_taken": "true", "active_listings_count": "111", "rating": "4", "production_ytd": "10000", "production_label": "mega", "owner_email": "test@brokerkit.com", "referrer_email": "test@brokerkit.com", "other_phone": "+11111111111", "office_phone": "+11111111111" }'
{ "id": ID, "team_id": TEAM_ID, "status": "new_lead", "bucket": "default", "photo_url": null, "first_name": "Peet", "last_name": "Peeter", "name": "Peet Peeter", "birthday": "1975-03-24", "email": "peet@example.com", "phone": "+12025550166", "production_label": "mega", "production_ytd": 10000, "currently_at": "RE-MAX United", "source": "Abstrakt", "rating": 4, "kpa_taken": true, "active_listings_count": "111", "referred_at": "2022-05-05", "anniversary_month": null, "joined_at": null, "last_activity_at": "2022-05-04T22:46:15.506Z", "first_appointment_at": null, "last_appointment_at": null, "updated_at": "2022-05-04T22:46:17.052Z", "created_at": "2022-05-04T22:46:17.052Z", "note": "#NOTE", "links": {}, "alt_address": "1111 A Shangri, New York, NY 11111, USA", "alt_city": "New York", "alt_state": "New York", "alt_zip": "10473", "alt_lat": 40.809102, "alt_lng": -73.857723, "office_address": "1111 A Shangri, New York, NY 11111, USA", "office_city": "New York", "office_state": "New York", "office_zip": "10473", "office_lat": 40.809102, "office_lng": -73.857723, "office_phone": "+12025550166", "other_phone": "+12025550166", "agent_id": "a68d4b23", "recruiting": true, "retention": false, "archived": false, "backlogged": false, "owner": { "id": ID, "email": "test@getbrokerkit.com", "title": "Mr", "first_name": "Test", "last_name": "Brokerkit", "name": "Test Brokerkit", "avatar_url": "URL", "admin": true, "signature": "", "timezone": "America/Halifax", "phone": "", "last_sign_in_at": "2021-09-01T15:45:50.456Z", "updated_at": "2022-05-04T22:41:15.295Z", "created_at": "2019-10-04T10:06:25.581Z", "avatar": { "medium": "URL", "small": "URL", "tiny": "URL" } }, "referrer": { "id": ID, "email": "test@getbrokerkit.com", "title": "Mr", "first_name": "Test", "last_name": "Brokerkit", "name": "Test Brokerkit", "avatar_url": "URL", "admin": true, "signature": "", "timezone": "America/Halifax", "phone": "", "last_sign_in_at": "2021-09-01T15:45:50.456Z", "updated_at": "2022-05-04T22:41:15.295Z", "created_at": "2019-10-04T10:06:25.581Z", "avatar": { "medium": "URL", "small": "URL", "tiny": "URL" } } }
Retention Agent Example:
curl -X POST \ https://api.getbrokerkit.com/v2/leads \ -H 'Authorization: Token token=Your Team Token' \ -H 'Content-Type: application/json' \ -d '{ "test": false, "product": "retention", "first_name": "Peet", "last_name": "Peeter", "birthday": "24/03/1975", "phone": "+11111111111", "email": "peet@example.com", "agent_id": "a68d4b23", "bucket": "default", "status": "onboarding", "note": "#NOTE", "source": "Abstrakt", "currently_at": "RE-MAX United", "alt_address": "1111 A Shangri, New York, NY 11111, USA", "alt_city": "New York", "alt_state": "NY", "alt_zip": "1111", "office_address": "1111 N Tatum, New York, NY 11111, USA", "office_city": "New York", "office_state": "NY", "office_zip": "11111", "kpa_taken": "true", "active_listings_count": "111", "rating": "4", "production_ytd": "10000", "production_label": "mega", "owner_email": "test@brokerkit.com", "referrer_email": "test@brokerkit.com", "other_phone": "+11111111111", "office_phone": "+11111111111" }'
{ "id": ID, "team_id": TEAM ID, "status": "onboarding", "bucket": "default", "photo_url": null, "first_name": "Peet", "last_name": "Peeter", "name": "Peet Peeter", "birthday": "1975-03-24", "email": "peet@example.com", "phone": "+12025550166", "production_label": "mega", "production_ytd": 10000, "currently_at": "RE-MAX United", "source": "Abstrakt", "rating": 4, "kpa_taken": true, "active_listings_count": "111", "referred_at": "2022-05-05", "anniversary_month": null, "joined_at": null, "last_activity_at": "2022-05-04T23:05:49.014Z", "first_appointment_at": null, "last_appointment_at": null, "updated_at": "2022-05-04T23:05:49.707Z", "created_at": "2022-05-04T23:05:49.707Z", "note": "#NOTE", "links": {}, "alt_address": "1111 A Shangri, New York, NY 11111, USA", "alt_city": "New York", "alt_state": "New York", "alt_zip": "10473", "alt_lat": 40.809102, "alt_lng": -73.857723, "office_address": "1111 A Shangri, New York, NY 11111, USA", "office_city": "New York", "office_state": "New York", "office_zip": "10473", "office_lat": 40.809102, "office_lng": -73.857723, "office_phone": "+12025550166", "other_phone": "+12025550166", "agent_id": "a68d4b23", "recruiting": false, "retention": true, "archived": false, "backlogged": false, "owner": { "id": ID, "email": "test@getbrokerkit.com", "title": "Mr", "first_name": "Test", "last_name": "Brokerkit", "name": "Test Brokerkit", "avatar_url": "URL", "admin": true, "signature": "", "timezone": "America/Halifax", "phone": "", "last_sign_in_at": "2021-09-01T15:45:50.456Z", "updated_at": "2022-05-04T22:41:15.295Z", "created_at": "2019-10-04T10:06:25.581Z", "avatar": { "medium": "URL", "small": "URL", "tiny": "URL" } }, "referrer": { "id": ID, "email": "test@getbrokerkit.com", "title": "Mr", "first_name": "Test", "last_name": "Brokerkit", "name": "Test Brokerkit", "avatar_url": "URL", "admin": true, "signature": "", "timezone": "America/Halifax", "phone": "", "last_sign_in_at": "2021-09-01T15:45:50.456Z", "updated_at": "2022-05-04T22:41:15.295Z", "created_at": "2019-10-04T10:06:25.581Z", "avatar": { "medium": "URL", "small": "URL", "tiny": "URL" } }, "team_member": { "id": ID, "email": "peet@example.com", "title": "", "first_name": "Peet", "last_name": "Peeter", "name": "Peet Peeter", "avatar_url": "URL", "admin": false, "signature": null, "timezone": null, "phone": "", "last_sign_in_at": null, "updated_at": "2022-05-04T23:05:50.000Z", "created_at": "2022-05-04T23:05:50.000Z", "avatar": { "medium": "URL", "small": "URL", "tiny": "URL" }, "role": { "name": "agent", "invited_at": null, "joined_at": null } } }
{ "email": [ "is invalid" ], "phone": [ "is an invalid number" ] }
Comments
0 comments
Please sign in to leave a comment.