ConfigAssign a tag

Assign a tag

Assign a tag to this location. tag_id is required; enabled defaults to true and params to {}. Agency key (ak_) required. Rebuilds the edge config — check kv_sync.

curl -X POST "https://mythic-analytics.gulp.workers.dev/client/v1/config/tags?location_id=example_string" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "tag_id": "meta-pixel",
  "enabled": true,
  "params": {
    "pixel_id": "1234567890"
  },
  "trigger_rules": {
    "url_contains": "/checkout"
  }
}'
{
  "success": true,
  "data": {
    "tenant_key": "loc_abc123",
    "tag_id": "meta-pixel",
    "enabled": true,
    "params": {
      "pixel_id": "1234567890"
    },
    "trigger_rules": {
      "url_contains": "/checkout"
    }
  },
  "kv_sync": "synced"
}
POST
/client/v1/config/tags
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
tag_idstring
Required

Id of the tag template to assign.

paramsobject

Template parameters for this assignment.

trigger_rulesobject

Optional page/condition rules controlling where the tag or snippet fires. Omitted or null means everywhere.

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

Id of the tag template to assign.

Example:
meta-pixel
paramsobject

Template parameters for this assignment.

Example:
{"pixel_id":"1234567890"}
trigger_rulesobject

Optional page/condition rules controlling where the tag or snippet fires. Omitted or null means everywhere.

Example:
{"url_contains":"/checkout"}

Responses