Unable to create new fields via API

I’m trying to create a new (custom) field on organizations via API but just get

{“success”:false,“error”:“Scope and URL mismatch”,“errorCode”:403,“error_info”:“Please check developers.pipedrive.com”}

I tried both with the api.pipedrive endpoint (which is exposed via OpenAPI) or with the customdomain.pipedrive endpoint.
It works fine to retrieve the custom fields but I cannot create new or update existing fields (e.g. renaming).
I’m sending the auth_token in the Authorization header (as descibed in the OpenAPI doc) instead of appending it to the URL. Could this be the root cause?
It works just fine with other API methods like updating a deal etc. so I doubt it is related to the auth header.
I’m a bit lost, so any help would be appreciated!

Hi @Daniel_Florey

Does your access token have an admin scope and are you an admin in that company?
As only the “admin token” can add custom fields (Scopes and permission explanations).

1 Like

Got it! I missed that bit, now it works like a charm!

1 Like

@mykhailo Hey, I am an admin user and also I have enabled the admin scope, still i am not able to create custom field. Can you please help


Hi @BhavyaChoubisa

What’s the endpoint you were calling? And, could you provide the beginning and the end of the access token you used, something like 1.2.aaaa..............zzzz?

1 Like

@mykhailo

https://bombaysoftwares-sandbox.pipedrive.com/PersonFields [POST]
https://bombaysoftwares-sandbox.pipedrive.com/v1/PersonFields [POST]

access_token : 10441001:13391022:8ea68…9942f423

@BhavyaChoubisa could you try https://bombaysoftwares-sandbox.pipedrive.com/api/v1/personFields?

1 Like

@mykhailo it’s working.Thank you for the help. :grin:

1 Like