Docly

Docly

Did You Know?

Advanced visual search system powered by Ajax

Contact Workflow

Estimated reading: 14 minutes 33 views

POST /v1/contacts/:contactId/workflow/:workflowId

				
					https://rest.gohighlevel.com/v1/contacts/:contactId/workflow/:workflowId				
			

Add contact to the workflow.

Adding contact into workflow will allow these fields.

Fields Types Example
eventStartTime
string(datetime with timezone offset).
2021-06-23T03:30:00+01:00

Note:

This request will add contact in queue to be added in workflow. This will not get to be added realtime.

Authorization:

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

AUTHORIZATION Bearer Token

Token

<token>

HEADERS

Content-Type

application/json

PATH VARIABLES

contactId

sx6wyHhbFdRXh302LLNR

(Required) Contact Id

workflowId

78559bb3-b920-461e-b010-7b2a2816d2a9

(Required) Workflow Id

BODY raw (json)

				
					{
    "eventStartTime": "2021-05-26T11:33:49.000Z"
}				
			

EXAMPLE REQUEST (curl)

				
					curl --location 'https://rest.gohighlevel.com/v1/contacts/sx6wyHhbFdRXh302LLNR/workflow/78559bb3-b920-461e-b010-7b2a2816d2a9' \
--header 'Authorization: Bearer <token>' \
--data '{
    "eventStartTime": "2021-05-26T11:33:49.000Z"
}'				
			

EXAMPLE RESPONSE (json)

				
					""				
			

GET /v1/contacts/

				
					https://rest.gohighlevel.com/v1/contacts/?startAfterId=UIaE1WjAwWKdlyD7osQI&startAfter=1603870249758&limit=20&query=John				
			

Get Contacts.

Filters:

Fields Description
query
It will search on these fields: Name, Phone, Email, Tags, and Company Name.

Sorting:

Fields Allowed Options Default Value
sortBy
date_added or date_updated
date_added
order
asc or desc
desc

Pagination:

We will by default return the first matched 20 contacts. You can fetched next and more by passing the page on the query params (deprecated). You can see page info and total records count on to the meta

New: You can fetched next and more by passing the startAfter and startAfterId on the query params. You can see startAfterId and startAfter fields found into the response meta field.

Authorization:

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

AUTHORIZATION Bearer Token

Token

<token>

PARAMS

startAfterId

UIaE1WjAwWKdlyD7osQI

Start After Id

startAfter

1603870249758

Start After

limit

20

Limit Per Page records count. will allow maximum up to 100 and default will be 20

limit

John

Contact Query

EXAMPLE REQUEST (curl)

				
					curl --location 'https://rest.gohighlevel.com/v1/contacts/?startAfterId=UIaE1WjAwWKdlyD7osQI&startAfter=1603870249758&limit=20&query=John' \
--header 'Authorization: Bearer <token>'				
			

EXAMPLE RESPONSE (json)

				
					{
  "contacts": [
    {
      "id": "ocQHyuzHvysMo5N5VsXc",
      "locationId": "C2QujeCh8ZnC7al2InWR",
      "email": "JohnDeo@gmail.com",
      "emailLowerCase": "johndeo@gmail.com",
      "fingerprint": "91f4f0e0-e2dd-11ea-9b16-53b2d72e8a24",
      "timezone": "Asia/Calcutta",
      "country": "DE",
      "source": "xyz form",
      "dateAdded": "2020-10-29T09:31:30.255Z",
      "customField": [
        {
          "id": "MgobCB14YMVKuE4Ka8p1",
          "value": "cillum in ullamco dolor commodo"
        },
        {
          "id": "MgobCB14YMVKuE4Ka8p1",
          "value": "tempor"
        }
      ],
      "tags": [
        "magna ut sint labore lab",
        "Duis nulla cillum"
      ],
      "__moreField__": "ut consequat sit"
    },
    {
      "id": "ocQHyuzHvysMo5N5VsXc",
      "locationId": "C2QujeCh8ZnC7al2InWR",
      "email": "JohnDeo@gmail.com",
      "emailLowerCase": "johndeo@gmail.com",
      "fingerprint": "91f4f0e0-e2dd-11ea-9b16-53b2d72e8a24",
      "timezone": "Asia/Calcutta",
      "country": "DE",
      "source": "xyz form",
      "dateAdded": "2020-10-29T09:31:30.255Z",
      "customField": [
        {
          "id": "MgobCB14YMVKuE4Ka8p1",
          "value": "Duis Excepteur cupidatat d"
        },
        {
          "id": "MgobCB14YMVKuE4Ka8p1",
          "value": "pariatur"
        }
      ],
      "tags": [
        "veniam amet velit commodo",
        "ullamco eu sit mollit"
      ],
      "__moreField__": "cupidatat sit anim"
    }
  ],
  "meta": {
    "total": 250,
    "nextPageUrl": "https://rest.gohighlevel.com/v1/contacts?limit=1&q=j&startAfter=1603870249758&startAfterId=UIaE1WjAwWKdlyD7osQI",
    "startAfterId": "UIaE1WjAwWKdlyD7osQI",
    "startAfter": 1603870249758,
    "currentPage": 2,
    "nextPage": 3,
    "prevPage": 1
  }
}				
			

POST /v1/contacts/

				
					https://rest.gohighlevel.com/v1/contacts/				
			

Create a contact.

Create contact will allow this fields. ex:

Fields Types Example
firstName
string
John
lastName
string
Deo
name
string
John Deo
email
string
johndeo@gmail.com
phone
string
+1 888-888-8888
address1
long
Tonkawa Trail W
city
string
Austin
state
string
Texas
postalCode
string
45001
website
string(url)
https://www.google.com
timezone
string
America/Chihuahua
dnd
boolean
true
customField
object
{"3r6dEOnsApNaKIhnFM6u": "Value 1", "MgobCB14YMVKuE4Ka8p1": "Value 2"} Notes: 3r6dEOnsApNaKIhnFM6u and MgobCB14YMVKuE4Ka8p1 is a custom field id. You can find it using *Custom Fields* endpoints.
source
string
Public API

Validation:

Email or Phone are required to create contact

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)

				
					{
    "email": "john@deo.com",
    "phone": "+18887324197",
    "firstName": "John",
    "lastName": "Deo",
    "name": "John Deo",
    "dateOfBirth": "1990-09-25",
    "address1": "3535 1st St N",
    "city": "Dolomite",
    "state": "AL",
    "country": "US",
    "postalCode": "35061",
    "companyName": "DGS VolMAX",
    "website": "35061",
    "tags": [
        "aute consequat ad ea",
        "dolor sed"
    ],
    "source": "public api",
    "customField": {
        "__custom_field_id__": "exercitation"
    }
}				
			

EXAMPLE REQUEST (curl)

				
					curl --location 'https://rest.gohighlevel.com/v1/contacts/' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
    "email": "john@deo.com",
    "phone": "+18887324197",
    "firstName": "John",
    "lastName": "Deo",
    "name": "John Deo",
    "dateOfBirth": "1990-09-25",
    "address1": "3535 1st St N",
    "city": "Dolomite",
    "state": "AL",
    "country": "US",
    "postalCode": "35061",
    "companyName": "DGS VolMAX",
    "website": "35061",
    "tags": [
        "commodo",
        "veniam ut reprehenderit"
    ],
    "source": "public api",
    "customField": {
        "__custom_field_id__": "do in Lorem ut exercitation"
    }
}'				
			

EXAMPLE RESPONSE (json)

				
					{
  "contact": {
    "id": "ocQHyuzHvysMo5N5VsXc",
    "locationId": "C2QujeCh8ZnC7al2InWR",
    "email": "JohnDeo@gmail.com",
    "emailLowerCase": "johndeo@gmail.com",
    "fingerprint": "91f4f0e0-e2dd-11ea-9b16-53b2d72e8a24",
    "timezone": "Asia/Calcutta",
    "country": "DE",
    "source": "xyz form",
    "dateAdded": "2020-10-29T09:31:30.255Z",
    "customField": [
      {
        "id": "MgobCB14YMVKuE4Ka8p1",
        "value": "ea laboris consectetur elit sit"
      },
      {
        "id": "MgobCB14YMVKuE4Ka8p1",
        "value": "incididunt cupidatat nostrud qu"
      }
    ],
    "tags": [
      "laboris esse ut irure",
      "eiusmod exercitation irure ut"
    ],
    "__moreField__": "consequat"
  }
}				
			

GET /v1/contacts/lookup

				
					https://rest.gohighlevel.com/v1/contacts/lookup?email=john@deo.com&phone=+491971259866				
			

Search contact by email or phone number.

If you will pass email or phone, it will try find and give contacts based on that.

OR If you will pass both first it will try to find contact with email first and if it is not able to find contact then it will try to find the match based on the phone.

Authorization:

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

Validation:

Email or Phone are required to lookup contact.

AUTHORIZATION Bearer Token

Token

<token>

PARAMS

email

john@deo.com

(Required) Contact email

email

+491971259866

(Required) Contact phone

EXAMPLE REQUEST (curl)

				
					curl --location 'https://rest.gohighlevel.com/v1/contacts/lookup?email=john%40deo.com&phone=%2B491971259866' \
--header 'Authorization: Bearer <token>'				
			

EXAMPLE RESPONSE (json)

				
					{
  "contacts": [
    {
      "id": "ocQHyuzHvysMo5N5VsXc",
      "locationId": "C2QujeCh8ZnC7al2InWR",
      "email": "JohnDeo@gmail.com",
      "emailLowerCase": "johndeo@gmail.com",
      "fingerprint": "91f4f0e0-e2dd-11ea-9b16-53b2d72e8a24",
      "timezone": "Asia/Calcutta",
      "country": "DE",
      "source": "xyz form",
      "dateAdded": "2020-10-29T09:31:30.255Z",
      "customField": [
        {
          "id": "MgobCB14YMVKuE4Ka8p1",
          "value": "quis Excepteur nisi officia"
        },
        {
          "id": "MgobCB14YMVKuE4Ka8p1",
          "value": "laborum"
        }
      ],
      "tags": [
        "et incidi",
        "nulla eu commodo aliqua"
      ],
      "__moreField__": "exercitation nostrud ea"
    },
    {
      "id": "ocQHyuzHvysMo5N5VsXc",
      "locationId": "C2QujeCh8ZnC7al2InWR",
      "email": "JohnDeo@gmail.com",
      "emailLowerCase": "johndeo@gmail.com",
      "fingerprint": "91f4f0e0-e2dd-11ea-9b16-53b2d72e8a24",
      "timezone": "Asia/Calcutta",
      "country": "DE",
      "source": "xyz form",
      "dateAdded": "2020-10-29T09:31:30.255Z",
      "customField": [
        {
          "id": "MgobCB14YMVKuE4Ka8p1",
          "value": "consequat tempor sed cillum"
        },
        {
          "id": "MgobCB14YMVKuE4Ka8p1",
          "value": "occaecat anim"
        }
      ],
      "tags": [
        "deserunt sed est",
        "consequat id irure"
      ],
      "__moreField__": "qui dolor Lorem"
    }
  ]
}				
			

GET /v1/contacts/:id

				
					https://rest.gohighlevel.com/v1/contacts/:id				
			

Get contact by id.

Authorization:

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

AUTHORIZATION Bearer Token

Token

<token>

PATH VARIABLES

id

ocQHyuzHvysMo5N5VsXc

(Required) Contact Id

EXAMPLE REQUEST (curl)

				
					curl --location 'https://rest.gohighlevel.com/v1/contacts/ocQHyuzHvysMo5N5VsXc' \
--header 'Authorization: Bearer <token>'				
			
EXAMPLE RESPONSE (json)
				
					{
  "contact": {
    "id": "ocQHyuzHvysMo5N5VsXc",
    "locationId": "C2QujeCh8ZnC7al2InWR",
    "email": "JohnDeo@gmail.com",
    "emailLowerCase": "johndeo@gmail.com",
    "fingerprint": "91f4f0e0-e2dd-11ea-9b16-53b2d72e8a24",
    "timezone": "Asia/Calcutta",
    "country": "DE",
    "source": "xyz form",
    "dateAdded": "2020-10-29T09:31:30.255Z",
    "customField": [
      {
        "id": "MgobCB14YMVKuE4Ka8p1",
        "value": "ea laboris consectetur elit sit"
      },
      {
        "id": "MgobCB14YMVKuE4Ka8p1",
        "value": "incididunt cupidatat nostrud qu"
      }
    ],
    "tags": [
      "laboris esse ut irure",
      "eiusmod exercitation irure ut"
    ],
    "__moreField__": "consequat"
  }
}				
			

PUT /v1/contacts/:id

				
					https://rest.gohighlevel.com/v1/contacts/:id				
			

Update a contact.

Update contact will allow this fields. ex:

Fields Types Example
firstName
string
John
lastName
string
Deo
name
string
John Deo
email
string
johndeo@gmail.com
phone
string
+1 888-888-8888
address1
long
Tonkawa Trail W
city
string
Austin
state
string
Texas
postalCode
string
45001
website
string(url)
https://www.google.com
timezone
string
America/Chihuahua
dnd
boolean
true
tags
array
["tag1", "tag2"]
customField
object
{"3r6dEOnsApNaKIhnFM6u": "Value 1", "MgobCB14YMVKuE4Ka8p1": "Value 2"} Notes: 3r6dEOnsApNaKIhnFM6u and MgobCB14YMVKuE4Ka8p1 is a custom field id. You can find it using *Custom Fields* endpoints.
source
string
Public API

Validation:

Email or Phone are required to create contact

Authorization:

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

AUTHORIZATION Bearer Token

Token

<token>

HEADERS

Content-Type

application/json

PATH VARIABLES

id

ocQHyuzHvysMo5N5VsXc

(Required) Contact Id

BODY raw (json)

				
					{
    "firstName": "John",
    "lastName": "Deo",
    "name": "John Deo",
    "email": "john@deo.com",
    "phone": "+18887324197",
    "dateOfBirth": "1990-09-25",
    "address1": "3535 1st St N",
    "city": "Dolomite",
    "state": "AL",
    "country": "US",
    "postalCode": "35061",
    "companyName": "DGS VolMAX",
    "website": "35061",
    "tags": [
        "ea deserunt culpa laboris",
        "quis in veniam qui"
    ],
    "source": "public api",
    "customField": {
        "__custom_field_id__": "ea d"
    }
}				
			

EXAMPLE REQUEST (curl)

				
					curl --location --request PUT 'https://rest.gohighlevel.com/v1/contacts/ocQHyuzHvysMo5N5VsXc' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
    "firstName": "John",
    "lastName": "Deo",
    "name": "John Deo",
    "email": "john@deo.com",
    "phone": "+18887324197",
    "dateOfBirth": "1990-09-25",
    "address1": "3535 1st St N",
    "city": "Dolomite",
    "state": "AL",
    "country": "US",
    "postalCode": "35061",
    "companyName": "DGS VolMAX",
    "website": "35061",
    "tags": [
        "ea deserunt culpa laboris",
        "quis in veniam qui"
    ],
    "source": "public api",
    "customField": {
        "__custom_field_id__": "ea d"
    }
}'				
			

EXAMPLE RESPONSE (json)

				
					{
  "contact": {
    "id": "ocQHyuzHvysMo5N5VsXc",
    "locationId": "C2QujeCh8ZnC7al2InWR",
    "email": "JohnDeo@gmail.com",
    "emailLowerCase": "johndeo@gmail.com",
    "fingerprint": "91f4f0e0-e2dd-11ea-9b16-53b2d72e8a24",
    "timezone": "Asia/Calcutta",
    "country": "DE",
    "source": "xyz form",
    "dateAdded": "2020-10-29T09:31:30.255Z",
    "customField": [
      {
        "id": "MgobCB14YMVKuE4Ka8p1",
        "value": "ea laboris consectetur elit sit"
      },
      {
        "id": "MgobCB14YMVKuE4Ka8p1",
        "value": "incididunt cupidatat nostrud qu"
      }
    ],
    "tags": [
      "laboris esse ut irure",
      "eiusmod exercitation irure ut"
    ],
    "__moreField__": "consequat"
  }
}				
			

DELETE /v1/contacts/:id

				
					https://rest.gohighlevel.com/v1/contacts/:id				
			

Delete contact by id.

Authorization:

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

AUTHORIZATION Bearer Token

Token

<token>

PATH VARIABLES

id

ocQHyuzHvysMo5N5VsXc

(Required) Contact Id

EXAMPLE REQUEST (curl)

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

Leave a Comment

Share this Doc

Contact Workflow

Or copy link

CONTENTS