# Apply tag to a new, or an existing contact

**URL:** <https://integration.keap.com/t/apply-tag-to-a-new-or-an-existing-contact/86328>\
**Category:** API Q&A\
**Tags:** api\
**Created:** [February 1, 2022, 11:47am UTC](https://integration.keap.com/t/apply-tag-to-a-new-or-an-existing-contact/86328 "2022-02-01T11:47:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pavel\_T](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@Pavel\_T](https://integration.keap.com/u/Pavel_T)\
**Post date:** [February 1, 2022, 11:47am UTC](https://integration.keap.com/t/apply-tag-to-a-new-or-an-existing-contact/86328/1 "2022-02-01T11:47:46Z")

</div>

Hello, i’m using php-sdk to create contacts and now I just cant find a way to apply tags to a new or an existing clients.  
I get an error “Unrecognized property: tag\_ids” if I add tag\_ids as a property to array  
example:

```auto
$contact = [
            'given_name' => ...,
            'family_name' => ...,
            'email_addresses' => ...,
            'phone_numbers' => ...,
            'duplicate_option' => 'Email',
            'opt_in_reason' => 'Contact gave explicit permission.',
            'tag_ids' => [92]
        ];

$inf->contacts()->create($contact, $email);

```

So which method should i use to apply a tag to contact? Thanks 😊

---

<div class="post-metadata">

**Author:** ![Pavel\_T](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@Pavel\_T](https://integration.keap.com/u/Pavel_T)\
**Post date:** [February 1, 2022, 12:15pm UTC](https://integration.keap.com/t/apply-tag-to-a-new-or-an-existing-contact/86328/2 "2022-02-01T12:15:57Z")

</div>

ok, it can work with an old api version `$inf->contacts('xml')->addToGroup($contactId, 92);`
