APIs & Integrations

Not applicable

Create Owner endpoint doesn't work?

I just tried inserting the example owner given here into the Owner list.

http://api.hubapi.com/owners/v2/owners?hapikey=demo

{
“portalId”: 62515,
“type”: “PERSON”,
“firstName”: “Michael”,
“lastName”: “Scott”,
“email”: “michael@dundermifflin”,
“quota”: 10000
}

I get 200 OK back, but when I look for Michael Scott in the list returned by the Get Owners endpoint, he’s nowhere to be found. I’ve also tried searching via his email. Why are Owners that are inserted not showing up in the list of Owners?

0 Upvotes
5 Replies 5
pschwarz
HubSpot Product Team
HubSpot Product Team

Create Owner endpoint doesn't work?

Yeah via the UI. Was thinking that would be helpful for just some testing/discovery.

0 Upvotes
pschwarz
HubSpot Product Team
HubSpot Product Team

Create Owner endpoint doesn't work?

Okay, thanks. And you’re creating owners just for testing? It might also be easier to add HubSpot users to your test portal. Each new user automatically gets an owner created for it.

EDIT: I see you mentioned ‘CRUD’ functionality. So you’ll be supporting mutations to owners data as well? Owners might be an area where you make read-only if possible. Because owners typically need to be tied to either HubSpot or Salesforce users, modifying owners by themselves will likely cause portals to get misconfigured.

0 Upvotes
Not applicable

Create Owner endpoint doesn't work?

Hi Paul,

Thanks for the tips. I’ll keep the update issue in mind as we go forward. When you say add HubSpot users to my test portal, do you mean via the UI?

0 Upvotes
pschwarz
HubSpot Product Team
HubSpot Product Team

Create Owner endpoint doesn't work?

HI Adam,

My apologies for the problems here. To be considered “active” every owner needs to have a remote. So, posting with this body works:

{
    "portalId": 2379120,
    "type": "PERSON",
    "firstName": "Michael",
    "lastName": "Scott",
    "email": "michael@dundermifflin",
    "quota": 10000,
    "remoteList" : [
        {
            "portalId" : 2379120,
            "remoteType" : "EMAIL",
            "remoteId": "michael2@dundermifflin",
            "active": true
        }
    ]
}

(be sure to add that "active":true, that’s a gotcha)

I’ll also update the docs with this. Thank you for notifying us of this issue.

With that said, the team behind this API is curious about your use-case. The Owners API was originally built primarily as a way to tie contact/company/deal ownership to HubSpot or Salesforce users. They left it open to theoretically support other external users via the simple “Email” remote, but support there is low due to lack of understanding about what the actual use-cases there would be. So, we’re really interested in how your planning to use Owners API.

Thanks,
-Paul

0 Upvotes
Not applicable

Create Owner endpoint doesn't work?

Hi @Paul_Schwarz,

We’re building an ODBC Driver for HubSpot, so essentially we’re interested in extracting as much data from the API as we possibly can. We represent the extracted data as SQL tables and allow our users (who are also HubSpot users) to interact with their data using basic CRUD functionality via SQL queries.

For Owners, the four endpoints fit very neatly into this framework. All we’re doing is using the endpoints to create a SQL table with CRUD functionality.

Adam

0 Upvotes