ProvisioningUpdate a client

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"
}'
{
  "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"
}
PATCH
/client/v1/locations/details
PATCH
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

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.

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
location_idstring

Location to scope to. Required for ak_ keys (or send the X-Location-Id header); ignored for sk_. Not used when creating a client.

Content-Typestring
Required

The media type of the request body

Options: application/json
namestring

Display name for the client.

Max length: 255
domainstring

Primary site domain.

emailstring

Contact email.

phonestring
Max length: 64
websitestring
Max length: 512
timezonestring

IANA timezone.

Max length: 64
global_namestring

JavaScript global the SDK installs as, default mythic. Must be a valid identifier or the snippet throws on the client's site.

ghl_location_idstring

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.

proxy_api_keystring

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

header
Authorizationstring
Required

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_idstring

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

application/json
namestring

Display name for the client.

Example:
Acme Home Services
domainstring

Primary site domain.

Example:
acme.com
emailstring

Contact email.

timezonestring

IANA timezone.

Example:
America/Denver
global_namestring

JavaScript global the SDK installs as, default mythic. Must be a valid identifier or the snippet throws on the client's site.

Example:
acme_analytics
ghl_location_idstring

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.

Example:
vr4lpqi0w0anVy8r7qU1
proxy_api_keystring

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.

Responses

successboolean
dataobject
kv_syncstring

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.