Template Manager Setup
Retrieve and manage message templates at the location level. Templates are pre-built message formats used in SMS, email, and workflow communications. This quick-start covers listing templates, understanding template types, and deleting unused templates.
Prerequisites
Before making your first Template Manager call, confirm you have:
- A GoHighLevel sub-account with existing message templates
- 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)
Templates are typically created through the GHL dashboard under Marketing > Templates or through workflow builders. Have at least one template configured before testing.
Set Up Authentication
All Template Manager endpoints require a Private Integration Token (PIT) with the locations scope.
Navigate to Settings > Integrations > Private Integrations. Click Create New Integration, name it “Template Manager 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 the Version: 2021-07-28 header with each request.
Make Your First Call
Start by listing all templates for your location:
GET /locations/{locationId}/templates
Authorization: Bearer {your-pit-token}
This returns all message templates available in your sub-account. Each template includes an id, name, type, and body field. Template types include SMS templates, email templates, and WhatsApp templates.
You can filter by type using query parameters to narrow results to a specific channel.
To delete a template you no longer need:
DELETE /locations/{locationId}/templates/{templateId}
Authorization: Bearer {your-pit-token}
Deleting a template does not affect messages already sent using that template. However, active workflows referencing the deleted template will fail on subsequent runs. Check workflow dependencies before deleting.
Handle the Response
A successful GET returns a 200 status with the template list:
{
"templates": [
{
"id": "tpl-001",
"name": "Appointment Reminder",
"type": "sms",
"body": "Hi {{first_name}}, your appointment is tomorrow at {{appointment_time}}. Reply CONFIRM to confirm.",
"createdAt": "2026-01-15T10:00:00Z"
},
{
"id": "tpl-002",
"name": "Welcome Message",
"type": "email",
"body": "<html><body>Welcome, {{first_name}}!</body></html>",
"createdAt": "2026-02-01T08:00:00Z"
}
]
}
Templates use GHL merge fields with double curly brace syntax. Common merge fields include {{first_name}}, {{last_name}}, {{email}}, {{phone}}, and any custom values defined in your location.
Common errors: 401 means your token is invalid. 404 on delete means the template ID does not exist. An empty templates array means no templates have been created for this location.
Test Your Setup
Run through this checklist to confirm everything works:
- List all templates with
GET /locations/{locationId}/templatesand review the results - Identify template types (SMS, email, WhatsApp) in the response data
- Check merge fields — verify that
{{first_name}}and other variables are present in template bodies - Cross-reference results with templates visible in the GHL dashboard
- Delete a test template with
DELETE /locations/{locationId}/templates/{templateId}(use one you created for testing, not a production template)
Before deleting any template, search your active workflows for references to that template ID. Broken template references cause workflow step failures.
Next Steps
Read the full Template Manager Guide for template organization strategies and WhatsApp template approval workflows. From here, explore Location Custom Values for managing the variables used in templates and Email Template CRUD for dedicated email template management.