Logo
Search
Docs

Partner end user manual connect

POST https://app.sulus.ai/api/partner-end-user/manual-connect

Manually link a location with an access token (legacy helper)

Authentication

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

Authorization: Bearer <YOUR_API_KEY>

Request body

ghl_location_id string Required

GoHighLevel location id.

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

Optional company id.

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

Access token to verify and store. Never returned.

Validation: required|string|min:10
Stored in user_ghl_connects.access_token

Errors

StatusMeaningBody
401 Missing or invalid bearer token {"success":false,"message":"Unauthenticated"}
400 No reseller context on the request {"success":false,"message":"No reseller context 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"}
422 Token/location verification failed {"success":false,"message":"Invalid access token or location ID (GoHighLevel returned HTTP 401)."}
500 Persist failed {"success":false,"message":"Failed to save GHL connection"}

Notes

  • Success message string is carbon-copied from the live controller.
  • The current Connect UI prefers POST /connections over this endpoint.
curl --request POST \
  --url https://app.sulus.ai/api/partner-end-user/manual-connect \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "ghl_location_id": "loc_abc123XYZ",
  "ghl_company_id": "comp_def456",
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.exampletokenvalue"
}'
import requests

url = "https://app.sulus.ai/api/partner-end-user/manual-connect"
headers = {"Authorization": "Bearer <YOUR_API_KEY>"}
payload = {
  "ghl_location_id": "loc_abc123XYZ",
  "ghl_company_id": "comp_def456",
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.exampletokenvalue"
}

response = requests.post(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/manual-connect"
	payload := strings.NewReader(`{
  "ghl_location_id": "loc_abc123XYZ",
  "ghl_company_id": "comp_def456",
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.exampletokenvalue"
}`)
	req, _ := http.NewRequest("POST", 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 connected successfully.",
    "data": {
        "connected": true,
        "ghl_location_id": "loc_abc123XYZ",
        "ghl_company_id": "comp_def456",
        "token_expires_at": null
    }
}