Cannot change the owner of a lead while creating

Cannot provide an owner, when creating a lead.

As I understand the documentation owner_id can be used to changed the owner. It doesn’t seem to work, even with the same owner_id as returned in the lead, when omitted for creation.[valid_id]&owner_id=[valid_id]&title=a_lead

It returns a 400 provided dataset is not valid if the owner_id is removed, everything works as expected.

Any Ideas?

Hi @estani

Add a lead is a POST request which expects lead data in the request body.

Could you try something like this:

Thanks, I’m using a library for this, I’ll have to patch the library to test, but this makes sense, of course.
From your example, it looks like the api_token must still be sent as and url parameter, and the rest as a json payload (please correct me if I’m wrong).
I’ll try it out.

I saw the client was sending the params as url and in the body.
This was the problem.
Only the api_token should go in the url param, and everything else must go in the body.
Separating the parameters properly was the key here.
Thanks for your help!

Hi @estani,

Yes, that would be correct! Glad you were able to resolve it!