Update a client
Change any of the settable fields. Send only what you want changed; a null clears an optional field. Turning tracking on or off is POST /client/v1/status, not this.
curl -X PATCH "https://mythic-analytics.gulp.workers.dev/client/v1/locations/details?location_id=example_string" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"name": "Acme Home Services",
"domain": "acme.com",
"email": "user@example.com",
"phone": "+1-555-0123",
"website": "example_string",
"timezone": "America/Denver",
"global_name": "acme_analytics",
"ghl_location_id": "vr4lpqi0w0anVy8r7qU1",
"proxy_api_key": "example_string"
}'
import requests
import json
url = "https://mythic-analytics.gulp.workers.dev/client/v1/locations/details?location_id=example_string"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"name": "Acme Home Services",
"domain": "acme.com",
"email": "user@example.com",
"phone": "+1-555-0123",
"website": "example_string",
"timezone": "America/Denver",
"global_name": "acme_analytics",
"ghl_location_id": "vr4lpqi0w0anVy8r7qU1",
"proxy_api_key": "example_string"
}
response = requests.patch(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://mythic-analytics.gulp.workers.dev/client/v1/locations/details?location_id=example_string", {
method: "PATCH",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"name": "Acme Home Services",
"domain": "acme.com",
"email": "user@example.com",
"phone": "+1-555-0123",
"website": "example_string",
"timezone": "America/Denver",
"global_name": "acme_analytics",
"ghl_location_id": "vr4lpqi0w0anVy8r7qU1",
"proxy_api_key": "example_string"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"name": "Acme Home Services",
"domain": "acme.com",
"email": "user@example.com",
"phone": "+1-555-0123",
"website": "example_string",
"timezone": "America/Denver",
"global_name": "acme_analytics",
"ghl_location_id": "vr4lpqi0w0anVy8r7qU1",
"proxy_api_key": "example_string"
}`)
req, err := http.NewRequest("PATCH", "https://mythic-analytics.gulp.workers.dev/client/v1/locations/details?location_id=example_string", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://mythic-analytics.gulp.workers.dev/client/v1/locations/details?location_id=example_string')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"name": "Acme Home Services",
"domain": "acme.com",
"email": "user@example.com",
"phone": "+1-555-0123",
"website": "example_string",
"timezone": "America/Denver",
"global_name": "acme_analytics",
"ghl_location_id": "vr4lpqi0w0anVy8r7qU1",
"proxy_api_key": "example_string"
}'
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Acme Home Services",
"active": true,
"publishable_key": "pk_0f1e2d3c4b5a69788796a5b4c3d2e1f0",
"secret_key": "example_string",
"domain": "example_string",
"email": "user@example.com",
"phone": "+1-555-0123",
"website": "example_string",
"timezone": "example_string",
"global_name": "John Doe",
"ghl_location_id": "example_string",
"proxy_api_key_set": true,
"created_at": "2024-12-25T10:00:00Z",
"updated_at": "2024-12-25T10:00:00Z"
},
"kv_sync": "synced"
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
{
"error": "Conflict",
"message": "The request conflicts with the current state of the resource",
"code": 409,
"details": "Resource already exists"
}
{
"error": "Too Many Requests",
"message": "Rate limit exceeded. Please try again later",
"code": 429,
"retryAfter": 3600
}
/client/v1/locations/details
Target server for requests. Edit to use your own host.
Agency key (ak_) or location secret key (sk_). Writes require an agency key; creating a client requires an agency-wide key. Keys are server-side credentials — this surface serves no CORS headers on purpose. Scoped keys (mcp_) are accepted too: locations:read/locations:write for one client's setup, and provisioning:write to create a client. See Using an mcp_ key over HTTP.
ak_) or location secret key (sk_). Writes require an agency key; creating a client requires an agency-wide key. Keys are server-side credentials — this surface serves no CORS headers on purpose. Scoped keys (mcp_) are accepted too: locations:read/locations:write for one client's setup, and provisioning:write to create a client. See Using an mcp_ key over HTTP.Location to scope to. Required for ak_ keys (or send the X-Location-Id header); ignored for sk_. Not used when creating a client.
The media type of the request body
Display name for the client.
Primary site domain.
Contact email.
IANA timezone.
JavaScript global the SDK installs as, default mythic. Must be a valid identifier or the snippet throws on the client's site.
The GoHighLevel sub-account this client maps to. Alphanumeric, 8-64 characters; null to unmap.
This is a lookup key, not a label: one GoHighLevel location maps to exactly one client, and claiming one already mapped elsewhere returns 409 ghl_location_taken. Clear it on the other client first.
Your GoHighLevel API key, forwarded as X-API-Key when Mythic proxies to GoHighLevel for this client. 8-512 characters; null to clear.
Write-only. It is never returned by any endpoint — proxy_api_key_set reports whether one is stored. Rotating it means sending the new value; there is no read-back.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Agency key (ak_) or location secret key (sk_). Writes require an agency key; creating a client requires an agency-wide key. Keys are server-side credentials — this surface serves no CORS headers on purpose. Scoped keys (mcp_) are accepted too: locations:read/locations:write for one client's setup, and provisioning:write to create a client. See Using an mcp_ key over HTTP.
Query Parameters
Location to scope to. Required for ak_ keys (or send the X-Location-Id header); ignored for sk_. Not used when creating a client.
Body
Contact email.
JavaScript global the SDK installs as, default mythic. Must be a valid identifier or the snippet throws on the client's site.
acme_analyticsThe GoHighLevel sub-account this client maps to. Alphanumeric, 8-64 characters; null to unmap.
This is a lookup key, not a label: one GoHighLevel location maps to exactly one client, and claiming one already mapped elsewhere returns 409 ghl_location_taken. Clear it on the other client first.
vr4lpqi0w0anVy8r7qU1Your GoHighLevel API key, forwarded as X-API-Key when Mythic proxies to GoHighLevel for this client. 8-512 characters; null to clear.
Write-only. It is never returned by any endpoint — proxy_api_key_set reports whether one is stored. Rotating it means sending the new value; there is no read-back.
Responses
Outcome of the edge sync this write triggered. synced means the edge agrees with the database. pending_validation means a hostname is waiting on DNS. Anything starting failed: means the database was written but the edge was not, and the write should be retried.