Skip to content

Commit

Permalink
Merge pull request #49 from utopia-php/feat-update-hb-list-api
Browse files Browse the repository at this point in the history
Update HB List API to v3
  • Loading branch information
christyjacob4 authored Nov 23, 2023
2 parents b2ced60 + abd0f8a commit 00d4bb1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Analytics/Adapter/HubSpot.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,9 @@ public function syncAssociation(string $accountId, string $contactId, string $ro
public function addToList(int $listId, int $contactId): bool
{
try {
$this->call('POST', '/contacts/v1/lists/'.$listId.'/add', [
$this->call('PUT', '/crm/v3/lists/'.$listId.'/memberships/add', [
'Content-Type' => 'application/json',
], [
'vids' => [$contactId],
]);
], [$contactId]);

return true;
} catch (\Exception $e) {
Expand Down

0 comments on commit 00d4bb1

Please sign in to comment.