Location Custom Values Setup
Manage custom values (also called custom variables) at the location level. Custom values power templates and dynamic content across emails, SMS, workflows, and websites. Think of them as global variables for your sub-account. This quick-start covers the full CRUD lifecycle.
Prerequisites
Before making your first Location Custom Values call, confirm you have:
- A GoHighLevel sub-account with admin-level access
- Access to Settings > Integrations > Private Integrations in your sub-account
- A REST client such as Postman, Insomnia, or
curlin your terminal - Your sub-account’s
locationId(found in Settings > Business Profile)
Custom values are different from custom fields. Custom fields store per-contact data. Custom values store location-wide variables like business name, office hours, or pricing. They are referenced in templates using {{custom_values.key_name}} syntax.
Set Up Authentication
All Location Custom Values endpoints require a Private Integration Token (PIT) with the locations scope.
Navigate to Settings > Integrations > Private Integrations. Click Create New Integration, name it “Custom Values API,” and enable the locations scope. Click Save and copy the generated token.
Pass this token in the Authorization header as a Bearer token. Set your base URL to https://services.leadconnectorhq.com. Include Content-Type: application/json and the Version: 2021-07-28 header.
Make Your First Call
Start by listing all custom values for your location:
GET /locations/{locationId}/customValues
Authorization: Bearer {your-pit-token}
To create a new custom value:
POST /locations/{locationId}/customValues
Authorization: Bearer {your-pit-token}
Content-Type: application/json
{
"name": "Business Hours",
"value": "Mon-Fri 9am-5pm CST"
}
The name field becomes the key used in templates. After creation, reference this value in emails and messages as {{custom_values.business_hours}}. GHL automatically converts the name to a snake_case key.
To update a value, use PUT /locations/{locationId}/customValues/{valueId} with a new value field. To delete, use DELETE /locations/{locationId}/customValues/{valueId}.
Handle the Response
A successful POST returns a 200 status with the custom value object:
{
"customValue": {
"id": "cv-001",
"name": "Business Hours",
"fieldKey": "custom_values.business_hours",
"value": "Mon-Fri 9am-5pm CST"
}
}
The fieldKey is the merge field reference for templates. Use {{custom_values.business_hours}} in any email template, SMS body, or workflow message to dynamically insert this value.
The list endpoint returns all custom values with their IDs, names, keys, and current values. Common errors: 400 means the name or value field is missing. 401 means your token is invalid. 409 means a custom value with the same name already exists. 404 on update or delete means the value ID does not exist.
Test Your Setup
Run through this checklist to confirm everything works:
- List existing custom values with
GET /locations/{locationId}/customValues - Create a test value with
POST /locations/{locationId}/customValues - Update it with
PUT /locations/{locationId}/customValues/{valueId}and change thevaluestring - Verify the value appears in Settings > Custom Values in the GHL dashboard
- Test in a template by inserting
{{custom_values.your_key}}in an email and sending a test
After creating custom values, use them in an Email Template to verify merge field rendering works correctly in the final output.
Next Steps
Read the full Location Custom Values Guide for template variable strategies, dynamic pricing, and multi-location variable management. From here, explore Location Custom Fields for per-contact data and Template Manager for managing message templates.