Replace the project's channel rules
PUT/ v1/ projects/ {project}/ channel-rules
1 to 50 rules, in order; the first that matches wins.
Path parameters
project
The project's id (
prj_…).Body
rules
The channel of a visit whose field matches.
Show 4 fieldsHide fields
channel
field
What a rule tests; referrer_type is search_engine, social_network or ai_assistant.
click_idutm_mediumutm_sourceutm_campaignreferrer_domainreferrer_typeoperator
isstarts_withcontainsexistsvalues
1 to 100 values; none with exists.
Responses
The ChannelRules.
rules
The channel of a visit whose field matches.
Show 4 fieldsHide fields
channel
field
What a rule tests; referrer_type is search_engine, social_network or ai_assistant.
click_idutm_mediumutm_sourceutm_campaignreferrer_domainreferrer_typeoperator
isstarts_withcontainsexistsvalues
1 to 100 values; none with exists.
otherwise
is_default
True while the project uses Viakite's rules.
updated_at
Example response
1{2"rules": [3{4"channel": "string",5"field": "click_id",6"operator": "is",7"values": [8"string"9]10}11],12"otherwise": "Direct",13"is_default": true,14"updated_at": "2026-11-21T09:30:00Z"15}
Errors
Every error has the same shape: error.code, a message for people and details.
| Status | Code |
|---|---|
validation_error |