/persons primary_email error bug

/persons
name: "Test T."
primary_email: "test-email@gmail.com"

Promise returned fail:
Status: 404
StatusText: “”

Whilst testing the persons API, I encountered an error with an empty Status text which lead me to test every field one by one. It seems that pushing data to primary_email in a string format breaks the PUSH request.

Hi @ERCGeeks
Welcome to the community :wave:

Can you share further details about the request (path, payload, authentication mode)? I am assuming that you are performing person/contact creation.

I had the same issue with the following request:

POST https://vonzu-sandbox2.pipedrive.com/api/v1/persons?api_token=<api_token>

{
    "name":"provaaaa",
    "org_id": 100,
    "primary_email": "jsjsajskj@ksja.cas"
}

And it gives me an error like:

{
    "success": false,
    "error": "Invalid field(s) in the payload: primary_email",
    "error_info": "Please check developers.pipedrive.com for more information about Pipedrive API.",
    "data": null,
    "additional_data": null
}

Documentation says post or put as array

“email”: [
{
“value”: “”,
“primary”: “”,
“label”: “”
},

Thanks for bringing this to our attention @ERCGeeks @Xavier_Huix.I can replicate this error and let me check with the concerned team regarding the same.

In the meantime, kindly make use of the payload suggested by @sikkens. It should be like this