ConfigPublish the workspace

Publish the workspace

Record the workspace (tags, snippets, transformers) as a new version and make it live, in either mode. Returns 201 with the new version, or 200 with created: false when nothing changed since the latest version. If the version cannot be recorded, nothing goes live (500 publish_failed). Agency key (ak_) required.

curl -X POST "https://mythic-analytics.gulp.workers.dev/client/v1/config/publish?location_id=example_string" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "name": "Add Hotjar",
  "notes": "example_string"
}'
{
  "success": true,
  "data": {
    "version": 5,
    "created": true,
    "mode": "immediate"
  },
  "kv_sync": "synced"
}
POST
/client/v1/config/publish
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. Keys are server-side credentials — this surface serves no CORS headers on purpose. Scoped keys (mcp_) are accepted too and need the tags, snippets or transformers family the route belongs to. See Using an mcp_ key over HTTP.

Agency key (ak_) or location secret key (sk_). Writes require an agency key. Keys are server-side credentials — this surface serves no CORS headers on purpose. Scoped keys (mcp_) are accepted too and need the tags, snippets or transformers family the route belongs to. 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_.

Content-Typestring
Required

The media type of the request body

Options: application/json
namestring
Max length: 200
notesstring
Max length: 2000
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. Keys are server-side credentials — this surface serves no CORS headers on purpose. Scoped keys (mcp_) are accepted too and need the tags, snippets or transformers family the route belongs to. 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_.

Body

application/json
namestring
Example:
Add Hotjar

Responses

successboolean
dataobject
kv_syncstring

Outcome of the inline edge-config rebuild that follows every write. synced means the location's CFG KV entry was rebuilt from database truth and the SDK will pick the change up; failed: \<reason\> means the database write landed but the edge is still serving the previous config — retry the write (any successful write re-syncs everything) or rebuild via the admin API. draft means the location is in draft mode and the write changed the workspace only; it goes live with POST /client/v1/config/publish. This field exists because tenant-config KV sync is not trigger-driven; a write the SDK never sees is the failure mode, so a failed sync is reported instead of silent.