ProvisioningCreate a client

Create a client

Provision a new client under your agency. Returns its generated id, publishable key and secret key, plus kv_sync — check that reads synced before handing the snippet to the client's site, because a client that exists in the database but not at the edge rejects every event.

Requires an agency-wide key. No location_id — the client does not exist yet and the agency comes from the key.

curl -X POST "https://mythic-analytics.gulp.workers.dev/client/v1/locations" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "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"
}
POST
/client/v1/locations
POST
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.
Content-Typestring
Required

The media type of the request body

Options: application/json
No request body parameters defined
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.

Body

application/json
datastring
Required

Raw application/json data

Responses