TagsReplace tags
Tags

Replace tags

Replace the entire tag set for a client. Tags reference predefined tag templates (GA4, Hotjar, custom scripts, etc.) and can include per-client parameters and trigger rules. After updating, the API rebuilds the client's remote configuration in KV.

curl -X PUT "https://api.mythic-analytics.com/api/v1/clients/example_string/tags" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "tags": [
    {
      "tag_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "enabled": true,
      "params": {
        "measurement_id": "G-XXXXXXXXXX"
      },
      "trigger_rules": {
        "url_contains": "/checkout"
      }
    }
  ]
}'
{
  "success": true,
  "data": [
    {
      "tag_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "enabled": true,
      "params": {
        "measurement_id": "G-XXXXXXXXXX"
      },
      "trigger_rules": {
        "url_contains": "/checkout"
      }
    }
  ]
}
PUT
/clients/{id}/tags
PUT
Security Scheme
Bearer Tokenstring
Required

Admin API key as bearer token. Format: Bearer YOUR_ADMIN_KEY

Admin API key as bearer token. Format: Bearer YOUR_ADMIN_KEY
path
idstring
Required

Client identifier.

Pattern: ^[a-zA-Z0-9_-]{1,255}$
Content-Typestring
Required

The media type of the request body

Options: application/json
tagsarray
Required

Array of tag assignment objects. Replaces all existing tags.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Admin API key as bearer token. Format: Bearer YOUR_ADMIN_KEY

Path Parameters

idstring
Required

Client identifier.

Body

application/json
tagsarray
Required

Array of tag assignment objects. Replaces all existing tags.

Responses

successboolean
dataarray