I can do a custom search on Contacts to include those with a list of tags, and exclude those that also have an additional tag. And I get the results I expect.
I can't for the life of me figure out how to do this with the API, though. The API Explorer won't allow me to add 'tags' as a parameter twice, so I can't figure out how to do the construction.
For example, I want to match all contacts that have tag ID 12, but exclude those that also have tag ID 7.
Something like
'tag' => ['IN' => $tags_included, 'NOT IN' => $tags_excluded]
foreach
code loop to filter out the "NOT IN".