Files
MP-Manager/n8n/API Docs/categories/locations-api.md
T
2026-05-30 14:31:19 -06:00

100 KiB

GHL Locations API

Endpoints: 29 Base URL: https://rest.gohighlevel.com/v1

Version Header(s): 2021-07-28


Endpoints


POST /locations/

Summary: Create Sub-Account (Formerly Location)

Create a new Sub-Account (Formerly Location) based on the data provided

! This feature is only available on Agency Pro ($497) plan.

Version Header: 2021-07-28

Operation ID: create-location

Tags: Sub-Account (Formerly Location)

cURL

curl -X POST 'https://rest.gohighlevel.com/v1/locations/' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0' \
  -d '{}'  # See request body schema below

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

payload = json.dumps({})
conn.request('POST', '/v1/locations/', body=payload, headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - POST locations",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "POST",
    "url": "https://rest.gohighlevel.com/v1/locations/",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": true,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Body Schema

  • name (string) (required) (e.g. Mark Shoes): The name for the sub-account/location
  • phone (string) (e.g. +1410039940): The phone number of the business for which sub-account is created with the appropriate country-code
  • companyId (string) (required) (e.g. UAXssdawIWAWD): Company/Agency Id
  • address (string) (e.g. 4th fleet street): The address of the business for which sub-account is created
  • city (string) (e.g. New York): The city where the business is located for which sub-account is created
  • state (string) (e.g. Illinois): The state in which the business operates for which sub-account is created
  • country (string) (e.g. US): The 2 letter country-code in which the business is present for which sub-account is created
  • postalCode (string) (e.g. 567654): The postal code of the business for which sub-account is created
  • website (string) (e.g. https://yourwebsite.com): The website of the business for which sub-account is created
  • timezone (string) (e.g. US/Central): The timezone of the business for which sub-account is created
  • prospectInfo (string) (e.g. {'firstName': 'John', 'lastName': 'Doe', 'email': 'john.doe@mail.com'})
  • settings (string): The default settings for location
  • social (string): The social media links for location
  • twilio (string): The twilio credentials for location
  • mailgun (string): The mailgun credentials for location
  • snapshotId (string) (e.g. XXXXXXXXXXX): The snapshot ID to be loaded into the location.

Response Codes

Code Description Schema
200 Successful response - id (string) (e.g. ve9EPM428h8vShlRW1KT): Location Id
- companyId (string) (e.g. UAXssdawIWAWD): Company/Agency Id
- name (s...
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


GET /locations/search

Summary: Search

Search Sub-Account (Formerly Location)

Version Header: 2021-07-28

Operation ID: search-locations

Tags: Search

cURL

curl -X GET 'https://rest.gohighlevel.com/v1/locations/search?companyId=VALUE&skip=VALUE&limit=VALUE&order=VALUE&email=VALUE' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0'

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

conn.request('GET', '/v1/locations/search?companyId=VALUE&skip=VALUE&limit=VALUE&order=VALUE&email=VALUE', headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - GET search",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "GET",
    "url": "https://rest.gohighlevel.com/v1/locations/search",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": false,
    "bodyParameters": {
      "parameters": []
    },
    "options": {},
    "sendQuery": true,
    "queryParameters": {
      "parameters": [
        {
          "name": "companyId",
          "value": "VALUE"
        },
        {
          "name": "skip",
          "value": "VALUE"
        },
        {
          "name": "limit",
          "value": "VALUE"
        },
        {
          "name": "order",
          "value": "VALUE"
        },
        {
          "name": "email",
          "value": "VALUE"
        }
      ]
    }
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
companyId Query string The company/agency id on which you want to perform the search
skip Query string The value by which the results should be skipped. Default will be 0
limit Query string The value by which the results should be limited. Default will be 10
order Query string The order in which the results should be returned - Allowed values asc, desc. Default will be asc
email Query string

Response Codes

Code Description Schema
200 Successful response - locations (array of GetLocationSchema)
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.
422 Unprocessable Entity Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


DELETE /locations/{locationId}

Summary: Delete Sub-Account (Formerly Location)

Delete a Sub-Account (Formerly Location) from the Agency

Version Header: 2021-07-28

Operation ID: delete-location

Tags: Sub-Account (Formerly Location)

cURL

curl -X DELETE 'https://rest.gohighlevel.com/v1/locations/VALUE?deleteTwilioAccount=VALUE' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0'

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

conn.request('DELETE', '/v1/locations/VALUE?deleteTwilioAccount=VALUE', headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - DELETE VALUE",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "DELETE",
    "url": "https://rest.gohighlevel.com/v1/locations/VALUE",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": false,
    "bodyParameters": {
      "parameters": []
    },
    "options": {},
    "sendQuery": true,
    "queryParameters": {
      "parameters": [
        {
          "name": "deleteTwilioAccount",
          "value": "VALUE"
        }
      ]
    }
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
locationId Path string Location Id
deleteTwilioAccount Query boolean Boolean value to indicate whether to delete Twilio Account or not

Response Codes

Code Description Schema
200 Successful response - success (boolean) (required) (e.g. True): Success status of the API
- message (string) (required) (e.g. `Deleted location with id: ...
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


GET /locations/{locationId}

Summary: Get Sub-Account (Formerly Location)

Get details of a Sub-Account (Formerly Location) by passing the sub-account id

Version Header: 2021-07-28

Operation ID: get-location

Tags: Sub-Account (Formerly Location)

cURL

curl -X GET 'https://rest.gohighlevel.com/v1/locations/VALUE' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0'

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

conn.request('GET', '/v1/locations/VALUE', headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - GET VALUE",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "GET",
    "url": "https://rest.gohighlevel.com/v1/locations/VALUE",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": false,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
locationId Path string Location Id

Response Codes

Code Description Schema
200 Successful response - location (GetLocationByIdSchema)
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.
422 Unprocessable Entity Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


PUT /locations/{locationId}

Summary: Put Sub-Account (Formerly Location)

Update a Sub-Account (Formerly Location) based on the data provided

Version Header: 2021-07-28

Operation ID: put-location

Tags: Sub-Account (Formerly Location)

cURL

curl -X PUT 'https://rest.gohighlevel.com/v1/locations/VALUE' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0' \
  -d '{}'  # See request body schema below

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

payload = json.dumps({})
conn.request('PUT', '/v1/locations/VALUE', body=payload, headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - PUT VALUE",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "PUT",
    "url": "https://rest.gohighlevel.com/v1/locations/VALUE",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": true,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
locationId Path string Location Id

Request Body Schema

  • name (string) (e.g. Mark Shoes): The name for the sub-account/location
  • phone (string) (e.g. +1410039940): The phone number of the business for which sub-account is created
  • companyId (string) (required) (e.g. UAXssdawIWAWD): Company/Agency Id
  • address (string) (e.g. 4th fleet street): The address of the business for which sub-account is created
  • city (string) (e.g. New York): The city where the business is located for which sub-account is created
  • state (string) (e.g. Illinois): The state in which the business operates for which sub-account is created
  • country (string) (e.g. US): The country in which the business is present for which sub-account is created
  • postalCode (string) (e.g. 567654): The postal code of the business for which sub-account is created
  • website (string) (e.g. https://yourwebsite.com): The website of the business for which sub-account is created
  • timezone (string) (e.g. US/Central): The timezone of the business for which sub-account is created
  • prospectInfo (string) (e.g. {'firstName': 'John', 'lastName': 'Doe', 'email': 'john.doe@mail.com'})
  • settings (string): The default settings for location
  • social (string): The social media links for location
  • twilio (string): The twilio credentials for location
  • mailgun (string): The mailgun credentials for location
  • snapshot (string): The snapshot to be updated in the location.

Response Codes

Code Description Schema
200 Successful update response - id (string) (e.g. ve9EPM428h8vShlRW1KT): Location Id
- companyId (string) (e.g. UAXssdawIWAWD): Company/Agency Id
- name (s...
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


GET /locations/{locationId}/customFields

Summary: Get Custom Fields

Get Custom Fields

Version Header: 2021-07-28

Operation ID: get-custom-fields

Tags: Custom Field

cURL

curl -X GET 'https://rest.gohighlevel.com/v1/locations/VALUE/customFields?model=contact' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0'

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

conn.request('GET', '/v1/locations/VALUE/customFields?model=VALUE', headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - GET customFields",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "GET",
    "url": "https://rest.gohighlevel.com/v1/locations/VALUE/customFields",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": false,
    "bodyParameters": {
      "parameters": []
    },
    "options": {},
    "sendQuery": true,
    "queryParameters": {
      "parameters": [
        {
          "name": "model",
          "value": "VALUE"
        }
      ]
    }
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
locationId Path string Location Id
model Query string Model of the custom field you want to retrieve (values: contact, opportunity, all)

Response Codes

Code Description Schema
200 Successful response - customFields (array of CustomFieldSchema)
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.
422 Unprocessable Entity Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


POST /locations/{locationId}/customFields

Summary: Create Custom Field

Create Custom Field

Version Header: 2021-07-28

Operation ID: create-custom-field

Tags: Custom Field

cURL

curl -X POST 'https://rest.gohighlevel.com/v1/locations/VALUE/customFields' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0' \
  -d '{}'  # See request body schema below

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

payload = json.dumps({})
conn.request('POST', '/v1/locations/VALUE/customFields', body=payload, headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - POST customFields",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "POST",
    "url": "https://rest.gohighlevel.com/v1/locations/VALUE/customFields",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": true,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
locationId Path string Location Id

Request Body Schema

  • name (string) (required) (e.g. Custom Field)
  • dataType (string) (required) (e.g. TEXT)
  • placeholder (string) (e.g. Placeholder Text)
  • acceptedFormat (array) (e.g. ['.pdf', '.docx', '.jpeg'])
  • isMultipleFile (boolean) (e.g. False)
  • maxNumberOfFiles (number) (e.g. 2)
  • textBoxListOptions (array)
  • position (number) (e.g. 0)
  • model (string) (e.g. opportunity): Model of the custom field you want to create

Response Codes

Code Description Schema
201 Successful response - customField (CustomFieldSchema)
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.
422 Unprocessable Entity Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


POST /locations/{locationId}/customFields/upload

Summary: Uploads File to customFields

Uploads File to customFields

Version Header: 2021-07-28

Operation ID: upload-file-customFields

Tags: Custom Field

cURL

curl -X POST 'https://rest.gohighlevel.com/v1/locations/VALUE/customFields/upload' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0'

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

conn.request('POST', '/v1/locations/VALUE/customFields/upload', headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - POST upload",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "POST",
    "url": "https://rest.gohighlevel.com/v1/locations/VALUE/customFields/upload",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": true,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
locationId Path string

Response Codes

Code Description Schema
200 Successful response - uploadedFiles (object) (e.g. `{'FileName.csv': 'https://highlevel-private-staging.storage.googleapis.com/location/Ar4JQgIyuzRsVuwD9RSK/cust...
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.
422 Unprocessable Entity Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


DELETE /locations/{locationId}/customFields/{id}

Summary: Delete Custom Field

Delete Custom Field

Version Header: 2021-07-28

Operation ID: delete-custom-field

Tags: Custom Field

cURL

curl -X DELETE 'https://rest.gohighlevel.com/v1/locations/VALUE/customFields/VALUE' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0'

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

conn.request('DELETE', '/v1/locations/VALUE/customFields/VALUE', headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - DELETE VALUE",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "DELETE",
    "url": "https://rest.gohighlevel.com/v1/locations/VALUE/customFields/VALUE",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": false,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
locationId Path string Location Id
id Path string Custom Field Id

Response Codes

Code Description Schema
200 Successful response - succeded (boolean) (e.g. True)
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.
422 Unprocessable Entity Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


GET /locations/{locationId}/customFields/{id}

Summary: Get Custom Field

Get Custom Field

Version Header: 2021-07-28

Operation ID: get-custom-field

Tags: Custom Field

cURL

curl -X GET 'https://rest.gohighlevel.com/v1/locations/ve9EPM428h8vShlRW1KT/customFields/VALUE' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0'

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

conn.request('GET', '/v1/locations/ve9EPM428h8vShlRW1KT/customFields/VALUE', headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - GET VALUE",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "GET",
    "url": "https://rest.gohighlevel.com/v1/locations/ve9EPM428h8vShlRW1KT/customFields/VALUE",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": false,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
locationId Path string Location Id [example: ve9EPM428h8vShlRW1KT]
id Path string Custom Field Id or Field Key (e.g. "contact.first_name" or "opportunity.pipeline_id")

Response Codes

Code Description Schema
200 Successful response - customField (CustomFieldSchema)
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.
422 Unprocessable Entity Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


PUT /locations/{locationId}/customFields/{id}

Summary: Update Custom Field

Update Custom Field

Version Header: 2021-07-28

Operation ID: update-custom-field

Tags: Custom Field

cURL

curl -X PUT 'https://rest.gohighlevel.com/v1/locations/VALUE/customFields/VALUE' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0' \
  -d '{}'  # See request body schema below

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

payload = json.dumps({})
conn.request('PUT', '/v1/locations/VALUE/customFields/VALUE', body=payload, headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - PUT VALUE",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "PUT",
    "url": "https://rest.gohighlevel.com/v1/locations/VALUE/customFields/VALUE",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": true,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
locationId Path string Location Id
id Path string Custom Field Id

Request Body Schema

  • name (string) (required) (e.g. Custom Field)
  • placeholder (string) (e.g. Placeholder Text)
  • acceptedFormat (array) (e.g. ['.pdf', '.docx', '.jpeg'])
  • isMultipleFile (boolean) (e.g. False)
  • maxNumberOfFiles (number) (e.g. 2)
  • textBoxListOptions (array)
  • position (number) (e.g. 0)
  • model (string) (e.g. opportunity): Model of the custom field you want to update

Response Codes

Code Description Schema
200 Successful response - customField (CustomFieldSchema)
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.
422 Unprocessable Entity Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


GET /locations/{locationId}/customValues

Summary: Get Custom Values

Get Custom Values

Version Header: 2021-07-28

Operation ID: get-custom-values

Tags: Custom Value

cURL

curl -X GET 'https://rest.gohighlevel.com/v1/locations/VALUE/customValues' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0'

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

conn.request('GET', '/v1/locations/VALUE/customValues', headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - GET customValues",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "GET",
    "url": "https://rest.gohighlevel.com/v1/locations/VALUE/customValues",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": false,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
locationId Path string Location Id

Response Codes

Code Description Schema
200 Successful response - customValues (array of CustomValueSchema)
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


POST /locations/{locationId}/customValues

Summary: Create Custom Value

Create Custom Value

Version Header: 2021-07-28

Operation ID: create-custom-value

Tags: Custom Value

cURL

curl -X POST 'https://rest.gohighlevel.com/v1/locations/VALUE/customValues' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0' \
  -d '{}'  # See request body schema below

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

payload = json.dumps({})
conn.request('POST', '/v1/locations/VALUE/customValues', body=payload, headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - POST customValues",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "POST",
    "url": "https://rest.gohighlevel.com/v1/locations/VALUE/customValues",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": true,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
locationId Path string Location Id

Request Body Schema

  • name (string) (required) (e.g. Custom Field Name)
  • value (string) (required) (e.g. Value)

Response Codes

Code Description Schema
201 Successful response - customValue (CustomValueSchema)
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.
422 Unprocessable Entity Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


DELETE /locations/{locationId}/customValues/{id}

Summary: Delete Custom Value

Delete Custom Value

Version Header: 2021-07-28

Operation ID: delete-custom-value

Tags: Custom Value

cURL

curl -X DELETE 'https://rest.gohighlevel.com/v1/locations/VALUE/customValues/VALUE' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0'

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

conn.request('DELETE', '/v1/locations/VALUE/customValues/VALUE', headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - DELETE VALUE",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "DELETE",
    "url": "https://rest.gohighlevel.com/v1/locations/VALUE/customValues/VALUE",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": false,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
locationId Path string Location Id
id Path string Custom Value Id

Response Codes

Code Description Schema
200 Successful response - succeded (boolean) (e.g. True)
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.
422 Unprocessable Entity Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


GET /locations/{locationId}/customValues/{id}

Summary: Get Custom Value

Get Custom Value

Version Header: 2021-07-28

Operation ID: get-custom-value

Tags: Custom Value

cURL

curl -X GET 'https://rest.gohighlevel.com/v1/locations/VALUE/customValues/VALUE' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0'

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

conn.request('GET', '/v1/locations/VALUE/customValues/VALUE', headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - GET VALUE",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "GET",
    "url": "https://rest.gohighlevel.com/v1/locations/VALUE/customValues/VALUE",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": false,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
locationId Path string Location Id
id Path string Custom Value Id

Response Codes

Code Description Schema
200 Successful response - customValue (CustomValueSchema)
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.
422 Unprocessable Entity Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


PUT /locations/{locationId}/customValues/{id}

Summary: Update Custom Value

Update Custom Value

Version Header: 2021-07-28

Operation ID: update-custom-value

Tags: Custom Value

cURL

curl -X PUT 'https://rest.gohighlevel.com/v1/locations/VALUE/customValues/VALUE' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0' \
  -d '{}'  # See request body schema below

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

payload = json.dumps({})
conn.request('PUT', '/v1/locations/VALUE/customValues/VALUE', body=payload, headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - PUT VALUE",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "PUT",
    "url": "https://rest.gohighlevel.com/v1/locations/VALUE/customValues/VALUE",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": true,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
locationId Path string Location Id
id Path string Custom Value Id

Request Body Schema

  • name (string) (required) (e.g. Custom Field Name)
  • value (string) (required) (e.g. Value)

Response Codes

Code Description Schema
200 Successful response - customValue (CustomValueSchema)
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.
422 Unprocessable Entity Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


POST /locations/{locationId}/recurring-tasks

Summary: Create Recurring Task

Create Recurring Task

Version Header: 2021-07-28

Operation ID: create-recurring-task

Tags: Recurring Tasks

cURL

curl -X POST 'https://rest.gohighlevel.com/v1/locations/VALUE/recurring-tasks' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0' \
  -d '{}'  # See request body schema below

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

payload = json.dumps({})
conn.request('POST', '/v1/locations/VALUE/recurring-tasks', body=payload, headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - POST recurring-tasks",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "POST",
    "url": "https://rest.gohighlevel.com/v1/locations/VALUE/recurring-tasks",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": true,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
locationId Path string

Request Body Schema

  • title (string) (required) (e.g. Task Name): Name of the task
  • description (string) (e.g. Task Description): Description of the task
  • contactIds (array) (e.g. ['sx6wyHhbFdRXh302Lunr']): Contact Id
  • owners (array) (e.g. ['sx6wyHhbFdRXh302Lunr']): Assigned To
  • rruleOptions (string) (required) (e.g. {'intervalType': 'hourly', 'interval': 1, 'startDate': '2025-07-23T10:00:00.000Z', 'dueAfterSeconds': 600}): Recurring rules
  • ignoreTaskCreation (boolean) (e.g. True): Create initial task or not

Response Codes

Code Description Schema
201 Successful response - recurringTask (string) (required): Recurring Tasks
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


DELETE /locations/{locationId}/recurring-tasks/{id}

Summary: Delete Recurring Task

Delete Recurring Task

Version Header: 2021-07-28

Operation ID: delete-recurring-task

Tags: Recurring Tasks

cURL

curl -X DELETE 'https://rest.gohighlevel.com/v1/locations/sx6wyHhbFdRXh302Lunr/recurring-tasks/sx6wyHhbFdRXh302Lunr' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0'

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

conn.request('DELETE', '/v1/locations/sx6wyHhbFdRXh302Lunr/recurring-tasks/sx6wyHhbFdRXh302Lunr', headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - DELETE sx6wyHhbFdRXh302Lunr",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "DELETE",
    "url": "https://rest.gohighlevel.com/v1/locations/sx6wyHhbFdRXh302Lunr/recurring-tasks/sx6wyHhbFdRXh302Lunr",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": false,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
id Path string Recurring Task Id [example: sx6wyHhbFdRXh302Lunr]
locationId Path string Location Id [example: sx6wyHhbFdRXh302Lunr]

Response Codes

Code Description Schema
200 Successful response - id (string) (required) (e.g. sx6wyHhbFdRXh302Lunr): Recurring Task Id
- success (boolean) (required) (e.g. True): Success
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


GET /locations/{locationId}/recurring-tasks/{id}

Summary: Get Recurring Task By Id

Get Recurring Task By Id

Version Header: 2021-07-28

Operation ID: get-recurring-task-by-id

Tags: Recurring Tasks

cURL

curl -X GET 'https://rest.gohighlevel.com/v1/locations/sx6wyHhbFdRXh302Lunr/recurring-tasks/sx6wyHhbFdRXh302Lunr' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0'

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

conn.request('GET', '/v1/locations/sx6wyHhbFdRXh302Lunr/recurring-tasks/sx6wyHhbFdRXh302Lunr', headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - GET sx6wyHhbFdRXh302Lunr",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "GET",
    "url": "https://rest.gohighlevel.com/v1/locations/sx6wyHhbFdRXh302Lunr/recurring-tasks/sx6wyHhbFdRXh302Lunr",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": false,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
id Path string Recurring Task Id [example: sx6wyHhbFdRXh302Lunr]
locationId Path string Location Id [example: sx6wyHhbFdRXh302Lunr]

Response Codes

Code Description Schema
200 Successful response - recurringTask (string) (required): Recurring Tasks
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


PUT /locations/{locationId}/recurring-tasks/{id}

Summary: Update Recurring Task

Update Recurring Task

Version Header: 2021-07-28

Operation ID: update-recurring-task

Tags: Recurring Tasks

cURL

curl -X PUT 'https://rest.gohighlevel.com/v1/locations/sx6wyHhbFdRXh302Lunr/recurring-tasks/sx6wyHhbFdRXh302Lunr' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0' \
  -d '{}'  # See request body schema below

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

payload = json.dumps({})
conn.request('PUT', '/v1/locations/sx6wyHhbFdRXh302Lunr/recurring-tasks/sx6wyHhbFdRXh302Lunr', body=payload, headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - PUT sx6wyHhbFdRXh302Lunr",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "PUT",
    "url": "https://rest.gohighlevel.com/v1/locations/sx6wyHhbFdRXh302Lunr/recurring-tasks/sx6wyHhbFdRXh302Lunr",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": true,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
id Path string Recurring Task Id [example: sx6wyHhbFdRXh302Lunr]
locationId Path string Location Id [example: sx6wyHhbFdRXh302Lunr]

Request Body Schema

  • title (string) (e.g. Task Name): Name of the task
  • description (string) (e.g. Task Description): Description of the task
  • contactIds (array) (e.g. ['sx6wyHhbFdRXh302Lunr']): Contact Id
  • owners (array) (e.g. ['sx6wyHhbFdRXh302Lunr']): Assigned To
  • rruleOptions (string) (e.g. {'intervalType': 'hourly', 'interval': 1, 'startDate': '2025-07-23T10:00:00.000Z', 'dueAfterSeconds': 600}): Recurring rules
  • ignoreTaskCreation (boolean) (e.g. True): Create initial task or not

Response Codes

Code Description Schema
200 Successful response - recurringTask (string) (required): Recurring Tasks
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


GET /locations/{locationId}/tags

Summary: Get Tags

Get Sub-Account (Formerly Location) Tags

Version Header: 2021-07-28

Operation ID: get-location-tags

Tags: Tags

cURL

curl -X GET 'https://rest.gohighlevel.com/v1/locations/VALUE/tags' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0'

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

conn.request('GET', '/v1/locations/VALUE/tags', headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - GET tags",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "GET",
    "url": "https://rest.gohighlevel.com/v1/locations/VALUE/tags",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": false,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
locationId Path string Location Id

Response Codes

Code Description Schema
200 Successful response - tags (array of LocationTagsSchema)
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.
422 Unprocessable Entity Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


POST /locations/{locationId}/tags

Summary: Create Tag

Create tag

Version Header: 2021-07-28

Operation ID: create-tag

Tags: Tags

cURL

curl -X POST 'https://rest.gohighlevel.com/v1/locations/VALUE/tags' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0' \
  -d '{}'  # See request body schema below

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

payload = json.dumps({})
conn.request('POST', '/v1/locations/VALUE/tags', body=payload, headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - POST tags",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "POST",
    "url": "https://rest.gohighlevel.com/v1/locations/VALUE/tags",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": true,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
locationId Path string Location Id

Request Body Schema

  • name (string) (required) (e.g. Tag): Tag name

Response Codes

Code Description Schema
200 Successful response - tag (LocationTagsSchema)
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.
422 Unprocessable Entity Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


DELETE /locations/{locationId}/tags/{tagId}

Summary: Delete tag

Delete tag

Version Header: 2021-07-28

Operation ID: delete-tag

Tags: Tags

cURL

curl -X DELETE 'https://rest.gohighlevel.com/v1/locations/VALUE/tags/VALUE' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0'

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

conn.request('DELETE', '/v1/locations/VALUE/tags/VALUE', headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - DELETE VALUE",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "DELETE",
    "url": "https://rest.gohighlevel.com/v1/locations/VALUE/tags/VALUE",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": false,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
locationId Path string Location Id
tagId Path string Tag Id

Response Codes

Code Description Schema
200 Successful response - succeded (boolean) (e.g. True)
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.
422 Unprocessable Entity Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


GET /locations/{locationId}/tags/{tagId}

Summary: Get tag by id

Get tag by id

Version Header: 2021-07-28

Operation ID: get-tag-by-id

Tags: Tags

cURL

curl -X GET 'https://rest.gohighlevel.com/v1/locations/VALUE/tags/VALUE' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0'

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

conn.request('GET', '/v1/locations/VALUE/tags/VALUE', headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - GET VALUE",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "GET",
    "url": "https://rest.gohighlevel.com/v1/locations/VALUE/tags/VALUE",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": false,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
locationId Path string Location Id
tagId Path string Tag Id

Response Codes

Code Description Schema
200 Successful response - tag (LocationTagsSchema)
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.
422 Unprocessable Entity Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


PUT /locations/{locationId}/tags/{tagId}

Summary: Update tag

Update tag

Version Header: 2021-07-28

Operation ID: update-tag

Tags: Tags

cURL

curl -X PUT 'https://rest.gohighlevel.com/v1/locations/VALUE/tags/VALUE' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0' \
  -d '{}'  # See request body schema below

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

payload = json.dumps({})
conn.request('PUT', '/v1/locations/VALUE/tags/VALUE', body=payload, headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - PUT VALUE",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "PUT",
    "url": "https://rest.gohighlevel.com/v1/locations/VALUE/tags/VALUE",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": true,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
locationId Path string Location Id
tagId Path string Tag Id

Request Body Schema

  • name (string) (required) (e.g. Tag): Tag name

Response Codes

Code Description Schema
200 Successful response - tag (LocationTagsSchema)
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.
422 Unprocessable Entity Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


POST /locations/{locationId}/tasks/search

Summary: Task Search Filter

Task Search

Version Header: 2021-07-28

Operation ID: task-search

Tags: Tasks Search

cURL

curl -X POST 'https://rest.gohighlevel.com/v1/locations/VALUE/tasks/search' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0' \
  -d '{}'  # See request body schema below

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

payload = json.dumps({})
conn.request('POST', '/v1/locations/VALUE/tasks/search', body=payload, headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - POST search",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "POST",
    "url": "https://rest.gohighlevel.com/v1/locations/VALUE/tasks/search",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": true,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
locationId Path string Location Id

Request Body Schema

  • contactId (array) (e.g. ['dSMo5jnqkJyh8YeGXM7k', 'j5WESpmRj816VtyUuWwh']): Contact Ids
  • completed (boolean) (e.g. True): Task Completed Or Pending
  • assignedTo (array) (e.g. ['0004Mtfsd11SBU1mBPgd']): Assigned User Ids
  • query (string) (e.g. Task Name): Search Value
  • limit (number) (e.g. 10): Limit To Api
  • skip (number) (e.g. 10): Number Of Tasks To Skip
  • businessId (string) (e.g. 6348240b98722079e5417332): Bussiness Id

Response Codes

Code Description Schema
200 Successful response - tasks (array)
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.
422 Unprocessable Entity Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.

📌 POST for Search: Search endpoints use POST instead of GET because the search filters are complex JSON objects that can't be easily encoded in query parameters.


GET /locations/{locationId}/templates

Summary: GET all or email/sms templates

GET all or email/sms templates

Version Header: 2021-07-28

Operation ID: GET-all-or-email-sms-templates

Tags: Template

cURL

curl -X GET 'https://rest.gohighlevel.com/v1/locations/VALUE/templates?deleted=VALUE&skip=VALUE&limit=VALUE&type=sms&originId=VALUE' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0'

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

conn.request('GET', '/v1/locations/VALUE/templates?deleted=VALUE&skip=VALUE&limit=VALUE&type=VALUE&originId=VALUE', headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - GET templates",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "GET",
    "url": "https://rest.gohighlevel.com/v1/locations/VALUE/templates",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": false,
    "bodyParameters": {
      "parameters": []
    },
    "options": {},
    "sendQuery": true,
    "queryParameters": {
      "parameters": [
        {
          "name": "deleted",
          "value": "VALUE"
        },
        {
          "name": "skip",
          "value": "VALUE"
        },
        {
          "name": "limit",
          "value": "VALUE"
        },
        {
          "name": "type",
          "value": "VALUE"
        },
        {
          "name": "originId",
          "value": "VALUE"
        }
      ]
    }
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
deleted Query boolean
skip Query string
limit Query string
type Query string (values: sms, email, whatsapp)
originId Query string Origin Id
locationId Path string Location Id

Response Codes

Code Description Schema
200 Successful response - templates (array)
- totalCount (number) (e.g. 100)
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.
422 Unprocessable Entity Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


DELETE /locations/{locationId}/templates/{id}

Summary: DELETE an email/sms template

DELETE an email/sms template

Version Header: 2021-07-28

Operation ID: DELETE-an-email-sms-template

Tags: Template

cURL

curl -X DELETE 'https://rest.gohighlevel.com/v1/locations/VALUE/templates/VALUE' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0'

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

conn.request('DELETE', '/v1/locations/VALUE/templates/VALUE', headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - DELETE VALUE",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "DELETE",
    "url": "https://rest.gohighlevel.com/v1/locations/VALUE/templates/VALUE",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": false,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Request Parameters

Name Location Type Required Description
locationId Path string Location Id
id Path string Template Id

Response Codes

Code Description Schema
200
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.
422 Unprocessable Entity Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


GET /locations/{locationId}/timezones

Summary: Fetch Timezones

Fetch the available timezones

Version Header: 2021-07-28

Operation ID: get-timezones

Tags: Timezone

cURL

curl -X GET 'https://rest.gohighlevel.com/v1/locations/{locationId}/timezones' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0'

Python (http.client)

import http.client
import json

conn = http.client.HTTPSConnection('rest.gohighlevel.com')

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Version': '2021-07-28',
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'User-Agent': 'YourApp/1.0',
}

conn.request('GET', '/v1/locations/{locationId}/timezones', headers=headers)

response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()

n8n HTTP Node

{
  "name": "GHL - GET timezones",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "GET",
    "url": "https://rest.gohighlevel.com/v1/locations/{locationId}/timezones",
    "authentication": "genericCredentialType",
    "genericAuthType": "httpHeaderAuth",
    "sendHeaders": true,
    "headerParameters": {
      "parameters": [
        {
          "name": "Authorization",
          "value": "Bearer YOUR_API_TOKEN"
        },
        {
          "name": "Version",
          "value": "2021-07-28"
        },
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Accept",
          "value": "application/json"
        },
        {
          "name": "User-Agent",
          "value": "YourApp/1.0"
        }
      ]
    },
    "sendBody": false,
    "bodyParameters": {
      "parameters": []
    },
    "options": {}
  }
}

To use in n8n:

  1. Add an HTTP Request node
  2. Switch to JSON mode (Parameters → use RAW JSON)
  3. Paste the JSON above
  4. Update YOUR_API_TOKEN with your actual GHL API key

Response Codes

Code Description Schema
200 Successful response
400 Bad Request Standard error response for bad requests (400). Contains message, statusCode fields.
401 Unauthorized Standard error response for unauthorized requests (401). Contains message, statusCode fields.
422 Unprocessable Entity Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields.

⚠️ Special Notes & Quirks

⚠️ User-Agent Required: All GHL API requests require a User-Agent HTTP header. Requests without it may be rejected with a 403 error.


Documentation generated from GHL OpenAPI specifications. Verify against official docs for latest changes.