Docly

Docly

Did You Know?

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

Location

Estimated reading: 21 minutes 29 views

GET /v1/locations/

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

Get all agency location.

Authorization:

Provide your agency api key (Bearer Token). You can find it on Agency -> Settings -> API keys

AUTHORIZATION Bearer Token

Token

<token>

EXAMPLE REQUEST (curl)

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

EXAMPLE RESPONSE (json)

				
					{
  "locations": [
    {
      "id": "i2SpAtBVHSVea1sL6oah",
      "name": "Tesla inc",
      "address": "3500 Deer Creek Road",
      "city": "Palo Alto",
      "country": "US",
      "state": "CA",
      "postalCode": "94304",
      "website": "https://www.tesla.com",
      "timezone": "US/Central",
      "firstName": "John",
      "lastName": "Deo",
      "email": "john@deo.com",
      "phone": "+1202-555-0107",
      "apiKey": "2c359c82-590a-4d6f-ac76-32b7a1e649ea",
      "business": {
        "name": "Tesla inc",
        "address": "3500 Deer Creek Road",
        "city": "Palo Alto",
        "country": "US",
        "state": "CA",
        "postalCode": "94304",
        "website": "https://www.tesla.com",
        "timezone": "US/Central"
      },
      "social": {
        "facebookUrl": "https://facebook.com/groups/XXX",
        "googlePlus": "https://groups.google.com/d/XXX",
        "linkedIn": "https://www.linkedin.com/groups/XXX/profile",
        "foursquare": "https://foursquare.com/groups/XXX",
        "twitter": "https://twitter.com/XXX",
        "yelp": "https://yelp.com/XXX",
        "instagram": "https://instagram.com/XXX",
        "youtube": "https://youtube.com/XXX",
        "pinterest": "https://pinterest.com/XXX",
        "blogRss": "https://rss.xyz.com",
        "googlePlaceId": "redfdfdere"
      },
      "settings": {
        "allowDuplicateContact": false,
        "allowDuplicateOpportunity": false,
        "allowFacebookNameMerge": false,
        "disableContactTimezone": false
      }
    },
    {
      "id": "i2SpAtBVHSVea1sL6oah",
      "name": "Tesla inc",
      "address": "3500 Deer Creek Road",
      "city": "Palo Alto",
      "country": "US",
      "state": "CA",
      "postalCode": "94304",
      "website": "https://www.tesla.com",
      "timezone": "US/Central",
      "firstName": "John",
      "lastName": "Deo",
      "email": "john@deo.com",
      "phone": "+1202-555-0107",
      "apiKey": "2c359c82-590a-4d6f-ac76-32b7a1e649ea",
      "business": {
        "name": "Tesla inc",
        "address": "3500 Deer Creek Road",
        "city": "Palo Alto",
        "country": "US",
        "state": "CA",
        "postalCode": "94304",
        "website": "https://www.tesla.com",
        "timezone": "US/Central"
      },
      "social": {
        "facebookUrl": "https://facebook.com/groups/XXX",
        "googlePlus": "https://groups.google.com/d/XXX",
        "linkedIn": "https://www.linkedin.com/groups/XXX/profile",
        "foursquare": "https://foursquare.com/groups/XXX",
        "twitter": "https://twitter.com/XXX",
        "yelp": "https://yelp.com/XXX",
        "instagram": "https://instagram.com/XXX",
        "youtube": "https://youtube.com/XXX",
        "pinterest": "https://pinterest.com/XXX",
        "blogRss": "https://rss.xyz.com",
        "googlePlaceId": "redfdfdere"
      },
      "settings": {
        "allowDuplicateContact": false,
        "allowDuplicateOpportunity": false,
        "allowFacebookNameMerge": false,
        "disableContactTimezone": false
      }
    }
  ]
}				
			

POST /v1/locations/

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

Create a Location.

Required JSON fields in the body

Fields Types Example
businessName
string
ACME Agency

Allowed JSON fields in the body

Fields Types Example
address
string
3500 Deer Creek Road
city
string
Palo Alto
state
string
CA
country
string
US
postalCode
string
94304
website
string
https://www.tesla.com
timezone
string
US/Central
firstName
string
John
lastName
string
Deno
email
string
johndeo@gmail.com
phone
string
+1202-555-0107
settings
object
{ "allowDuplicateContact": false, "allowDuplicateOpportunity": false, "allowFacebookNameMerge": false, "disableContactTimezone": false }
twilio
object
{ "sid": "AC_XXXXXXXXXXX", "authToken": "77_XXXXXXXXXXX" }
snapshot
object
{ "id": "XXXXXXXXXXX", "type": "vertical" }
mailgun
object
{"mailgun": {"apiKey": "key-XXXXXXXXXXX", "domain": "replies.yourdomain.com"}

Twilio field required two field to setup

Fields Types Example
sid
string
AC_XXXXXXXXXXX (Twilio Account SID)
authToken
string
77_XXXXXXXXXXX (Twilio Auth Token)

Snapshot field required two field to import

Fields Types Example Allowed Option
id
string
XXXXXXXXXXX (Find it from snapshot api)
type
string
own
own, imported

Mailgun field required two field to setup

Fields Types Example
apiKey
string
key-XXXXXXXXXXX
domain
string
replies.yourdomain.com

Timezone field allowed options, Can grab it from the timezone list api.

 

Authorization:

Provide your agency api key (Bearer Token). You can find it on Agency -> Settings -> API keys

AUTHORIZATION Bearer Token

Token

<token>

HEADERS

Content-Type

application/json

BODY raw (json)

				
					{
    "businessName": "Tesla inc",
    "address": "3500 Deer Creek Road",
    "city": "Palo Alto",
    "country": "US",
    "state": "CA",
    "postalCode": "94304",
    "website": "https://www.tesla.com",
    "timezone": "US/Central",
    "firstName": "John",
    "lastName": "Deo",
    "email": "john@deo.com",
    "phone": "+1202-555-0107",
    "settings": {
        "allowDuplicateContact": false,
        "allowDuplicateOpportunity": false,
        "allowFacebookNameMerge": false,
        "disableContactTimezone": false
    },
    "twilio": {
        "sid": "AC_XXXXXXXXXXX",
        "authToken": "77_XXXXXXXXXXX"
    },
    "snapshot": {
        "id": "XXXXXXXXXXX",
        "type": "vertical"
    },
    "mailgun": {
        "apiKey": "key-XXXXXXXXXXX",
        "domain": "replies.yourdomain.com"
    },
    "social": {
        "facebookUrl": "https://facebook.com/groups/XXX",
        "googlePlus": "https://groups.google.com/d/XXX",
        "linkedIn": "https://www.linkedin.com/groups/XXX/profile",
        "foursquare": "https://foursquare.com/groups/XXX",
        "twitter": "https://twitter.com/XXX",
        "yelp": "https://yelp.com/XXX",
        "instagram": "https://instagram.com/XXX",
        "youtube": "https://youtube.com/XXX",
        "pinterest": "https://pinterest.com/XXX",
        "blogRss": "https://rss.xyz.com",
        "googlePlaceId": "redfdfdere"
    }
}				
			

EXAMPLE REQUEST (curl)

				
					curl --location 'https://rest.gohighlevel.com/v1/locations/' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
    "businessName": "Tesla inc",
    "address": "3500 Deer Creek Road",
    "city": "Palo Alto",
    "country": "US",
    "state": "CA",
    "postalCode": "94304",
    "website": "https://www.tesla.com",
    "timezone": "US/Central",
    "firstName": "John",
    "lastName": "Deo",
    "email": "john@deo.com",
    "phone": "+1202-555-0107",
    "settings": {
        "allowDuplicateContact": false,
        "allowDuplicateOpportunity": false,
        "allowFacebookNameMerge": false,
        "disableContactTimezone": false
    },
    "twilio": {
        "sid": "AC_XXXXXXXXXXX",
        "authToken": "77_XXXXXXXXXXX"
    },
    "snapshot": {
        "id": "XXXXXXXXXXX",
        "type": "vertical"
    },
    "mailgun": {
        "apiKey": "key-XXXXXXXXXXX",
        "domain": "replies.yourdomain.com"
    },
    "social": {
        "facebookUrl": "https://facebook.com/groups/XXX",
        "googlePlus": "https://groups.google.com/d/XXX",
        "linkedIn": "https://www.linkedin.com/groups/XXX/profile",
        "foursquare": "https://foursquare.com/groups/XXX",
        "twitter": "https://twitter.com/XXX",
        "yelp": "https://yelp.com/XXX",
        "instagram": "https://instagram.com/XXX",
        "youtube": "https://youtube.com/XXX",
        "pinterest": "https://pinterest.com/XXX",
        "blogRss": "https://rss.xyz.com",
        "googlePlaceId": "redfdfdere"
    }
}'				
			

EXAMPLE RESPONSE (json)

				
					{
  "id": "i2SpAtBVHSVea1sL6oah",
  "name": "Tesla inc",
  "address": "3500 Deer Creek Road",
  "city": "Palo Alto",
  "country": "US",
  "state": "CA",
  "postalCode": "94304",
  "website": "https://www.tesla.com",
  "timezone": "US/Central",
  "firstName": "John",
  "lastName": "Deo",
  "email": "john@deo.com",
  "phone": "+1202-555-0107",
  "apiKey": "2c359c82-590a-4d6f-ac76-32b7a1e649ea",
  "business": {
    "name": "Tesla inc",
    "email": "johndeo@gmail.com",
    "address": "3500 Deer Creek Road",
    "city": "Palo Alto",
    "country": "US",
    "state": "CA",
    "postalCode": "94304",
    "website": "https://www.tesla.com",
    "timezone": "US/Central"
  },
  "social": {
    "facebookUrl": "https://facebook.com/groups/XXX",
    "googlePlus": "https://groups.google.com/d/XXX",
    "linkedIn": "https://www.linkedin.com/groups/XXX/profile",
    "foursquare": "https://foursquare.com/groups/XXX",
    "twitter": "https://twitter.com/XXX",
    "yelp": "https://yelp.com/XXX",
    "instagram": "https://instagram.com/XXX",
    "youtube": "https://youtube.com/XXX",
    "pinterest": "https://pinterest.com/XXX",
    "blogRss": "https://rss.xyz.com",
    "googlePlaceId": "redfdfdere"
  },
  "settings": {
    "allowDuplicateContact": false,
    "allowDuplicateOpportunity": false,
    "allowFacebookNameMerge": false,
    "disableContactTimezone": false
  }
}				
			

GET /v1/locations/lookup

				
					https://rest.gohighlevel.com/v1/locations/lookup?email=john@deo.com				
			

Find location by email.

Authorization:

Provide your agency api key (Bearer Token). You can find it on Agency -> Settings -> API keys

Fields Types Example
businessName
string
ACME Agency

AUTHORIZATION Bearer Token

Token

<token>

PARAMS

email

john@deo.com

(Required) Email

EXAMPLE REQUEST (curl)

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

EXAMPLE RESPONSE (json)

				
					{
  "id": "i2SpAtBVHSVea1sL6oah",
  "name": "Tesla inc",
  "address": "3500 Deer Creek Road",
  "city": "Palo Alto",
  "country": "US",
  "state": "CA",
  "postalCode": "94304",
  "website": "https://www.tesla.com",
  "timezone": "US/Central",
  "firstName": "John",
  "lastName": "Deo",
  "email": "john@deo.com",
  "phone": "+1202-555-0107",
  "apiKey": "2c359c82-590a-4d6f-ac76-32b7a1e649ea",
  "business": {
    "name": "Tesla inc",
    "email": "johndeo@gmail.com",
    "address": "3500 Deer Creek Road",
    "city": "Palo Alto",
    "country": "US",
    "state": "CA",
    "postalCode": "94304",
    "website": "https://www.tesla.com",
    "timezone": "US/Central"
  },
  "social": {
    "facebookUrl": "https://facebook.com/groups/XXX",
    "googlePlus": "https://groups.google.com/d/XXX",
    "linkedIn": "https://www.linkedin.com/groups/XXX/profile",
    "foursquare": "https://foursquare.com/groups/XXX",
    "twitter": "https://twitter.com/XXX",
    "yelp": "https://yelp.com/XXX",
    "instagram": "https://instagram.com/XXX",
    "youtube": "https://youtube.com/XXX",
    "pinterest": "https://pinterest.com/XXX",
    "blogRss": "https://rss.xyz.com",
    "googlePlaceId": "redfdfdere"
  },
  "settings": {
    "allowDuplicateContact": false,
    "allowDuplicateOpportunity": false,
    "allowFacebookNameMerge": false,
    "disableContactTimezone": false
  }
}				
			

GET /v1/locations/:locationId

				
					https://rest.gohighlevel.com/v1/locations/:locationId				
			

Get location by location id.

Authorization:

Provide your agency api key (Bearer Token). You can find it on Agency -> Settings -> API keys

AUTHORIZATION Bearer Token

Token

<token>

PATH VARIABLES

locationId

i2SpAtBVHSVea1sL6oah

(Required) Location Id

EXAMPLE REQUEST (curl)

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

EXAMPLE RESPONSE (json)

				
					{
  "id": "i2SpAtBVHSVea1sL6oah",
  "name": "Tesla inc",
  "address": "3500 Deer Creek Road",
  "city": "Palo Alto",
  "country": "US",
  "state": "CA",
  "postalCode": "94304",
  "website": "https://www.tesla.com",
  "timezone": "US/Central",
  "firstName": "John",
  "lastName": "Deo",
  "email": "john@deo.com",
  "phone": "+1202-555-0107",
  "apiKey": "2c359c82-590a-4d6f-ac76-32b7a1e649ea",
  "business": {
    "name": "Tesla inc",
    "email": "johndeo@gmail.com",
    "address": "3500 Deer Creek Road",
    "city": "Palo Alto",
    "country": "US",
    "state": "CA",
    "postalCode": "94304",
    "website": "https://www.tesla.com",
    "timezone": "US/Central"
  },
  "social": {
    "facebookUrl": "https://facebook.com/groups/XXX",
    "googlePlus": "https://groups.google.com/d/XXX",
    "linkedIn": "https://www.linkedin.com/groups/XXX/profile",
    "foursquare": "https://foursquare.com/groups/XXX",
    "twitter": "https://twitter.com/XXX",
    "yelp": "https://yelp.com/XXX",
    "instagram": "https://instagram.com/XXX",
    "youtube": "https://youtube.com/XXX",
    "pinterest": "https://pinterest.com/XXX",
    "blogRss": "https://rss.xyz.com",
    "googlePlaceId": "redfdfdere"
  },
  "settings": {
    "allowDuplicateContact": false,
    "allowDuplicateOpportunity": false,
    "allowFacebookNameMerge": false,
    "disableContactTimezone": false
  }
}				
			

PUT /v1/locations/:locationId

				
					https://rest.gohighlevel.com/v1/locations/:locationId				
			

Update a Location.

Required JSON fields in the body

Fields Types Example
address
string
3500 Deer Creek Road
city
string
Palo Alto
state
string
CA
country
string
US
postalCode
string
94304
website
string
https://www.tesla.com
timezone
string
US/Central
firstName
string
John
lastName
string
Deno
email
string
johndeo@gmail.com
phone
string
+1202-555-0107
settings
object
{ "allowDuplicateContact": false, "allowDuplicateOpportunity": false, "allowFacebookNameMerge": false, "disableContactTimezone": false }
twilio
object
{ "sid": "AC_XXXXXXXXXXX", "authToken": "77_XXXXXXXXXXX" }
snapshot
object
{ "id": "XXXXXXXXXXX", "type": "vertical" }
mailgun
object
{"mailgun": {"apiKey": "key-XXXXXXXXXXX", "domain": "replies.yourdomain.com"}

Twilio field required two field to setup

Fields Types Example
sid
string
AC_XXXXXXXXXXX (Twilio Account SID)
authToken
string
77_XXXXXXXXXXX (Twilio Auth Token)

Mailgun field required two field to setup

Fields Types Example
apiKey
string
key-XXXXXXXXXXX
domain
string
replies.yourdomain.com

Timezone field allowed options, Can grab it from the timezone list api.

 

Authorization:

Provide your agency api key (Bearer Token). You can find it on Agency -> Settings -> API keys

AUTHORIZATION Bearer Token

Token

<token>

HEADERS

Content-Type

application/json

PATH VARIABLES

locationId

i2SpAtBVHSVea1sL6oah

(Required) Location Id

BODY raw (json)

				
					{
    "businessName": "Tesla inc",
    "address": "3500 Deer Creek Road",
    "city": "Palo Alto",
    "country": "US",
    "state": "CA",
    "postalCode": "94304",
    "website": "https://www.tesla.com",
    "timezone": "US/Central",
    "firstName": "John",
    "lastName": "Deo",
    "email": "john@deo.com",
    "phone": "+1202-555-0107",
    "settings": {
        "allowDuplicateContact": false,
        "allowDuplicateOpportunity": false,
        "allowFacebookNameMerge": false,
        "disableContactTimezone": false
    },
    "twilio": {
        "sid": "AC_XXXXXXXXXXX",
        "authToken": "77_XXXXXXXXXXX"
    },
    "snapshot": {
        "id": "XXXXXXXXXXX",
        "type": "vertical"
    },
    "mailgun": {
        "apiKey": "key-XXXXXXXXXXX",
        "domain": "replies.yourdomain.com"
    },
    "social": {
        "facebookUrl": "https://facebook.com/groups/XXX",
        "googlePlus": "https://groups.google.com/d/XXX",
        "linkedIn": "https://www.linkedin.com/groups/XXX/profile",
        "foursquare": "https://foursquare.com/groups/XXX",
        "twitter": "https://twitter.com/XXX",
        "yelp": "https://yelp.com/XXX",
        "instagram": "https://instagram.com/XXX",
        "youtube": "https://youtube.com/XXX",
        "pinterest": "https://pinterest.com/XXX",
        "blogRss": "https://rss.xyz.com",
        "googlePlaceId": "redfdfdere"
    }
}				
			

EXAMPLE REQUEST (curl)

				
					curl --location --request PUT 'https://rest.gohighlevel.com/v1/locations/i2SpAtBVHSVea1sL6oah' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
    "businessName": "Tesla inc",
    "address": "3500 Deer Creek Road",
    "city": "Palo Alto",
    "country": "US",
    "state": "CA",
    "postalCode": "94304",
    "website": "https://www.tesla.com",
    "timezone": "US/Central",
    "firstName": "John",
    "lastName": "Deo",
    "email": "john@deo.com",
    "phone": "+1202-555-0107",
    "settings": {
        "allowDuplicateContact": false,
        "allowDuplicateOpportunity": false,
        "allowFacebookNameMerge": false,
        "disableContactTimezone": false
    },
    "twilio": {
        "sid": "AC_XXXXXXXXXXX",
        "authToken": "77_XXXXXXXXXXX"
    },
    "snapshot": {
        "id": "XXXXXXXXXXX",
        "type": "vertical"
    },
    "mailgun": {
        "apiKey": "key-XXXXXXXXXXX",
        "domain": "replies.yourdomain.com"
    },
    "social": {
        "facebookUrl": "https://facebook.com/groups/XXX",
        "googlePlus": "https://groups.google.com/d/XXX",
        "linkedIn": "https://www.linkedin.com/groups/XXX/profile",
        "foursquare": "https://foursquare.com/groups/XXX",
        "twitter": "https://twitter.com/XXX",
        "yelp": "https://yelp.com/XXX",
        "instagram": "https://instagram.com/XXX",
        "youtube": "https://youtube.com/XXX",
        "pinterest": "https://pinterest.com/XXX",
        "blogRss": "https://rss.xyz.com",
        "googlePlaceId": "redfdfdere"
    }
}'				
			

EXAMPLE RESPONSE (json)

				
					{
  "id": "i2SpAtBVHSVea1sL6oah",
  "name": "Tesla inc",
  "address": "3500 Deer Creek Road",
  "city": "Palo Alto",
  "country": "US",
  "state": "CA",
  "postalCode": "94304",
  "website": "https://www.tesla.com",
  "timezone": "US/Central",
  "firstName": "John",
  "lastName": "Deo",
  "email": "john@deo.com",
  "phone": "+1202-555-0107",
  "apiKey": "2c359c82-590a-4d6f-ac76-32b7a1e649ea",
  "business": {
    "name": "Tesla inc",
    "email": "johndeo@gmail.com",
    "address": "3500 Deer Creek Road",
    "city": "Palo Alto",
    "country": "US",
    "state": "CA",
    "postalCode": "94304",
    "website": "https://www.tesla.com",
    "timezone": "US/Central"
  },
  "social": {
    "facebookUrl": "https://facebook.com/groups/XXX",
    "googlePlus": "https://groups.google.com/d/XXX",
    "linkedIn": "https://www.linkedin.com/groups/XXX/profile",
    "foursquare": "https://foursquare.com/groups/XXX",
    "twitter": "https://twitter.com/XXX",
    "yelp": "https://yelp.com/XXX",
    "instagram": "https://instagram.com/XXX",
    "youtube": "https://youtube.com/XXX",
    "pinterest": "https://pinterest.com/XXX",
    "blogRss": "https://rss.xyz.com",
    "googlePlaceId": "redfdfdere"
  },
  "settings": {
    "allowDuplicateContact": false,
    "allowDuplicateOpportunity": false,
    "allowFacebookNameMerge": false,
    "disableContactTimezone": false
  }
}				
			
Fields Allowed Options Default Value Description
deleteTwilioAccount
true or false
false
If you pass true, When deleting the subaccount. We delete Twilio subaccount (on Twilio side) as well.

DELETE /v1/locations/:locationId

				
					https://rest.gohighlevel.com/v1/locations/:locationId?deleteTwilioAccount=false				
			

Delete location.

Allowed fields in the query parameter.

Authorization:

Provide your agency api key (Bearer Token). You can find it on Agency -> Settings -> API keys

AUTHORIZATION Bearer Token

Token

<token>

PARAMS

deleteTwilioAccount

false

Delete Twilio Account

PATH VARIABLES

locationId

i2SpAtBVHSVea1sL6oah

(Required) Location Id

EXAMPLE REQUEST (curl)

				
					curl --location --request DELETE 'https://rest.gohighlevel.com/v1/locations/i2SpAtBVHSVea1sL6oah?deleteTwilioAccount=false' \
--header 'Authorization: Bearer <token>'				
			

EXAMPLE RESPONSE (json)

				
					{
  "msg": "Success"
}				
			

PUT /v1/locations/:locationId/load-snapshot/:snapshotId

				
					https://rest.gohighlevel.com/v1/locations/:locationId/load-snapshot/:snapshotId				
			

Load Snapshot.

Fields
  • override*: We will allow true or false. If you want override all conflict assets then pass true. By default it false. By default it false
Authorization:

Provide your agency api key (Bearer Token). You can find it on Agency -> Settings -> API keys

AUTHORIZATION Bearer Token

Token

<token>

HEADERS

Content-Type

application/json

PATH VARIABLES

locationId

i2SpAtBVHSVea1sL6oah

(Required) Location Id

snapshotId

5bFKHqudfotv3c1xFUuP

(Required) Snapshot Id

BODY raw (json)

				
					{
    "override": false
}				
			

EXAMPLE REQUEST (curl)

				
					curl --location --request PUT 'https://rest.gohighlevel.com/v1/locations/i2SpAtBVHSVea1sL6oah/load-snapshot/5bFKHqudfotv3c1xFUuP' \
--header 'Authorization: Bearer <token>' \
--data '{
    "override": false
}'				
			

EXAMPLE RESPONSE (json)

				
					{
  "msg": "Copying the data, we will send a notification once it's completed."
}				
			

Leave a Comment

Share this Doc

Location

Or copy link

CONTENTS