Hi there,
I am using the API and would like to find all contacts that are unassigned.
This is the Python code that I have so far.
import requests
import json
import pprint
BASE_URL = "https://api.hubapi.com/crm/v3"
API_KEY = "INSERT-KEY-HERE"
# https://developers.hubspot.com/docs/api/crm/contacts ## SEARCH
def owner_contacts(owner_id):
url = f"{BASE_URL}/objects/contacts/search"
querystring = {"hapikey":API_KEY}
payload = {
"filterGroups":[{
"filters":[
{
"value": owner_id,
"propertyName": "hubspot_owner_id",
"operator": "EQ"
}
]
}],
"limit":100,
"after":0
}
headers = {
"accept": "application/json",
"content-type": "application/json"
}
response = requests.request("POST", url, data=json.dumps(payload), headers=headers, params=querystring)
return json.loads(response.text)
owner_contacts(84150642)
Is it possible to know the hubspot_owner_id for an Unassigned user.
Thanks in advance,
Luke