# GHL Forms API

**Endpoints:** 3
**Base URL:** `https://rest.gohighlevel.com/v1`

**Version Header(s):** `2021-07-28`

---

## Endpoints

- [GET /forms/](#get--forms-) — Get Forms
- [GET /forms/submissions](#get--forms-submissions) — Get Forms Submissions
- [POST /forms/upload-custom-files](#post--forms-upload-custom-files) — Upload files to custom fields

---

## GET /forms/

**Summary:** Get Forms

Get Forms

**Version Header:** `2021-07-28`

**Operation ID:** `get-forms`

**Tags:** Forms

### cURL

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

### Python (http.client)

```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/forms/?locationId=VALUE&skip=VALUE&limit=VALUE&type=VALUE', 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 forms",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "GET",
    "url": "https://rest.gohighlevel.com/v1/forms/",
    "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": "VALUE"
        },
        {
          "name": "skip",
          "value": "VALUE"
        },
        {
          "name": "limit",
          "value": "VALUE"
        },
        {
          "name": "type",
          "value": "VALUE"
        }
      ]
    }
  }
}
```

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

### Request Parameters

| Name | Location | Type | Required | Description |
|------|----------|------|----------|-------------|
| `locationId` | Query | `string` | ✅ |  |
| `skip` | Query | `number` | — |  |
| `limit` | Query | `number` | — | Limit Per Page records count. will allow maximum up to 50 and default will be 10 |
| `type` | Query | `string` | — |  |

### Response Codes

| Code | Description | Schema |
|------|-------------|--------|
| `200` | Successful response |   - **forms** (array of FormsParams)<br>  - **total** (number) (e.g. `20`): Total number of forms |
| `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 /forms/submissions

**Summary:** Get Forms Submissions

Get Forms Submissions

**Version Header:** `2021-07-28`

**Operation ID:** `get-forms-submissions`

**Tags:** Forms

### cURL

```bash
curl -X GET 'https://rest.gohighlevel.com/v1/forms/submissions?locationId=VALUE&page=VALUE&limit=VALUE&formId=VALUE&q=VALUE&startAt=VALUE&endAt=VALUE' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0'
```

### Python (http.client)

```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/forms/submissions?locationId=VALUE&page=VALUE&limit=VALUE&formId=VALUE&q=VALUE&startAt=VALUE&endAt=VALUE', 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 submissions",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "GET",
    "url": "https://rest.gohighlevel.com/v1/forms/submissions",
    "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": "VALUE"
        },
        {
          "name": "page",
          "value": "VALUE"
        },
        {
          "name": "limit",
          "value": "VALUE"
        },
        {
          "name": "formId",
          "value": "VALUE"
        },
        {
          "name": "q",
          "value": "VALUE"
        },
        {
          "name": "startAt",
          "value": "VALUE"
        },
        {
          "name": "endAt",
          "value": "VALUE"
        }
      ]
    }
  }
}
```

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

### Request Parameters

| Name | Location | Type | Required | Description |
|------|----------|------|----------|-------------|
| `locationId` | Query | `string` | ✅ |  |
| `page` | Query | `number` | — | Page No. By default it will be 1 |
| `limit` | Query | `number` | — | Limit Per Page records count. will allow maximum up to 100 and default will be 20 |
| `formId` | Query | `string` | — | Filter submission by form id |
| `q` | Query | `string` | — | Filter by contactId, name, email or phone no. |
| `startAt` | Query | `string` | — | Get submission by starting of this date. By default it will be same date of last month(YYYY-MM-DD). |
| `endAt` | Query | `string` | — | Get submission by ending of this date. By default it will be current date(YYYY-MM-DD). |

### Response Codes

| Code | Description | Schema |
|------|-------------|--------|
| `200` | Successful response |   - **submissions** (array of FormsSubmissionsSubmissionsSchema)<br>  - **meta** (metaSchema) |
| `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 /forms/upload-custom-files

**Summary:** Upload files to custom fields

Post the necessary fields for the API to upload files. The files need to be a buffer with the key "< custom_field_id >_< file_id >". <br /> Here custom field id is the ID of your custom field and file id is a randomly generated id (or uuid) <br /> There is support for multiple file uploads as well. Have multiple fields in the format mentioned.<br />File size is limited to 50 MB.<br /><br /> The allowed file types are: <br/> <ul><li>PDF</li><li>DOCX</li><li>DOC</li><li>JPG</li><li>JPEG</li><li>PNG</li><li>GIF</li><li>CSV</li><li>XLSX</li><li>XLS</li><li>MP4</li><li>MPEG</li><li>ZIP</li><li>RAR</li><li>TXT</li><li>SVG</li></ul> <br /><br /> The API will return the updated contact object.

**Version Header:** `2021-07-28`

**Operation ID:** `upload-to-custom-fields`

**Tags:** Forms

### cURL

```bash
curl -X POST 'https://rest.gohighlevel.com/v1/forms/upload-custom-files?contactId=VALUE&locationId=VALUE' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'User-Agent: YourApp/1.0'
```

### Python (http.client)

```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('POST', '/v1/forms/upload-custom-files?contactId=VALUE&locationId=VALUE', 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 upload-custom-files",
  "type": "n8n-nodes-base.httpRequest",
  "parameters": {
    "method": "POST",
    "url": "https://rest.gohighlevel.com/v1/forms/upload-custom-files",
    "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": {},
    "sendQuery": true,
    "queryParameters": {
      "parameters": [
        {
          "name": "contactId",
          "value": "VALUE"
        },
        {
          "name": "locationId",
          "value": "VALUE"
        }
      ]
    }
  }
}
```

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

### Request Parameters

| Name | Location | Type | Required | Description |
|------|----------|------|----------|-------------|
| `contactId` | Query | `string` | ✅ | Contact ID to upload the file to. |
| `locationId` | Query | `string` | ✅ | Location ID of the contact. |

### Response Codes

| Code | Description | Schema |
|------|-------------|--------|
| `200` | Successful response | — |
| `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. |
| `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. |

### ⚠️ 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.*