Create a Contact
Generate a new contact in your ConstructionOnline company account
https://api.constructiononline.com/api/Contacts?contactInfo={contactInfo}
This endpoint allows users to create a new contact. If successful, the endpoint will return a record of the newly created contact. The new contact will be automatically assigned a unique numerical ID called 'ID', which will be used for future reference. Required properties for creation are the contact's first name, last name, display name, and email address. All other properties are optional; these can be entered during contact creation or at a later time.
❗ Contacts cannot have duplicate emails. If you try to create a new contact with an email address that has already been assigned to an existing contact, a a new contact will not be created. Instead, the endpoint will return an updated version of the existing contact with the entered fields. However, this endpoint should not be used to update contacts. The endpoint for updating contacts can be found here.
Requests
contactInfo: JSON object
- Properties used to create the contact. Must include the required properties(s). Allowed properties are optional but recommended.
- Required properties: EMAIL, FIRSTNAME, LASTNAME, DISPLAY_NAME
- Allowed properties: COMPANY, ADDRESS, CITY, STATE, ZIP, PHONE, MOBILE_PHONE, MOBILE_PROVIDER, FAX, MIDDLENAME, WEBSITE, SUMMARY, EXPERIENCE, COUNTRY_SETTING, EMAIL, CONTACT_QUALITY, CONTACT_REGION, CONTACT_DIVISION, CONTACT_OFFICE, CONTACT_CATEGORY, CONTACT_TRADE, FIELD_ID
Individual properties for creation should be entered as JSON key-value pairs, as seen below:
{
"EMAIL" : "alice@conwayconstruction.com",
"FIRSTNAME": "Alice",
"LASTNAME" : "Conway",
"DISPLAY_NAME" : "Alice Conway"
}
Example requests in cURL, C#, Python, and JavaScript can be found below:
cURL
# Replace {email} with the email address for your ConstructionOnline account
# {password} with your ConstructionOnline password
# {apikey} with your provided API key
# {data} with the payload for contact creation
curl -X POST https://api.constructiononline.com/api/Contacts -d '{data}' -u {email}:{password} -H 'APIKey:{apikey}'
C#
/* Replace {username} with the email address for your ConstructionOnline account
{password} with your ConstructionOnline password
{apikey} with your provided API key
{contactInfo} with the fields for the contact */
public string MakeRequest(string endpoint, string payload)
{
string username = {username};
string password = {password};
string apiKey = {apikey};
string response = "";
var handler = new HttpClientHandler() { AutomaticDecompression = System.Net.DecompressionMethods.GZip };
using (HttpClient client = new HttpClient(handler))
{
client.BaseAddress = new Uri("http://api.constructiononline.com");
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic",
System.Convert.ToBase64String(System.Text.Encoding.GetEncoding("ISO-8859-1").GetBytes(username + ":" + password)));
client.DefaultRequestHeaders.Add("APIKey", apiKey);
client.DefaultRequestHeaders.Add("Accept-Encoding", "gzip");
HttpContent content = new StringContent(payload, System.Text.Encoding.UTF32, "application/json");
response = client.PostAsync(endpoint, content).Result.ToString();
}
return response;
}
MakeRequest("api/contacts?contactInfo={contactInfo}");
Python
# Replace {username} with the email address for your ConstructionOnline account
# {password} with your ConstructionOnline password
# {apikey} with your provided API key
# {contactInfo} with the fields for the contact
import base64
import requests
import json
# Global Variables
apikey = {apikey}
username = {username}
password = {password}
# Functions
def makeRequest(endpoint, payload):
url = "https://api.constructiononline.com/" + endpoint
userPass = username + ":" + password
headers = {
"APIKey": apikey,
"Accept-Encoding": "gzip, deflate, br",
"Authorization": "Basic " + base64.b64encode(userPass.encode()).decode(),
}
response = requests.request("POST", url, headers=headers, data=payload)
return json.dumps(json.loads(response.text), indent=2)
# Main Program
print(makeRequest("api/contacts?contactInfo={contactInfo}"))
JavaScript
/* Replace {username} with the email address for your ConstructionOnline account
{password} with your ConstructionOnline password
{apikey} with your provided API key
{contactInfo} with the fields for the contact */
username = '{username}';
password = '{password}';
apikey = '{apikey}';
function makeRequest(endpoint, payload) {
auth = btoa('${username}:${password}');
var myHeaders = new Headers();
myHeaders.append("APIKey", apikey);
myHeaders.append("Accept-Encoding", "gzip, deflate, br");
myHeaders.append("Authorization", "Basic ${auth}");
var requestOptions = {
method: 'POST',
body: '',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.constructiononline.com/" + endpoint, requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
return response;
};
makeRequest("api/contacts?contactInfo={contactInfo}");
Responses
200 OK
A successful request will return a 200 response with a record of the newly created contact in the body, as seen below. Definitions for all returned properties can be found here.
{
"$id": "1",
"ID": 1742627,
"FIRSTNAME": "Alice",
"LASTNAME": "Conway",
"EMAIL": "alice@conwayconstruction.com",
"ACCOUNT": null,
"LACCESS": "2025-07-14T17:30:33.097",
"LMOD": "2025-07-14T17:30:33.097",
"DISPLAY_NAME": "Alice Conway",
"COMPANY": null,
"ADDRESS": null,
"CITY": null,
"STATE": null,
"ZIP": null,
"PHONE": "",
"MOBILE_PHONE": null,
"MOBILE_PROVIDER": null,
"FAX": null,
"LMOD_CON_ID": null,
"LMOD_NAME": null,
"ISCOMPANY": false,
"MIDDLENAME": null,
"WEBSITE": null,
"SUMMARY": null,
"EXPERIENCE": null,
"CREATOR_ID": null,
"CREATOR_NAME": null,
"TIMEZONE_OFFSET": -5.0,
"AUTO_TIMEZONE": true,
"COMPANY_ID": null,
"COMPANY_NAME": null,
"COUNTRY_SETTING": 1,
"LANGUAGE_SETTING": 1,
"LAT": null,
"LON": null,
"CS_LMOD": null,
"COMPANY_PERMISSIONS": 0,
"COMPANY_PERMISSIONS_CALENDAR": 0,
"COMPANY_PERMISSIONS_SCHEDULING": 0,
"COMPANY_PERMISSIONS_TODOS": 0,
"COMPANY_PERMISSIONS_CHANGEORDERS": 0,
"COMPANY_PERMISSIONS_SELECTIONS": 0,
"COMPANY_PERMISSIONS_PUNCHLISTS": 0,
"COMPANY_PERMISSIONS_LOGGING": 0,
"COMPANY_PERMISSIONS_RFI": 0,
"COMPANY_PERMISSIONS_BUDGETING": 0,
"COMPANY_PERMISSIONS_TRANSMITTAL": 0,
"COMPANY_PERMISSIONS_SUBMITTAL": 0,
"COMPANY_PERMISSIONS_REDLINE": 0,
"COMPANY_PERMISSIONS_LEADS": 0,
"COMPANY_PERMISSIONS_TIME": 0,
"COMPANY_PERMISSIONS_INBOUND_EMAILS": 0,
"COMPANY_PERMISSIONS_CHECKLISTS": 0,
"COMPANY_PERMISSIONS_SERVICECALLS": 0,
"COMPANY_PERMISSIONS_COSTBOOKS": 0,
"COMPANY_PERMISSIONS_INVOICING": 0,
"COMPANY_PERMISSIONS_MESSAGING": 0,
"COMPANY_PERMISSIONS_CLTL_SETTINGS": 0,
"IS_COMPANY_ADMIN": false,
"PREMIUM": "",
"MOBILETOKENS": "",
"SUBSCRIPTION": "",
"PREMIUM_TYPE": 0,
"FIELD": "Company",
"OFFLINE_FILES": null,
"FAVORITE_PROJECTS": null,
"DATE_FORMAT": 0,
"TIME_FORMAT": 0,
"TIMEZONE_ID": "America/Chicago",
"CONTACT_QUALITY": 0,
"CONTACT_REGION": 0,
"CONTACT_DIVISION": 0,
"CONTACT_OFFICE": 0,
"CONTACT_CATEGORY": 136524,
"CONTACT_TRADE": 0,
"FIELD_ID": null,
"MESSAGE_SIGNATURE": null,
"ISTRIAL": 0,
"GENERAL_CALENDAR_COLOR": "#dfecf5"
}
401 Unauthorized
The credentials entered were incorrect, in an invalid format, or failed to authenticate.
403 Forbidden
Read-only API key: write operations (POST/PUT/DELETE) not permitted.
404 Not Found
The server was not able to locate the resource specified in the request.
429 Too Many Requests
The user has surpassed the request rate limit for the hour, day, week, or month.
500: Error
There was an internal server error and the server was unable to complete the request.
Last updated: Nov 24, 2026