Problem with Lead API

I’m trying to create a new Lead through an API call, I’m passing the token through the headers and the content type is application/json but I’m not able to create a Lead.

The Endpoint is https://api.pipedrive.com/v1/leads,Since the title and person_id fields are required I tried following the steps given here Leads API: "title" fails because "title" is required and tried passing api_token as a param but this is the error I’m getting

I even tried adding custom fields like FirstName, Email, etc in the Customize data fields section (refer below screenshot)

But I can’t send the FirstName in postman even though I’ve created a custom field.
Here’s the screenshot of the error:

Hello we will look into this, but please remove or blur your API token from the pictures if you don’t want to expose your data.

1 Like

Okay, thank you for your response :slight_smile:

Hey Aryaman,

are you sure a person with id 1 exists in your Pipedrive? Thats for the first request error.

As for the FirstName - this is a wrong approach. Every custom field has its own long unique key and thata how it shouls be used. It wont work via its title.

See Custom fields for more info.

Hope this helps.

Have a nice day.

Rosťa

2 Likes

Hey,

Thank you for your response :slight_smile: I’ll try following the steps