Add tag to contact using PHP API wrapper

Anyone have example code for adding a tag to a contact using the PHP API Wrapper?

When I try something like
$contact_tag = $ac->api(“contact/tag_add?contact=$customer_id&tag=580”);
or
$contact_tag = $ac->api(“contact/tag_add?email=$theEmail&tag=580”);

In both cases I get a “Contact not found” error. However there is a contact in AC with the id and with the email so not sure why I am getting that error.

I’m not very familiar with using PHP or the PHP API wrapper. However, looking at the source code of the tag_add function, it appears to expect a different syntax.

From what I can see, adding a contact using the v1 API is not documented. The v3 API has a way to add a tag to a contact using a POST to /api/3/contactTags with JSON.