Updating Custom fields through API

Hello, I have several custom fields on my Deals/Persons/Organizations, whenever I make a new one it works flawlessly, however, if I want to do an update, custom fields aren’t updated at all. Anyone have a clue if I’m doing something wrong? Help appreciated.

Can you post an example of PUT request?

“stage_id”: 13,
“amount”: 35000000,
“9cd1365005884a0619d9595a907c3586a4240f4d”: “Some value”

Both Stage_Id and Amount are updated, however, the value in the Custom Field with the Api Key above is not updated (nor does it show up when I fetch deals through a GET request)

What type of Custom Field is it (and is it definitely a Deal field and not Person, Org, etc?)

It is a “text” field (Person and Org fields are not updated either, however)

To prevent too much back and forth :slight_smile:, have you already checked out this tutorial to see if you’re following the same steps?

Yes, I’m using the NPM Library through a REST service I’ve developed. Using the DealsController (updateADeal) and sending an input object like so
input = []
input[‘id’] = ‘some field id’;
input[‘stage_id’] = ‘some stage_id’;
input[“9cd1365005884a0619d9595a907c3586a4240f4d”] = ‘some custom field value’;

Stage_Id and any other non custom fields get updated, however, the custom field does not.

This Custom Field is a Person field though, so you need to use the PUT/persons/{id} endpoint and not the PUT /deals endpoint.

I know, I just needed a custom field value and I had that one on hand, custom deals values are still not updated (nor persons or organizations)

1 Like

Hi @FinaktivaDev,

Sorry, I missed your reply yesterday.

Anyway, I just got testing updating a Custom Deal Field via the PUT/deals/{id} endpoint and it worked normally.

Again, you would need to use different endpoints if the Fields are People/Organization.

I tested through Postman, so you could try that as well.

You don’t happen to be using curly quotes (wrong = “ ” , correct = " ") in your request, do you?



I have a similar issue, in my case I have thousands of organizations and Im coding some stuff to sync data.

I have an scenario where I need to create a custom field for the organizations and thats easy, no problem, but after that of course is needed to update the value for every single organization.

The way I do it is throught a loop updating organization by organization. This takes ages and I it wont work in the future:

What will happen if I need to add several custom fields in thousands of organizations?

This is an issue thataffect the performance of everyone of us, would be great to have any possibility to do it.

Could you guys give me a solution? My script takes hours when this happen

Any update on this? Using postman (or my code) fetching data works fine, but PUTs fail.
It doesn’t seem to work exactly as documented.

I’ve tried content-type form and as json, tried job_title value in header and as url param.

Here’s a postman log attempting to update person 11412 with job_title Chief Pretzel (token changed to xxx):

PUT https://api.pipedrive.com/v1/persons/14112?api_token=xxx ms

PUT /v1/persons/14112?api_token=xxx HTTP/1.1

Content-Type: application/json

job_title: Chief Pretzel

User-Agent: PostmanRuntime/7.26.5

Accept: /

Postman-Token: zzz

Host: api.pipedrive.com

Accept-Encoding: gzip, deflate, br

Connection: keep-alive

Cookie: __cfduid=dkdkdkdkdk

Content-Length: 0

HTTP/1.1 400 Bad Request

Date: Sat, 14 Nov 2020 04:26:17 GMT

Content-Type: application/json

Transfer-Encoding: chunked

Connection: keep-alive

x-correlation-id: efc0201a-89fd-43e6-a33f-001e7cb23ca5

badi: Routing: us-east-1=>us-east-1; Version: e600; Host: bari;

Cache-Control: no-cache

Access-Control-Expose-Headers: X-RateLimit-Remaining, X-RateLimit-Limit, X-RateLimit-Reset


x-daily-requests-left: 9992

x-frame-options: SAMEORIGIN

access-control-allow-origin: *

x-content-type-options: nosniff

vary: Accept-Encoding

X-RateLimit-Limit: 80

X-RateLimit-Remaining: 79

X-RateLimit-Reset: 2

X-XSS-Protection: 1; mode=block

Strict-Transport-Security: max-age=31536000; includeSubDomains

CF-Cache-Status: DYNAMIC

cf-request-id: 06669a122600003b7c4b8f0000000001

Expect-CT: max-age=604800, report-uri=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct

Server: cloudflare

CF-RAY: 5f1df93038a03b7c-BOS

{“success”:false,“error”:“Bad request”,“error_info”:“Please check developers.pipedrive.com for more information about Pipedrive API.”,“data”:null,“additional_data”:null}

Thank you!

Got it.
With Accept and Content-Type headers set to application/json, and json payload in body, works from postman.

1 Like