API Call to get only lead id

Hi,

I am trying to see if I can just get the lead ID returned through an API call. I know that /api/contacs with search on email will give me the entire payload for a certain lead, however all I want is the lead ID.

Is this possible ?

Hey mikew

I’m not aware of such an endpoint. I’m curious: Why you need such an endpoint? What is the technical reason?

Greetings
Sebastian

Hi @sfahrenkrog1

Thanks for the quick reply. I am not that technical, however for example if I want to update a lead information via the API, I need to have their lead_id.
Specifically if I am trying to trigger a specific email I would use the API call
/api/emails/{{**email_id**}}/contact/{{**contact_id**}}/send

So here I would need to first query the api to get the lead id

1 Like

Okay, thank you! I see.

I was hoping to maybe help you with other solutions we write for that problem but for this specific problem I don’t know any shortcut.

We wrote a little plugin with its own api endpoint to do free database queries. We provide that to all our customers to give them the chance to freely query the mautic database via api calls.

(That reminds me that I have to open source it on github)

Wish you a nice day!

  • Sebastian
1 Like

Nice. Interested in checking it out once you have put it on Github.

I will notify you if it is ready! Think next week.

1 Like

Sounds very interesting.

I would be interested to take a look at it.