Docly

Docly

Did You Know?

We design Docly for the readers, optimizing not for page views or engagement

Custom Field

Estimated reading: 8 minutes 26 views

GET /v1/custom-fields/

				
					https://rest.gohighlevel.com/v1/custom-fields/				
			

Get all available custom fields.

Authorization:

Provide your location api key (Bearer Token). You can find here

AUTHORIZATION Bearer Token

Token

<token>

EXAMPLE REQUEST (curl)

				
					curl --location 'https://rest.gohighlevel.com/v1/custom-fields/' \
--header 'Authorization: Bearer <token>'				
			

EXAMPLE RESPONSE (json)

				
					{
  "customFields": [
    {
      "id": "ocQHyuzHvysMo5N5VsXc",
      "name": "Select",
      "fieldKey": "contact.select",
      "placeholder": "Placeholder Text",
      "position": 0,
      "dateType": "SINGLE_OPTIONS",
      "picklistOptions": [
        "first",
        "first"
      ]
    },
    {
      "id": "ocQHyuzHvysMo5N5VsXc",
      "name": "Select",
      "fieldKey": "contact.select",
      "placeholder": "Placeholder Text",
      "position": 0,
      "dateType": "SINGLE_OPTIONS",
      "picklistOptions": [
        "first",
        "first"
      ]
    }
  ]
}				
			

POST /v1/custom-fields/

				
					https://rest.gohighlevel.com/v1/custom-fields/				
			

Creating Custom Field.

Data Type Fields will allow these options. ex:

Options:

  • TEXT
  • LARGE_TEXT
  • NUMERICAL
  • PHONE
  • MONETORY
  • CHECKBOX
  • SINGLE_OPTIONS
  • MULTIPLE_OPTIONS
  • FLOAT
  • TIME
  • DATE
  • TEXTBOX_LIST
  • FILE_UPLOAD
  • SIGNATURE

Validation:

Name and Date Type are required to create every custom field.

On every data type of field have diffrent validation rules. These are the different validation rules.

FILE_UPLOAD:

  • acceptedFormat *(required) This will allow array of file format.
    • .pdf
    • .docx
    • .jpeg
    • .png
    • .gif
    • .csv
    • all
  • isMulitpalFile (optional) it allow true or false. If you want to allow multipal files pass true
  • maxNumberOfFiles (options) It will allow maximum these number of files.

SINGLE_OPTIONS / MULTIPLE_OPTIONS / CHECKBOX:

  • options *(required) This will allow array of options.

TEXTBOX_LIST

  • textBoxListOptions: (required) This will allow array of textbox list. Array will contanis label and prefillValue. ex.: {label": "Hello", "prefillValue": "value"}

     

Authorization:

Provide your location api key (Bearer Token). You can find here

AUTHORIZATION Bearer Token

Token

<token>

HEADERS

Content-Type

application/json

BODY raw (json)

				
					{
    "name": "Custom Field",
    "dataType": "TEXT",
    "placeholder": "Placeholder Text",
    "options": [
        "first option",
        "last option"
    ],
    "acceptedFormat": [
        ".pdf",
        ".docx",
        ".jpeg"
    ],
    "isMultipalFile": false,
    "maxNumberOfFiles": 2,
    "textBoxListOptions": [
        {
            "label": "First",
            "prefillValue": ""
        },
        {
            "label": "First",
            "prefillValue": ""
        }
    ],
    "position": 0
}				
			

EXAMPLE REQUEST (curl)

				
					curl --location 'https://rest.gohighlevel.com/v1/custom-fields/' \
--header 'Authorization: Bearer <token>' \
--data '{
    "name": "Custom Field",
    "dataType": "TEXT",
    "placeholder": "Placeholder Text",
    "options": [
        "first option",
        "last option"
    ],
    "acceptedFormat": [
        ".pdf",
        ".docx",
        ".jpeg"
    ],
    "isMultipalFile": false,
    "maxNumberOfFiles": 2,
    "textBoxListOptions": [
        {
            "label": "First",
            "prefillValue": ""
        },
        {
            "label": "First",
            "prefillValue": ""
        }
    ],
    "position": 0
}'				
			

EXAMPLE RESPONSE (json)

				
					{
  "id": "ocQHyuzHvysMo5N5VsXc",
  "name": "Select",
  "fieldKey": "contact.select",
  "placeholder": "Placeholder Text",
  "position": 0,
  "dateType": "SINGLE_OPTIONS",
  "picklistOptions": [
    "first",
    "first"
  ]
}				
			

GET /v1/custom-fields/:customFieldId

				
					https://rest.gohighlevel.com/v1/custom-fields/:customFieldId				
			

Get custom fields by id

Authorization:

Provide your location api key (Bearer Token). You can find here

AUTHORIZATION Bearer Token

Token

<token>

PATH VARIABLES

customFieldId

ocQHyuzHvysMo5N5VsXc

(Required) Custom Field Id

EXAMPLE REQUEST (curl)

				
					curl --location 'https://rest.gohighlevel.com/v1/custom-fields/ocQHyuzHvysMo5N5VsXc' \
--header 'Authorization: Bearer <token>'				
			

EXAMPLE RESPONSE (json)

				
					{
  "id": "ocQHyuzHvysMo5N5VsXc",
  "name": "Select",
  "fieldKey": "contact.select",
  "placeholder": "Placeholder Text",
  "position": 0,
  "dateType": "SINGLE_OPTIONS",
  "picklistOptions": [
    "first",
    "first"
  ]
}				
			

PUT /v1/custom-fields/:customFieldId

				
					https://rest.gohighlevel.com/v1/custom-fields/:customFieldId				
			

Updating Custom Field.

Data Type Fields will allow these options. ex:

Options:

  • TEXT
  • LARGE_TEXT
  • NUMERICAL
  • PHONE
  • MONETORY
  • CHECKBOX
  • SINGLE_OPTIONS
  • MULTIPLE_OPTIONS
  • FLOAT
  • TIME
  • DATE
  • TEXTBOX_LIST
  • FILE_UPLOAD
  • SIGNATURE

Validation:

Name and Date Type are required to create every custom field.

On every data type of field have diffrent validation rules. These are the different validation rules.

FILE_UPLOAD:

  • acceptedFormat *(required) This will allow array of file format.
    • .pdf
    • .docx
    • .jpeg
    • .png
    • .gif
    • .csv
    • all
  • isMulitpalFile (optional) it allow true or false. If you want to allow multipal files pass true
  • maxNumberOfFiles (options) It will allow maximum these number of files.

SINGLE_OPTIONS / MULTIPLE_OPTIONS / CHECKBOX:

  • options *(required) This will allow array of options.

TEXTBOX_LIST

  • textBoxListOptions: (required) This will allow array of textbox list. Array will contanis label and prefillValue. ex.: {label": "Hello", "prefillValue": "value"}

Authorization:

Provide your location api key (Bearer Token). You can find here

AUTHORIZATION Bearer Token

Token

<token>

HEADERS

Content-Type

application/json

PATH VARIABLES

customFieldId

ocQHyuzHvysMo5N5VsXc

(Required) Custom Field Id

BODY raw (json)

				
					{
    "name": "Custom Field",
    "dataType": "TEXT",
    "placeholder": "Placeholder Text",
    "options": [
        "first option",
        "last option"
    ],
    "acceptedFormat": [
        ".pdf",
        ".docx",
        ".jpeg"
    ],
    "isMultipalFile": false,
    "maxNumberOfFiles": 2,
    "textBoxListOptions": [
        {
            "label": "First",
            "prefillValue": ""
        },
        {
            "label": "First",
            "prefillValue": ""
        }
    ],
    "position": 0
}				
			

EXAMPLE REQUEST (curl)

				
					curl --location --request PUT 'https://rest.gohighlevel.com/v1/custom-fields/ocQHyuzHvysMo5N5VsXc' \
--header 'Authorization: Bearer <token>' \
--data '{
    "name": "Custom Field",
    "dataType": "TEXT",
    "placeholder": "Placeholder Text",
    "options": [
        "first option",
        "last option"
    ],
    "acceptedFormat": [
        ".pdf",
        ".docx",
        ".jpeg"
    ],
    "isMultipalFile": false,
    "maxNumberOfFiles": 2,
    "textBoxListOptions": [
        {
            "label": "First",
            "prefillValue": ""
        },
        {
            "label": "First",
            "prefillValue": ""
        }
    ],
    "position": 0
}'				
			

EXAMPLE RESPONSE (json)

				
					{
  "id": "ocQHyuzHvysMo5N5VsXc",
  "name": "Select",
  "fieldKey": "contact.select",
  "placeholder": "Placeholder Text",
  "position": 0,
  "dateType": "SINGLE_OPTIONS",
  "picklistOptions": [
    "first",
    "first"
  ]
}				
			

DELETE /v1/custom-fields/:customFieldId

				
					https://rest.gohighlevel.com/v1/custom-fields/:customFieldId				
			

Delete one of custom fields.

Authorization:

Provide your location api key (Bearer Token). You can find here

AUTHORIZATION Bearer Token

Token

<token>

PATH VARIABLES

customFieldId

ocQHyuzHvysMo5N5VsXc

(Required) Custom Field Id

EXAMPLE REQUEST (curl)

				
					curl --location --request DELETE 'https://rest.gohighlevel.com/v1/custom-fields/ocQHyuzHvysMo5N5VsXc' \
--header 'Authorization: Bearer <token>'				
			

EXAMPLE RESPONSE (json)

				
					""				
			

Leave a Comment

Share this Doc

Custom Field

Or copy link

CONTENTS