APIs & Integrations

rbharris1
Contributor

Can't set ticket owner from API Create method

SOLVE

I'm trying to set the ticket owner when using the API Create method, but I keep getting an error. Any help would be greatly appreciated.

 

I have confirmed that I'm using a valid hubspot_owner_id value (see screenshot). I'm attempting to set it to my own ID. I'm a super admin.

Screen Shot 2021-03-15 at 6.28.18 PM.png

The Request Body as received by my app:

{"properties":
{"hs_pipeline":"0",
"hs_pipeline_stage":"1",
"hubspot_owner_id":"8386379",
"subject":"Supply Order"}}

Note that I have tried the hubspot_owner_id as an integer (no quotes) and as a string (with quotes) and I get the same error response. I have confirmed the stage and pipeline name.

 

Error Response:

{"status":"error","message":"Property values were not valid: [{\"isValid\":false,\"message\":\"8386379 was not a valid owner ID\",\"error\":\"INVALID_OWNER_ID\",\"name\":\"hubspot_owner_id\"}]","correlationId":"716f8fb8-3347-47c3-b2a1-8aee1ab5bea5","category":"VALIDATION_ERROR"}

 

My app has the 'tickets' scope. I have submitted the same create POST request without the hubspot_owner_id and the ticket is created successfully, so I know my OAUTH routines are working.

0 Upvotes
1 Accepted solution
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Can't set ticket owner from API Create method

SOLVE

Hello @rbharris1 

Are you still working on this? 

I would hit this endpoint to confirm that you are working with the owner id

View solution in original post

3 Replies 3
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Can't set ticket owner from API Create method

SOLVE

Hello @rbharris1 

Are you still working on this? 

I would hit this endpoint to confirm that you are working with the owner id

rbharris1
Contributor

Can't set ticket owner from API Create method

SOLVE

Well, I feel dumb. Why is there a difference between the id and the userid!? The solution is to use the id, not the userid! Thank you, @dennisedson .

dennisedson
HubSpot Product Team
HubSpot Product Team

Can't set ticket owner from API Create method

SOLVE

@rbharris1 

While I cannot speak to why it is different, I can certainly let you know that you should not feel dumb 😉

0 Upvotes