ProvisioningSet a client's billing tier

Set a client's billing tier

Move a client between purchasable tiers. This changes what you are billed — each client is priced per day at its tier.

Only tiers listed by selectable are accepted. plan_id is refused by PATCH /client/v1/locations/details precisely so tier changes come through here, where the choice is limited to what the rate card sells.

An upgrade bills from today; a downgrade takes effect tomorrow, because a day is billed at the highest tier the client held that day. The response reports which applied as billing_effective_from.

curl -X PUT "https://mythic-analytics.gulp.workers.dev/client/v1/locations/plan?location_id=example_string" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "plan_id": "pro"
}'
{
  "success": true,
  "data": {
    "location_id": "example_string",
    "plan_id": "pro",
    "previous_plan_id": "standard",
    "billing_effective_from": "2026-09-07",
    "kv_sync": "synced"
  }
}
PUT
/client/v1/locations/plan
PUT
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
plan_idstring
Required

A tier from the GET's selectable list.

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
plan_idstring
Required

A tier from the GET's selectable list.

Example:
pro

Responses

successboolean
dataobject