How to delete custom field using API?

Hi, first time here and new to pipedrive. I have been experimenting with the creation of custom fields, but now I want to start from scratch and delete all the custom fields I created. These were created under the “Organization” tab, and were of the “org” type. The problem is I simply cannot delete them! I click the little red “x” to the right of the individual api keys in the …/settings/table_column/edit/org page, and get the alert dialog, where I click “OK”, and the custom field disappears. However, when I do the mapping after the import of an xls, there they are again, available for mapping. Then, when I go back to the custom fields page, the custom fields that I thought I had deleted are still there. Pipedrive support says they “flushed the cache”, and that I should clear cookies, use a new browser, and all that. Well, I tried that. I was using Firefox, then switched to Chrome, but no change. The custom fields are still there, and I still can’t get rid of them.

I would like to try to delete these custom fields using PHP, and see if that works. Thanks ahead of time.

Hey!

That’s a weird situation you’re running into - but you should be to delete these fields by find their ID (either by heading to Settings > Customize Fields > and examine the URL slug for the ID or use the GET OrganizationFields endpoint to find the ID)
Then use: https://developers.pipedrive.com/docs/api/v1/#!/OrganizationFields/delete_organizationFields_id

Great resource, thanks. But, after trying different ways of using the GET method, including the interface you linked to, the fields simply are not being removed from my account. A pipedrive engineer did write back saying they are taking the problem to engineering.

1 Like

Thanks for the update on this - if you get a chance, let us know here how it goes (what the issue was)

The problem was referred to the pipedrive engineers, and the engineers deleted the fields. My partner has another account, to which I had administrator access, and he had the same exact problem (because we were creating identical situations). The engineers finally stepped in after explaining to the service rep that none of her suggestions were working (like switching browsers, clicking the little red x, etc.). I haven’t received any explanation of what caused the problem.