Got the update command to work! The key, it seems, is that the “name” field has to be in there twice - don’t ask me why. Here’s the commands I plan on using to toggle the blocked services on an existing client:
curl -X POST -H "content-Type:application/json" -s -u username:password adguard.domain.name/control/clients/update -d '{"name": "clientname","data":{"name":"clientname","ids": ["192.168.1.192"],"tags": ["device_pc"],"upstreams": [],"filtering_enabled": true,"parental_enabled": true,"safebrowsing_enabled": true,"safesearch_enabled": false,"use_global_blocked_services": true,"use_global_settings": false}}'
curl -X POST -H "content-Type:application/json" -s -u username:password adguard.domain.name/control/clients/update -d '{"name": "clientname","data":{"name":"clientname","ids": ["192.168.1.192"],"tags": ["device_pc"],"upstreams": [],"filtering_enabled": true,"parental_enabled": true,"safebrowsing_enabled": true,"safesearch_enabled": false,"use_global_blocked_services": false,"use_global_settings": false,"blocked_services": ["9gag","activision_blizzard","bilibili","clubhouse","discord","disneyplus","douban","electronic_arts","epic_games","facebook","gog","hulu","icloud_private_relay","instagram","iqiyi","kakaotalk","kik","lazada","leagueoflegends","line","linkedin","mail_ru","mastodon","mercado_libre","minecraft","netflix","nintendo","ok","onlyfans","origin","pinterest","playstation","qq","rakuten_viki","reddit","riot_games","roblox","rockstar_games","shopee","snapchat","steam","telegram","tiktok","tinder","twitch","twitter","ubisoft","valorant","viber","vimeo","vk","voot","wechat","weibo","whatsapp","xboxlive","zhihu"]}}'
My next step is to circle back this evening and see if can get that code into the automation to toggle properly in HA. So, so close!