Not able to change the owner of deal using the Update Deal API

Hi I am using the update deal api
The user who is making this API call is a deal admin.
I set the query params for the deal such as apikey and deal id
the body
has
{
“user_id”: “123456”
}
i tried with quotes and without quotes around the value.
When attempting make the call I get this response
{
“success”: false,
“error”: “You do not have permissions to do this.”,
“error_info”: “Please check developers.pipedrive.com for more information about Pipedrive API.”,
“data”: null,
“additional_data”: null
}
If i login in the pipedrive portal i could change ownership fine within the app.

If the person is a deal admin and a global admin what other permissions does this user need to have to change ownership to any user that has access to deals or how could i fix this ?

Hi @Jonny5x
Welcome to the community :wave: ! Thanks for sharing important details :slight_smile:

Can you share the request details (the endpoint you are calling, params, headers etc.) ? Make sure you mask your credentials. Here’s how it looks in my case

curl --location --request PUT 'https://api.pipedrive.com/v1/deals/57?api_token=xxx' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-raw '{
  "user_id": "13246944"
}'

Can you share more details about the target user as well? In certain cases, assigning a deactivated user will result in 4xx errors.

Also, are there visibility groups configured?

It should work in both the cases

Hi thanks for responding.
So i figured out the problem. It was the userid was wrong.