# GHL Contacts API
> ⚠️ **Deprecation:** `GET /contacts/` is deprecated. Use `POST /contacts/search` instead.
**Endpoints:** 32
**Base URL:** `https://rest.gohighlevel.com/v1`
**Version Header(s):** `2021-07-28`
---
## Endpoints
- [GET /contacts/](#get--contacts-) — Get Contacts
- [POST /contacts/](#post--contacts-) — Create Contact
- [POST /contacts/bulk/business](#post--contacts-bulk-business) — Add/Remove Contacts From Business
- [POST /contacts/bulk/tags/update/{type}](#post--contacts-bulk-tags-update-type) — Update Contacts Tags
- [GET /contacts/business/{businessId}](#get--contacts-business-businessId) — Get Contacts By BusinessId
- [POST /contacts/search](#post--contacts-search) — Search Contacts
- [GET /contacts/search/duplicate](#get--contacts-search-duplicate) — Get Duplicate Contact
- [POST /contacts/upsert](#post--contacts-upsert) — Upsert Contact
- [DELETE /contacts/{contactId}](#delete--contacts-contactId) — Delete Contact
- [GET /contacts/{contactId}](#get--contacts-contactId) — Get Contact
- [PUT /contacts/{contactId}](#put--contacts-contactId) — Update Contact
- [GET /contacts/{contactId}/appointments](#get--contacts-contactId-appointments) — Get Appointments for Contact
- [DELETE /contacts/{contactId}/campaigns/removeAll](#delete--contacts-contactId-campaigns-removeAll) — Remove Contact From Every Campaign
- [DELETE /contacts/{contactId}/campaigns/{campaignId}](#delete--contacts-contactId-campaigns-campaignId) — Remove Contact From Campaign
- [POST /contacts/{contactId}/campaigns/{campaignId}](#post--contacts-contactId-campaigns-campaignId) — Add Contact to Campaign
- [DELETE /contacts/{contactId}/followers](#delete--contacts-contactId-followers) — Remove Followers
- [POST /contacts/{contactId}/followers](#post--contacts-contactId-followers) — Add Followers
- [GET /contacts/{contactId}/notes](#get--contacts-contactId-notes) — Get All Notes
- [POST /contacts/{contactId}/notes](#post--contacts-contactId-notes) — Create Note
- [DELETE /contacts/{contactId}/notes/{id}](#delete--contacts-contactId-notes-id) — Delete Note
- [GET /contacts/{contactId}/notes/{id}](#get--contacts-contactId-notes-id) — Get Note
- [PUT /contacts/{contactId}/notes/{id}](#put--contacts-contactId-notes-id) — Update Note
- [DELETE /contacts/{contactId}/tags](#delete--contacts-contactId-tags) — Remove Tags
- [POST /contacts/{contactId}/tags](#post--contacts-contactId-tags) — Add Tags
- [GET /contacts/{contactId}/tasks](#get--contacts-contactId-tasks) — Get all Tasks
- [POST /contacts/{contactId}/tasks](#post--contacts-contactId-tasks) — Create Task
- [DELETE /contacts/{contactId}/tasks/{taskId}](#delete--contacts-contactId-tasks-taskId) — Delete Task
- [GET /contacts/{contactId}/tasks/{taskId}](#get--contacts-contactId-tasks-taskId) — Get Task
- [PUT /contacts/{contactId}/tasks/{taskId}](#put--contacts-contactId-tasks-taskId) — Update Task
- [PUT /contacts/{contactId}/tasks/{taskId}/completed](#put--contacts-contactId-tasks-taskId-completed) — Update Task Completed
- [DELETE /contacts/{contactId}/workflow/{workflowId}](#delete--contacts-contactId-workflow-workflowId) — Delete Contact from Workflow
- [POST /contacts/{contactId}/workflow/{workflowId}](#post--contacts-contactId-workflow-workflowId) — Add Contact to Workflow
---
## GET /contacts/
> ⚠️ **DEPRECATED** — This endpoint is deprecated and may be removed in a future version.
**Summary:** Get Contacts
Get Contacts
**Note:** This API endpoint is deprecated. Please use the [Search Contacts](https://marketplace.gohighlevel.com/docs/ghl/contacts/search-contacts-advanced) endpoint instead.
**Version Header:** `2021-07-28`
**Operation ID:** `get-contacts`
**Tags:** Contacts
### cURL
```bash
curl -X GET 'https://rest.gohighlevel.com/v1/contacts/?locationId=ve9EPM428h8vShlRW1KT&startAfterId=UIaE1WjAwWKdlyD7osQI&startAfter=1603870249758&query=John&limit=20' \
-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)
```python
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/contacts/?locationId=ve9EPM428h8vShlRW1KT&startAfterId=UIaE1WjAwWKdlyD7osQI&startAfter=1603870249758&query=John&limit=20', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - GET contacts",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://rest.gohighlevel.com/v1/contacts/",
"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": "locationId",
"value": "ve9EPM428h8vShlRW1KT"
},
{
"name": "startAfterId",
"value": "UIaE1WjAwWKdlyD7osQI"
},
{
"name": "startAfter",
"value": 1603870249758
},
{
"name": "query",
"value": "John"
},
{
"name": "limit",
"value": 20
}
]
}
}
}
```
**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` | Query | `string` | ✅ | Location Id [example: `ve9EPM428h8vShlRW1KT`] |
| `startAfterId` | Query | `string` | — | Start After Id [example: `UIaE1WjAwWKdlyD7osQI`] |
| `startAfter` | Query | `number` | — | Start Afte [example: `1603870249758`] |
| `query` | Query | `string` | — | Contact Query [example: `John`] |
| `limit` | Query | `number` | — | Limit Per Page records count. will allow maximum up to 100 and default will be 20 [example: `20`] |
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `200` | Successful response | - **contacts** (array of ContactsSearchSchema)
- **count** (number) (e.g. `10`) |
| `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.
> ⚠️ **DEPRECATED:** This `GET /contacts/` endpoint is deprecated. Use `POST /contacts/search` instead for all contact queries.
---
## POST /contacts/
**Summary:** Create Contact
Please find the list of acceptable values for the `country` field here
**Version Header:** `2021-07-28`
**Operation ID:** `create-contact`
**Tags:** Contacts
### cURL
```bash
curl -X POST 'https://rest.gohighlevel.com/v1/contacts/' \
-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)
```python
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/contacts/', body=payload, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - POST contacts",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://rest.gohighlevel.com/v1/contacts/",
"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
- **firstName** (string) (e.g. `Rosan`)
- **lastName** (string) (e.g. `Deo`)
- **name** (string) (e.g. `Rosan Deo`)
- **email** (string) (e.g. `rosan@deos.com`)
- **locationId** (string) (required) (e.g. `ve9EPM428h8vShlRW1KT`)
- **gender** (string) (e.g. `male`)
- **phone** (string) (e.g. `+1 888-888-8888`)
- **address1** (string) (e.g. `3535 1st St N`)
- **city** (string) (e.g. `Dolomite`)
- **state** (string) (e.g. `AL`)
- **postalCode** (string) (e.g. `35061`)
- **website** (string) (e.g. `https://www.tesla.com`)
- **timezone** (string) (e.g. `America/Chihuahua`)
- **dnd** (boolean) (e.g. `True`)
- **dndSettings** (DndSettingsSchema)
- **inboundDndSettings** (InboundDndSettingsSchema)
- **tags** (array) (e.g. `['nisi sint commodo amet', 'consequat']`)
- **customFields** (array)
- **source** (string) (e.g. `public api`)
- **dateOfBirth** (object) (e.g. `1990-09-25`): The birth date of the contact. Supported formats: YYYY/MM/DD, MM/DD/YYYY, YYYY-MM-DD, MM-DD-YYYY, YYYY.MM.DD, MM.DD.YYYY, YYYY_MM_DD, MM_DD_YYYY
- **country** (string) (e.g. `US`)
- **companyName** (string) (e.g. `DGS VolMAX`)
- **assignedTo** (string) (e.g. `y0BeYjuRIlDwsDcOHOJo`): User's Id
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `201` | Successful response | - **contact** (CreateContactSchema) |
| `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.
> ⚠️ **DEPRECATED:** This `GET /contacts/` endpoint is deprecated. Use `POST /contacts/search` instead for all contact queries.
---
## POST /contacts/bulk/business
**Summary:** Add/Remove Contacts From Business
Add/Remove Contacts From Business . Passing a `null` businessId will remove the businessId from the contacts
**Version Header:** `2021-07-28`
**Operation ID:** `add-remove-contact-from-business`
**Tags:** Bulk
### cURL
```bash
curl -X POST 'https://rest.gohighlevel.com/v1/contacts/bulk/business' \
-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)
```python
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/contacts/bulk/business', body=payload, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - POST business",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://rest.gohighlevel.com/v1/contacts/bulk/business",
"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
- **locationId** (string) (required) (e.g. `PX8m5VwxEbcpFlzYEPVG`)
- **ids** (array) (required) (e.g. `['IDqvFHGColiyK6jiatuz', 'pOC0uJ97VYOKH2m3fkMD']`)
- **businessId** (string) (required) (e.g. `63b7ec34ea409a9a8bd2a4ff`)
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `200` | Successful response | - **success** (boolean) (required) (e.g. `True`)
- **ids** (array) (required) (e.g. `['pOC0uJ97VYOKH2m3fkMD']`) |
| `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 /contacts/bulk/tags/update/{type}
**Summary:** Update Contacts Tags
Allows you to update tags to multiple contacts at once, you can add or remove tags from the contacts
**Version Header:** `2021-07-28`
**Operation ID:** `create-association`
**Tags:** Bulk
### cURL
```bash
curl -X POST 'https://rest.gohighlevel.com/v1/contacts/bulk/tags/update/{type}' \
-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)
```python
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/contacts/bulk/tags/update/{type}', body=payload, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - POST {type}",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://rest.gohighlevel.com/v1/contacts/bulk/tags/update/{type}",
"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
- **contacts** (array) (required) (e.g. `['qFSqySFkVvNzOSqgGqFi', 'abcdef', 'qFSqySFkVvNzOSqgGqFi', '3ualbhnV7j3n3a9r2moD']`): list of contact ids to be processed
- **tags** (array) (required) (e.g. `['tag-1', 'tag-2']`): list of tags to be added or removed
- **locationId** (string) (required) (e.g. `asdrwHvLUxlfw5SqKVCN`): location id from where the bulk request is executed
- **removeAllTags** (boolean) (e.g. `false`): Option to implement remove all tags. if true, all tags will be removed from the contacts. Can only be used with remove type.
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `201` | Successful response | - **succeded** (boolean) (required) (e.g. `True`): Indicates if the operation was successful
- **errorCount** (number) (required) (e.g. `0`): N... |
| `400` | Bad Request | Standard error response for bad requests (400). 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 /contacts/business/{businessId}
**Summary:** Get Contacts By BusinessId
Get Contacts By BusinessId
**Version Header:** `2021-07-28`
**Operation ID:** `get-contacts-by-businessId`
**Tags:** Contacts
### cURL
```bash
curl -X GET 'https://rest.gohighlevel.com/v1/contacts/business/VALUE?limit=10&locationId=5DP4iH6HLkQsiKESj6rh&skip=10&query=contact name' \
-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)
```python
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/contacts/business/VALUE?limit=10&locationId=5DP4iH6HLkQsiKESj6rh&skip=10&query=contact name', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - GET VALUE",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://rest.gohighlevel.com/v1/contacts/business/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": "limit",
"value": "10"
},
{
"name": "locationId",
"value": "5DP4iH6HLkQsiKESj6rh"
},
{
"name": "skip",
"value": "10"
},
{
"name": "query",
"value": "contact name"
}
]
}
}
}
```
**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 |
|------|----------|------|----------|-------------|
| `businessId` | Path | `string` | ✅ | |
| `limit` | Query | `string` | — | [example: `10`] |
| `locationId` | Query | `string` | ✅ | [example: `5DP4iH6HLkQsiKESj6rh`] |
| `skip` | Query | `string` | — | [example: `10`] |
| `query` | Query | `string` | — | [example: `contact name`] |
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `200` | Successful response | - **contacts** (array of ContactsSearchSchema)
- **count** (number) (e.g. `10`) |
| `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 /contacts/search
**Summary:** Search Contacts
Search contacts based on combinations of advanced filters. Documentation Link - https://doc.clickup.com/8631005/d/h/87cpx-158396/6e629989abe7fad
**Version Header:** `2021-07-28`
📖 [Official Documentation](https://doc.clickup.com/8631005/d/h/87cpx-158396/6e629989abe7fad)
**Operation ID:** `search-contacts-advanced`
**Tags:** Search
### cURL
```bash
curl -X POST 'https://rest.gohighlevel.com/v1/contacts/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)
```python
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/contacts/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
```json
{
"name": "GHL - POST search",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://rest.gohighlevel.com/v1/contacts/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 Body Schema
object — no documented properties
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `200` | Success | — |
| `400` | Bad Request | — |
| `401` | Unauthorized | — |
### ⚠️ 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 /contacts/search/duplicate
**Summary:** Get Duplicate Contact
Get Duplicate Contact.
If `Allow Duplicate Contact` is disabled under Settings, the global unique identifier will be used for searching the contact. If the setting is enabled, first priority for search is `email` and the second priority will be `phone`.
**Version Header:** `2021-07-28`
**Operation ID:** `get-duplicate-contact`
**Tags:** Search
### cURL
```bash
curl -X GET 'https://rest.gohighlevel.com/v1/contacts/search/duplicate?locationId=sadadya1u12basyhasd&number=+1423164516&email=abc@abc.com' \
-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)
```python
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/contacts/search/duplicate?locationId=sadadya1u12basyhasd&number=+1423164516&email=abc@abc.com', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - GET duplicate",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://rest.gohighlevel.com/v1/contacts/search/duplicate",
"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": "locationId",
"value": "sadadya1u12basyhasd"
},
{
"name": "number",
"value": "+1423164516"
},
{
"name": "email",
"value": "abc@abc.com"
}
]
}
}
}
```
**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` | Query | `string` | ✅ | Location Id [example: `sadadya1u12basyhasd`] |
| `number` | Query | `string` | — | Phone Number - Pass in URL Encoded form. i.e +1423164516 will become `%2B1423164516` [example: `+... |
| `email` | Query | `string` | — | Email - Pass in URL Encoded form. i.e test+abc@gmail.com will become `test%2Babc%40gmail.com` [ex... |
### 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. |
### ⚠️ 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 /contacts/upsert
**Summary:** Upsert Contact
Please find the list of acceptable values for the `country` field here
The Upsert API will adhere to the configuration defined under the “Allow Duplicate Contact” setting at the Location level. If the setting is configured to check both Email and Phone, the API will attempt to identify an existing contact based on the priority sequence specified in the setting, and will create or update the contact accordingly.
If two separate contacts already exist—one with the same email and another with the same phone—and an upsert request includes both the email and phone, the API will update the contact that matches the first field in the configured sequence, and ignore the second field to prevent duplication.
**Version Header:** `2021-07-28`
**Operation ID:** `upsert-contact`
**Tags:** Contacts
### cURL
```bash
curl -X POST 'https://rest.gohighlevel.com/v1/contacts/upsert' \
-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)
```python
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/contacts/upsert', body=payload, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - POST upsert",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://rest.gohighlevel.com/v1/contacts/upsert",
"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
- **firstName** (string) (e.g. `Rosan`)
- **lastName** (string) (e.g. `Deo`)
- **name** (string) (e.g. `Rosan Deo`)
- **email** (string) (e.g. `rosan@deos.com`)
- **locationId** (string) (required) (e.g. `ve9EPM428h8vShlRW1KT`)
- **gender** (string) (e.g. `male`)
- **phone** (string) (e.g. `+1 888-888-8888`)
- **address1** (string) (e.g. `3535 1st St N`)
- **city** (string) (e.g. `Dolomite`)
- **state** (string) (e.g. `AL`)
- **postalCode** (string) (e.g. `35061`)
- **website** (string) (e.g. `https://www.tesla.com`)
- **timezone** (string) (e.g. `America/Chihuahua`)
- **dnd** (boolean) (e.g. `True`)
- **dndSettings** (DndSettingsSchema)
- **inboundDndSettings** (InboundDndSettingsSchema)
- **tags** (array) (e.g. `['nisi sint commodo amet', 'consequat']`): This field will overwrite all current tags associated with the contact. To update a tags, it is recommended to use the Add Tag or Remove Tag API instead.
- **customFields** (array)
- **source** (string) (e.g. `public api`)
- **dateOfBirth** (object) (e.g. `1990-09-25`): The birth date of the contact. Supported formats: YYYY/MM/DD, MM/DD/YYYY, YYYY-MM-DD, MM-DD-YYYY, YYYY.MM.DD, MM.DD.YYYY, YYYY_MM_DD, MM_DD_YYYY
- **country** (string) (e.g. `US`)
- **companyName** (string) (e.g. `DGS VolMAX`)
- **assignedTo** (string) (e.g. `y0BeYjuRIlDwsDcOHOJo`): User's Id
- **createNewIfDuplicateAllowed** (boolean) (e.g. `False`): Controls whether to create a new contact or update an existing duplicate. **Scenario 1:** If this value is `true` and the location allows duplicate contacts, a new contact will be created immediately without checking for duplicates. **Scenario 2:** If this value is `true` but the location does not allow duplicate contacts, this field is ignored and the normal upsert behavior applies: the API will search for an existing duplicate contact, update it if found, or create a new contact if not found. **Scenario 3:** If this value is `false` or not provided, the normal upsert behavior applies regardless of the location's duplicate contact setting.
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `200` | Successful response | - **new** (boolean) (e.g. `True`)
- **contact** (GetContectByIdSchema)
- **traceId** (string) |
| `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 /contacts/{contactId}
**Summary:** Delete Contact
Delete Contact
**Version Header:** `2021-07-28`
**Operation ID:** `delete-contact`
**Tags:** Contacts
### cURL
```bash
curl -X DELETE 'https://rest.gohighlevel.com/v1/contacts/ocQHyuzHvysMo5N5VsXc' \
-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)
```python
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/contacts/ocQHyuzHvysMo5N5VsXc', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - DELETE ocQHyuzHvysMo5N5VsXc",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "DELETE",
"url": "https://rest.gohighlevel.com/v1/contacts/ocQHyuzHvysMo5N5VsXc",
"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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `ocQHyuzHvysMo5N5VsXc`] |
### 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 /contacts/{contactId}
**Summary:** Get Contact
Get Contact
**Version Header:** `2021-07-28`
**Operation ID:** `get-contact`
**Tags:** Contacts
### cURL
```bash
curl -X GET 'https://rest.gohighlevel.com/v1/contacts/ocQHyuzHvysMo5N5VsXc' \
-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)
```python
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/contacts/ocQHyuzHvysMo5N5VsXc', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - GET ocQHyuzHvysMo5N5VsXc",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://rest.gohighlevel.com/v1/contacts/ocQHyuzHvysMo5N5VsXc",
"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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `ocQHyuzHvysMo5N5VsXc`] |
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `200` | Successful response | - **contact** (GetContectByIdSchema) |
| `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 /contacts/{contactId}
**Summary:** Update Contact
Please find the list of acceptable values for the `country` field here
**Version Header:** `2021-07-28`
**Operation ID:** `update-contact`
**Tags:** Contacts
### cURL
```bash
curl -X PUT 'https://rest.gohighlevel.com/v1/contacts/ocQHyuzHvysMo5N5VsXc' \
-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)
```python
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/contacts/ocQHyuzHvysMo5N5VsXc', body=payload, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - PUT ocQHyuzHvysMo5N5VsXc",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "PUT",
"url": "https://rest.gohighlevel.com/v1/contacts/ocQHyuzHvysMo5N5VsXc",
"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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `ocQHyuzHvysMo5N5VsXc`] |
### Request Body Schema
- **firstName** (string) (e.g. `rosan`)
- **lastName** (string) (e.g. `Deo`)
- **name** (string) (e.g. `rosan Deo`)
- **email** (string) (e.g. `rosan@deos.com`)
- **phone** (string) (e.g. `+1 888-888-8888`)
- **address1** (string) (e.g. `3535 1st St N`)
- **city** (string) (e.g. `Dolomite`)
- **state** (string) (e.g. `AL`)
- **postalCode** (string) (e.g. `35061`)
- **website** (string) (e.g. `https://www.tesla.com`)
- **timezone** (string) (e.g. `America/Chihuahua`)
- **dnd** (boolean) (e.g. `True`)
- **dndSettings** (DndSettingsSchema)
- **inboundDndSettings** (InboundDndSettingsSchema)
- **tags** (array) (e.g. `['nisi sint commodo amet', 'consequat']`): This field will overwrite all current tags associated with the contact. To update a tags, it is recommended to use the Add Tag or Remove Tag API instead.
- **customFields** (array)
- **source** (string) (e.g. `public api`)
- **dateOfBirth** (object) (e.g. `1990-09-25`): The birth date of the contact. Supported formats: YYYY/MM/DD, MM/DD/YYYY, YYYY-MM-DD, MM-DD-YYYY, YYYY.MM.DD, MM.DD.YYYY, YYYY_MM_DD, MM_DD_YYYY
- **country** (string) (e.g. `US`)
- **assignedTo** (string) (e.g. `y0BeYjuRIlDwsDcOHOJo`): User's Id
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `200` | Successful response | - **succeded** (boolean) (e.g. `True`)
- **contact** (GetContectByIdSchema) |
| `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 /contacts/{contactId}/appointments
**Summary:** Get Appointments for Contact
Get Appointments for Contact
**Version Header:** `2021-07-28`
**Operation ID:** `get-appointments-for-contact`
**Tags:** Appointments
### cURL
```bash
curl -X GET 'https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/appointments' \
-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)
```python
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/contacts/sx6wyHhbFdRXh302LLNR/appointments', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - GET appointments",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/appointments",
"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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `sx6wyHhbFdRXh302LLNR`] |
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `200` | Successful response | - **events** (array of GetEventSchema) |
| `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 /contacts/{contactId}/campaigns/removeAll
**Summary:** Remove Contact From Every Campaign
Remove Contact From Every Campaign
**Version Header:** `2021-07-28`
**Operation ID:** `remove-contact-from-every-campaign`
**Tags:** Campaigns
### cURL
```bash
curl -X DELETE 'https://rest.gohighlevel.com/v1/contacts/3bZD1nQzbul0MCancbQD/campaigns/removeAll' \
-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)
```python
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/contacts/3bZD1nQzbul0MCancbQD/campaigns/removeAll', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - DELETE removeAll",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "DELETE",
"url": "https://rest.gohighlevel.com/v1/contacts/3bZD1nQzbul0MCancbQD/campaigns/removeAll",
"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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `3bZD1nQzbul0MCancbQD`] |
### 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.
---
## DELETE /contacts/{contactId}/campaigns/{campaignId}
**Summary:** Remove Contact From Campaign
Remove Contact From Campaign
**Version Header:** `2021-07-28`
**Operation ID:** `remove-contact-from-campaign`
**Tags:** Campaigns
### cURL
```bash
curl -X DELETE 'https://rest.gohighlevel.com/v1/contacts/3bZD1nQzbul0MCancbQD/campaigns/Y2I9XM7aO1hncuSOlc9L' \
-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)
```python
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/contacts/3bZD1nQzbul0MCancbQD/campaigns/Y2I9XM7aO1hncuSOlc9L', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - DELETE Y2I9XM7aO1hncuSOlc9L",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "DELETE",
"url": "https://rest.gohighlevel.com/v1/contacts/3bZD1nQzbul0MCancbQD/campaigns/Y2I9XM7aO1hncuSOlc9L",
"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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `3bZD1nQzbul0MCancbQD`] |
| `campaignId` | Path | `string` | ✅ | Campaigns Id [example: `Y2I9XM7aO1hncuSOlc9L`] |
### 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.
---
## POST /contacts/{contactId}/campaigns/{campaignId}
**Summary:** Add Contact to Campaign
Add contact to Campaign
**Version Header:** `2021-07-28`
**Operation ID:** `add-contact-to-campaign`
**Tags:** Campaigns
### cURL
```bash
curl -X POST 'https://rest.gohighlevel.com/v1/contacts/3bZD1nQzbul0MCancbQD/campaigns/Y2I9XM7aO1hncuSOlc9L' \
-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)
```python
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/contacts/3bZD1nQzbul0MCancbQD/campaigns/Y2I9XM7aO1hncuSOlc9L', body=payload, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - POST Y2I9XM7aO1hncuSOlc9L",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://rest.gohighlevel.com/v1/contacts/3bZD1nQzbul0MCancbQD/campaigns/Y2I9XM7aO1hncuSOlc9L",
"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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `3bZD1nQzbul0MCancbQD`] |
| `campaignId` | Path | `string` | ✅ | Campaigns Id [example: `Y2I9XM7aO1hncuSOlc9L`] |
### Request Body Schema
object — no documented properties
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `201` | 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.
---
## DELETE /contacts/{contactId}/followers
**Summary:** Remove Followers
Remove Followers
**Version Header:** `2021-07-28`
**Operation ID:** `remove-followers-contact`
**Tags:** Followers
### cURL
```bash
curl -X DELETE 'https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302Lunr/followers' \
-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)
```python
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/contacts/sx6wyHhbFdRXh302Lunr/followers', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - DELETE followers",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "DELETE",
"url": "https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302Lunr/followers",
"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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `sx6wyHhbFdRXh302Lunr`] |
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `200` | Successful response | - **followers** (array) (e.g. `['sx6wyHhbFdRXh302Lunr', 'sx6wyHhbFdRXh302LLss']`)
- **followersRemoved** (array) (e.g. `['Mx6wyHhbFdRXh302Luer'... |
| `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 /contacts/{contactId}/followers
**Summary:** Add Followers
Add Followers
**Version Header:** `2021-07-28`
**Operation ID:** `add-followers-contact`
**Tags:** Followers
### cURL
```bash
curl -X POST 'https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302Lunr/followers' \
-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)
```python
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/contacts/sx6wyHhbFdRXh302Lunr/followers', body=payload, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - POST followers",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302Lunr/followers",
"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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `sx6wyHhbFdRXh302Lunr`] |
### Request Body Schema
- **followers** (array) (required) (e.g. `['sx6wyHhbFdRXh302Lunr', 'sx6wyHhbFdRXh302Lunr']`)
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `201` | Successful response | - **followers** (array) (e.g. `['sx6wyHhbFdRXh302Lunr', 'sx6wyHhbFdRXh302LLss']`)
- **followersAdded** (array) (e.g. `['Mx6wyHhbFdRXh302Luer', ... |
| `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 /contacts/{contactId}/notes
**Summary:** Get All Notes
Get All Notes
**Version Header:** `2021-07-28`
**Operation ID:** `get-all-notes`
**Tags:** Notes
### cURL
```bash
curl -X GET 'https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/notes' \
-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)
```python
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/contacts/sx6wyHhbFdRXh302LLNR/notes', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - GET notes",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/notes",
"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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `sx6wyHhbFdRXh302LLNR`] |
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `200` | Successful response | - **notes** (array of GetNoteSchema) |
| `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 /contacts/{contactId}/notes
**Summary:** Create Note
Create Note
**Version Header:** `2021-07-28`
**Operation ID:** `create-note`
**Tags:** Notes
### cURL
```bash
curl -X POST 'https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/notes' \
-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)
```python
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/contacts/sx6wyHhbFdRXh302LLNR/notes', body=payload, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - POST notes",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/notes",
"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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `sx6wyHhbFdRXh302LLNR`] |
### Request Body Schema
- **userId** (string) (e.g. `GCs5KuzPqTls7vWclkEV`)
- **body** (string) (required) (e.g. `lorem ipsum`)
- **title** (string) (e.g. `Follow-up summary`)
- **color** (string) (e.g. `#FFAA00`)
- **pinned** (boolean) (e.g. `False`)
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `201` | Successful response | - **note** (GetNoteSchema) |
| `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 /contacts/{contactId}/notes/{id}
**Summary:** Delete Note
Delete Note
**Version Header:** `2021-07-28`
**Operation ID:** `delete-note`
**Tags:** Notes
### cURL
```bash
curl -X DELETE 'https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/notes/ocQHyuzHvysMo5N5VsXc' \
-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)
```python
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/contacts/sx6wyHhbFdRXh302LLNR/notes/ocQHyuzHvysMo5N5VsXc', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - DELETE ocQHyuzHvysMo5N5VsXc",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "DELETE",
"url": "https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/notes/ocQHyuzHvysMo5N5VsXc",
"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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `sx6wyHhbFdRXh302LLNR`] |
| `id` | Path | `string` | ✅ | Note Id [example: `ocQHyuzHvysMo5N5VsXc`] |
### 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 /contacts/{contactId}/notes/{id}
**Summary:** Get Note
Get Note
**Version Header:** `2021-07-28`
**Operation ID:** `get-note`
**Tags:** Notes
### cURL
```bash
curl -X GET 'https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/notes/ocQHyuzHvysMo5N5VsXc' \
-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)
```python
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/contacts/sx6wyHhbFdRXh302LLNR/notes/ocQHyuzHvysMo5N5VsXc', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - GET ocQHyuzHvysMo5N5VsXc",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/notes/ocQHyuzHvysMo5N5VsXc",
"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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `sx6wyHhbFdRXh302LLNR`] |
| `id` | Path | `string` | ✅ | Note Id [example: `ocQHyuzHvysMo5N5VsXc`] |
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `200` | Successful response | - **note** (GetNoteSchema) |
| `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 /contacts/{contactId}/notes/{id}
**Summary:** Update Note
Update Note
**Version Header:** `2021-07-28`
**Operation ID:** `update-note`
**Tags:** Notes
### cURL
```bash
curl -X PUT 'https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/notes/ocQHyuzHvysMo5N5VsXc' \
-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)
```python
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/contacts/sx6wyHhbFdRXh302LLNR/notes/ocQHyuzHvysMo5N5VsXc', body=payload, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - PUT ocQHyuzHvysMo5N5VsXc",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "PUT",
"url": "https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/notes/ocQHyuzHvysMo5N5VsXc",
"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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `sx6wyHhbFdRXh302LLNR`] |
| `id` | Path | `string` | ✅ | Note Id [example: `ocQHyuzHvysMo5N5VsXc`] |
### Request Body Schema
- **userId** (string) (e.g. `GCs5KuzPqTls7vWclkEV`)
- **body** (string) (e.g. `lorem ipsum`)
- **title** (string) (e.g. `Follow-up summary`)
- **color** (string) (e.g. `#FFAA00`)
- **pinned** (boolean) (e.g. `False`)
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `200` | Successful response | - **note** (GetNoteSchema) |
| `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 /contacts/{contactId}/tags
**Summary:** Remove Tags
Remove Tags
**Version Header:** `2021-07-28`
**Operation ID:** `remove-tags`
**Tags:** Tags
### cURL
```bash
curl -X DELETE 'https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/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)
```python
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/contacts/sx6wyHhbFdRXh302LLNR/tags', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - DELETE tags",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "DELETE",
"url": "https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `sx6wyHhbFdRXh302LLNR`] |
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `200` | Successful response | - **tags** (array) (e.g. `['minim', 'velit magna']`) |
| `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 /contacts/{contactId}/tags
**Summary:** Add Tags
Add Tags
**Version Header:** `2021-07-28`
**Operation ID:** `add-tags`
**Tags:** Tags
### cURL
```bash
curl -X POST 'https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/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)
```python
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/contacts/sx6wyHhbFdRXh302LLNR/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
```json
{
"name": "GHL - POST tags",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `sx6wyHhbFdRXh302LLNR`] |
### Request Body Schema
- **tags** (array) (required) (e.g. `['minim', 'velit magna']`)
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `201` | Successful response | - **tags** (array) (e.g. `['minim', 'velit magna']`) |
| `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 /contacts/{contactId}/tasks
**Summary:** Get all Tasks
Get all Tasks
**Version Header:** `2021-07-28`
**Operation ID:** `get-all-tasks`
**Tags:** Tasks
### cURL
```bash
curl -X GET 'https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/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'
```
### Python (http.client)
```python
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/contacts/sx6wyHhbFdRXh302LLNR/tasks', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - GET tasks",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/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": 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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `sx6wyHhbFdRXh302LLNR`] |
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `200` | Successful response | - **tasks** (array of TaskSchema) |
| `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 /contacts/{contactId}/tasks
**Summary:** Create Task
Create Task
**Version Header:** `2021-07-28`
**Operation ID:** `create-task`
**Tags:** Tasks
### cURL
```bash
curl -X POST 'https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/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)
```python
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/contacts/sx6wyHhbFdRXh302LLNR/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
```json
{
"name": "GHL - POST tasks",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `sx6wyHhbFdRXh302LLNR`] |
### Request Body Schema
- **title** (string) (required) (e.g. `First Task`)
- **body** (string) (e.g. `loram ipsum`)
- **dueDate** (string) (required) (e.g. `2020-10-25T11:00:00Z`)
- **completed** (boolean) (required) (e.g. `True`)
- **assignedTo** (string) (e.g. `hxHGVRb1YJUscrCB8eXK`)
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `201` | Successful response | - **task** (TaskSchema) |
| `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 /contacts/{contactId}/tasks/{taskId}
**Summary:** Delete Task
Delete Task
**Version Header:** `2021-07-28`
**Operation ID:** `delete-task`
**Tags:** Tasks
### cURL
```bash
curl -X DELETE 'https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/tasks/ocQHyuzHvysMo5N5VsXc' \
-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)
```python
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/contacts/sx6wyHhbFdRXh302LLNR/tasks/ocQHyuzHvysMo5N5VsXc', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - DELETE ocQHyuzHvysMo5N5VsXc",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "DELETE",
"url": "https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/tasks/ocQHyuzHvysMo5N5VsXc",
"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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `sx6wyHhbFdRXh302LLNR`] |
| `taskId` | Path | `string` | ✅ | Task Id [example: `ocQHyuzHvysMo5N5VsXc`] |
### 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. |
### ⚠️ 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 /contacts/{contactId}/tasks/{taskId}
**Summary:** Get Task
Get Task
**Version Header:** `2021-07-28`
**Operation ID:** `get-task`
**Tags:** Tasks
### cURL
```bash
curl -X GET 'https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/tasks/ocQHyuzHvysMo5N5VsXc' \
-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)
```python
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/contacts/sx6wyHhbFdRXh302LLNR/tasks/ocQHyuzHvysMo5N5VsXc', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - GET ocQHyuzHvysMo5N5VsXc",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/tasks/ocQHyuzHvysMo5N5VsXc",
"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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `sx6wyHhbFdRXh302LLNR`] |
| `taskId` | Path | `string` | ✅ | Task Id [example: `ocQHyuzHvysMo5N5VsXc`] |
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `200` | Successful response | - **task** (TaskSchema) |
| `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 /contacts/{contactId}/tasks/{taskId}
**Summary:** Update Task
Update Task
**Version Header:** `2021-07-28`
**Operation ID:** `update-task`
**Tags:** Tasks
### cURL
```bash
curl -X PUT 'https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/tasks/ocQHyuzHvysMo5N5VsXc' \
-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)
```python
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/contacts/sx6wyHhbFdRXh302LLNR/tasks/ocQHyuzHvysMo5N5VsXc', body=payload, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - PUT ocQHyuzHvysMo5N5VsXc",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "PUT",
"url": "https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/tasks/ocQHyuzHvysMo5N5VsXc",
"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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `sx6wyHhbFdRXh302LLNR`] |
| `taskId` | Path | `string` | ✅ | Task Id [example: `ocQHyuzHvysMo5N5VsXc`] |
### Request Body Schema
- **title** (string) (e.g. `First Task`)
- **body** (string) (e.g. `loram ipsum`)
- **dueDate** (string) (e.g. `2020-10-25T11:00:00Z`)
- **completed** (boolean) (e.g. `True`)
- **assignedTo** (string) (e.g. `hxHGVRb1YJUscrCB8eXK`)
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `200` | Successful response | - **task** (TaskSchema) |
| `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 /contacts/{contactId}/tasks/{taskId}/completed
**Summary:** Update Task Completed
Update Task Completed
**Version Header:** `2021-07-28`
**Operation ID:** `update-task-completed`
**Tags:** Tasks
### cURL
```bash
curl -X PUT 'https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/tasks/ocQHyuzHvysMo5N5VsXc/completed' \
-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)
```python
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/contacts/sx6wyHhbFdRXh302LLNR/tasks/ocQHyuzHvysMo5N5VsXc/completed', body=payload, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - PUT completed",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "PUT",
"url": "https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/tasks/ocQHyuzHvysMo5N5VsXc/completed",
"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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `sx6wyHhbFdRXh302LLNR`] |
| `taskId` | Path | `string` | ✅ | Task Id [example: `ocQHyuzHvysMo5N5VsXc`] |
### Request Body Schema
- **completed** (boolean) (required) (e.g. `True`)
### Response Codes
| Code | Description | Schema |
|------|-------------|--------|
| `200` | Successful response | - **task** (TaskSchema) |
| `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 /contacts/{contactId}/workflow/{workflowId}
**Summary:** Delete Contact from Workflow
Delete Contact from Workflow
**Version Header:** `2021-07-28`
**Operation ID:** `delete-contact-from-workflow`
**Tags:** Workflow
### cURL
```bash
curl -X DELETE 'https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/workflow/sx6wyHhbFdRXh302LLNR' \
-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)
```python
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/contacts/sx6wyHhbFdRXh302LLNR/workflow/sx6wyHhbFdRXh302LLNR', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - DELETE sx6wyHhbFdRXh302LLNR",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "DELETE",
"url": "https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/workflow/sx6wyHhbFdRXh302LLNR",
"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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `sx6wyHhbFdRXh302LLNR`] |
| `workflowId` | Path | `string` | ✅ | Workflow Id [example: `sx6wyHhbFdRXh302LLNR`] |
### 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.
---
## POST /contacts/{contactId}/workflow/{workflowId}
**Summary:** Add Contact to Workflow
Add Contact to Workflow
**Version Header:** `2021-07-28`
**Operation ID:** `add-contact-to-workflow`
**Tags:** Workflow
### cURL
```bash
curl -X POST 'https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/workflow/sx6wyHhbFdRXh302LLNR' \
-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)
```python
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/contacts/sx6wyHhbFdRXh302LLNR/workflow/sx6wyHhbFdRXh302LLNR', body=payload, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
```
### n8n HTTP Node
```json
{
"name": "GHL - POST sx6wyHhbFdRXh302LLNR",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/workflow/sx6wyHhbFdRXh302LLNR",
"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 |
|------|----------|------|----------|-------------|
| `contactId` | Path | `string` | ✅ | Contact Id [example: `sx6wyHhbFdRXh302LLNR`] |
| `workflowId` | Path | `string` | ✅ | Workflow Id [example: `sx6wyHhbFdRXh302LLNR`] |
### Request Body Schema
- **eventStartTime** (string) (e.g. `2021-06-23T03:30:00+01:00`)
### 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.
---
*Documentation generated from GHL OpenAPI specifications. Verify against official docs for latest changes.*