Skip to content

Instantly share code, notes, and snippets.

@brk21
brk21 / add_or_update_hubspot_contact_email.py
Created September 14, 2022 15:45
Add, Update, or Delete Emails from Hubspot Contacts
import requests
import time
def get_contact_by_email(email, access_token, properties=[]):
"""Gets Contact, along with properties noted by list of API names"""
url = f"https://api.hubapi.com/crm/v3/objects/contacts/{email}?idProperty=email"
for prop in properties:
url += f"&properties={prop}"