Creating and updating recruiting/retention contacts in Brokerkit
General Information
Using the API
- If you are using the Zapier webhooks app to access our API, please see the details here. However, this article could still be valuable as a reference on the parameters available to use in your webhook and how to format them.
-
Finding API key for an Account
-
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) |
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.
- 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.`
- An email will be populated as expected once the test is set to false or removed from parameters.
- 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 the records found with data from the new contact.
- If there is no duplicate record, It will create a new record.
Creating/Updating Contacts
Value | |
URL | /leads |
Method | POST |
Response | Lead or error list |
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", or "not_licensed"!!! otherwise, you will get an error. |
owner_email |
test@getbrokerkit.com |
Owner |
|
referrer_email |
test@getbrokerkit.com |
Referrer |
|
resume_url |
https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf |
Resume |
|
document_urls |
https://morth.nic.in/sites/default/files/dd12-13_0.pdf |
Documents |
|
curl -X POST \ |
Example of successful response:
{ |
Retention Agent Example:
curl -X POST \ |
Example of successful response:
{ |
Example of unsuccessful response with validation errors:
{ |