Logo
Search
Docs

Partner end user connections update

PUT https://app.sulus.ai/api/partner-end-user/connections/{connection}

Update a connection you own

Authentication

Send a bearer token created on your dashboard's Developer page:

Authorization: Bearer <YOUR_API_KEY>

Path parameters

connection integer Required

Connection row id.

Validation: must be a user_ghl_connects.id owned by the caller
Stored in user_ghl_connects.id

Request body

ghl_location_id string Required

GoHighLevel location id to link.

Validation: required|string|max:64
Stored in user_ghl_connects.ghl_location_id
ghl_company_id string Optional Nullable

Optional company id for the location.

Validation: nullable|string|max:64
Stored in user_ghl_connects.ghl_company_id
access_token string Optional Nullable

Optional on update — omit or leave blank to keep the stored token. Never returned in responses.

Validation: nullable|string|min:10
Stored in user_ghl_connects.access_token
is_default boolean Optional Nullable

When true, this location becomes the default for the user.

Validation: nullable|boolean
Stored in user_ghl_connects.is_default

Errors

StatusMeaningBody
401 Missing or invalid bearer token {"success":false,"message":"Unauthenticated"}
404 Connection not owned by caller {"success":false,"message":"Connection not found"}
404 Reseller row missing {"success":false,"message":"Reseller not found"}
422 Validation failed {"message":"Location ID is required.","errors":{"ghl_location_id":["Location ID is required."]}}
403 Feature ghl_connect not enabled for the account {"message":"This feature is not enabled for your account. Please contact your administrator.","feature":"ghl_connect"}
500 Persist failed {"success":false,"message":"Failed to update GHL connection"}

Notes

  • Omit access_token (or send null/blank) to keep the stored token; when sent, it is re-verified.
curl --request PUT \
  --url https://app.sulus.ai/api/partner-end-user/connections/{connection} \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "ghl_location_id": "loc_abc123XYZ",
  "ghl_company_id": "comp_def456",
  "access_token": null,
  "is_default": false
}'
import requests

url = "https://app.sulus.ai/api/partner-end-user/connections/{connection}"
headers = {"Authorization": "Bearer <YOUR_API_KEY>"}
payload = {
  "ghl_location_id": "loc_abc123XYZ",
  "ghl_company_id": "comp_def456",
  "access_token": null,
  "is_default": false
}

response = requests.put(url, json=payload, headers=headers)
print(response.json())
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	url := "https://app.sulus.ai/api/partner-end-user/connections/{connection}"
	payload := strings.NewReader(`{
  "ghl_location_id": "loc_abc123XYZ",
  "ghl_company_id": "comp_def456",
  "access_token": null,
  "is_default": false
}`)
	req, _ := http.NewRequest("PUT", url, payload)
	req.Header.Add("Authorization", "Bearer <YOUR_API_KEY>")
	req.Header.Add("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
Response 200
{
    "success": true,
    "message": "GoHighLevel connection updated.",
    "data": {
        "connections": [
            {
                "id": 12,
                "connected": true,
                "ghl_location_id": "loc_abc123XYZ",
                "location_name": "Downtown Office",
                "ghl_company_id": "comp_def456",
                "is_default": true,
                "token_expires_at": "2026-08-30T14:00:00.000000Z",
                "updated_at": "2026-07-30T14:05:00.000000Z"
            }
        ]
    }
}