Managing Contacts
This guide explains how to create a contact, link it to a project, list the contacts on a project, and unlink them again using the Glint Solar API.
Prerequisites
Before linking contacts, you need:
- A valid Personal Access Token
- An Organization ID (
orgId) - A Portfolio ID (
portfolioId) - A Project ID (
id) and a Contact ID (contactId)
You can retrieve organization and portfolio IDs using the List organizations and List portfolios endpoints.
Discovering Contact Properties
Like projects, contacts have dynamic properties that vary by organization. The property keys used in this guide (first_name, last_name) are the defaults, but each organization can rename or add their own. Before reading or writing contact properties, call the schema endpoint to discover which ones are available.
This endpoint only takes an orgId:
curl -X GET "https://api.glintsolar.com/contacts/v1/schema?orgId=YOUR_ORG_ID" \
-H "X-API-Key: YOUR_PERSONAL_ACCESS_TOKEN"
The response lists every available property:
{
"properties": [
{
"id": "first_name",
"name": "First name",
"property_type": "text"
},
{
"id": "last_name",
"name": "Last name",
"property_type": "text"
},
{
"id": "contact-email",
"name": "Email",
"property_type": "email"
},
{
"id": "contact_role",
"name": "Role",
"property_type": "select",
"select": {
"options": [
{ "id": "a1b2c3d4e5f6g7h8", "name": "Landowner", "color": "#6038DC" },
{ "id": "h8g7f6e5d4c3b2a1", "name": "Municipal", "color": "#44F3C1" }
]
}
}
]
}
Use each property's id as the key when reading or setting that property. See the Managing Projects guide for the full reference on how each property type is formatted.
Finding a Contact
Contacts live in a portfolio. To find the contact you want to link, list the contacts in the portfolio:
curl -X GET "https://api.glintsolar.com/contacts/v1?orgId=YOUR_ORG_ID&portfolioId=YOUR_PORTFOLIO_ID" \
-H "X-API-Key: YOUR_PERSONAL_ACCESS_TOKEN"
The response is a paginated list of contacts:
{
"items": [
{
"id": "con_a1b2c3d4e5f6",
"properties": {
"first_name": { "text": "Jane" },
"last_name": { "text": "Landowner" }
},
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-01-15T10:30:00Z"
}
],
"nextKey": null
}
If the contact doesn't exist yet, create it first — see the next section.
Creating a Contact
To create a contact, send a POST request with a properties object. The first_name property is required; any other properties from the contact schema are optional.
curl -X POST "https://api.glintsolar.com/contacts/v1?orgId=YOUR_ORG_ID&portfolioId=YOUR_PORTFOLIO_ID" \
-H "X-API-Key: YOUR_PERSONAL_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"properties": {
"first_name": { "text": "Jane" },
"last_name": { "text": "Landowner" }
}
}'
A successful request returns the created contact, including its generated id:
{
"id": "con_a1b2c3d4e5f6",
"properties": {
"first_name": { "text": "Jane" },
"last_name": { "text": "Landowner" }
},
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-01-15T10:30:00Z"
}
Use the returned id as the contactId when linking the contact to a project below.
Linking a Contact to a Project
To link a contact to a project, send a POST request with the contactId in the request body:
curl -X POST "https://api.glintsolar.com/projects/v1/pro_x1y2z3w4v5u6/contacts?orgId=YOUR_ORG_ID&portfolioId=YOUR_PORTFOLIO_ID" \
-H "X-API-Key: YOUR_PERSONAL_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"contactId": "con_a1b2c3d4e5f6"
}'
A successful request returns a 200 status. The same contact can be linked to multiple projects, and a project can have multiple contacts.
Listing Contacts on a Project
To see which contacts are linked to a project, send a GET request:
curl -X GET "https://api.glintsolar.com/projects/v1/pro_x1y2z3w4v5u6/contacts?orgId=YOUR_ORG_ID&portfolioId=YOUR_PORTFOLIO_ID" \
-H "X-API-Key: YOUR_PERSONAL_ACCESS_TOKEN"
The response is a paginated list of the linked contacts:
{
"items": [
{
"id": "con_a1b2c3d4e5f6",
"properties": {
"first_name": { "text": "Jane" },
"last_name": { "text": "Landowner" }
},
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-01-15T10:30:00Z"
}
],
"nextKey": null
}
Unlinking a Contact from a Project
To remove the link between a contact and a project, send a DELETE request with both the project ID and the contact ID in the path:
curl -X DELETE "https://api.glintsolar.com/projects/v1/pro_x1y2z3w4v5u6/contacts/con_a1b2c3d4e5f6?orgId=YOUR_ORG_ID&portfolioId=YOUR_PORTFOLIO_ID" \
-H "X-API-Key: YOUR_PERSONAL_ACCESS_TOKEN"
A successful request returns a 200 status. This only removes the link — the contact itself remains in the portfolio and stays linked to any other projects.