# Update leads via API

**URL:** https://forum.mautic.org/t/update-leads-via-api/1817
**Category:** Product Support
**Created:** [May 9, 2015, 9:00pm UTC](https://forum.mautic.org/t/update-leads-via-api/1817 "2015-05-09T21:00:50Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![dima](https://avatars.discourse-cdn.com/v4/letter/d/e47c2d/32.png) [@dima](https://forum.mautic.org/u/dima)
#### Post date: [May 9, 2015, 9:00pm UTC](https://forum.mautic.org/t/update-leads-via-api/1817/1 "2015-05-09T21:00:50Z")

</div>

I’m trying to update or create lead via API using C#. I’ve look into mautic api library, but I didn’t found method, which updates lead, so I cannot understand in which format I have to build web-request.  
  
There are some examples in library description how to create/update lead, but there no such methods in ‘lib/Api/Leads.php’. Maybe I missed something, and these methods are in some other place?  
  
It would be great to know, what exactly format API requires. But unfortunately I didn’t found any related information.  
  
Thanks

---

<div class="post-metadata">

### Author: ![dima](https://avatars.discourse-cdn.com/v4/letter/d/e47c2d/32.png) [@dima](https://forum.mautic.org/u/dima)
#### Post date: [May 9, 2015, 9:00pm UTC](https://forum.mautic.org/t/update-leads-via-api/1817/2 "2015-05-09T21:00:50Z")

</div>

I’m trying to update or create lead via API using C#. I’ve look into mautic api library, but I didn’t found method, which updates lead, so I cannot understand in which format I have to build web-request.  
There are some examples in library description how to create/update lead, but there no such methods in ‘lib/Api/Leads.php’. Maybe I missed something, and these methods are in some other place?  
It would be great to know, what exactly format API requires. But unfortunately I didn’t found any related information.  
Thanks

---

<div class="post-metadata">

### Author: ![zpetterd](https://avatars.discourse-cdn.com/v4/letter/z/f14d63/32.png) [@zpetterd](https://forum.mautic.org/u/zpetterd)
#### Post date: [May 11, 2015, 2:50am UTC](https://forum.mautic.org/t/update-leads-via-api/1817/3 "2015-05-11T02:50:18Z")

</div>

Hi Dima,

The Api endpoints are listed out in this file pathtomauticappbundlesLeadBundleConfigconfig.php . There is both the internal endpoints and web endpoints in that file so be carefull. You should just be able to just PUT the fields in using URL parameters. For example [my.mauticsite.com/api/v2/leads/{id}/edit?firstname=Testname&lastname=TestLastName](http://my.mauticsite.com/api/v2/leads/%7Bid%7D/edit?firstname=Testname&lastname=TestLastName) and so on for the fields having the alias name in Mautic-\>Leads-\>Lead fields.

Hopefully that all makes sense, the Api works as you would expect when using GET, PUT’s, DELETE and so on.

Zac

---

<div class="post-metadata">

### Author: ![dima](https://avatars.discourse-cdn.com/v4/letter/d/e47c2d/32.png) [@dima](https://forum.mautic.org/u/dima)
#### Post date: [May 11, 2015, 10:32am UTC](https://forum.mautic.org/t/update-leads-via-api/1817/4 "2015-05-11T10:32:21Z")

</div>

Hi Zac,

Great! Now it’s much clear.

Thanks

---

<div class="post-metadata">

### Author: ![chad.windnagle](https://avatars.discourse-cdn.com/v4/letter/c/7feea3/32.png) [@chad.windnagle](https://forum.mautic.org/u/chad.windnagle)
#### Post date: [May 11, 2015, 1:16pm UTC](https://forum.mautic.org/t/update-leads-via-api/1817/5 "2015-05-11T13:16:33Z")

</div>

Check this out:

[https://github.com/mautic/api-library/tree/master/apitester/endpoints](https://github.com/mautic/api-library/tree/master/apitester/endpoints)

All the endpoints are listed here in the JSON format. The only thing that isn’t really clear is which http verbs to use, but the read / write contexts are here:

[https://github.com/mautic/api-library#get-a-context-object](https://github.com/mautic/api-library#get-a-context-object)

---

<div class="post-metadata">

### Author: ![jdq](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jdq/32/73_2.png) [@jdq](https://forum.mautic.org/u/jdq)
#### Post date: [April 16, 2016, 9:07pm UTC](https://forum.mautic.org/t/update-leads-via-api/1817/6 "2016-04-16T21:07:50Z")

</div>

Is it possible to update a lead and lead info (or add a lead) via API if we are using the [Mautic.Com](http://Mautic.Com) hosted solution?

---

<div class="post-metadata">

### Author: ![giovanni](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/giovanni/32/577_2.png) [@giovanni](https://forum.mautic.org/u/giovanni)
#### Post date: [July 4, 2016, 7:30am UTC](https://forum.mautic.org/t/update-leads-via-api/1817/7 "2016-07-04T07:30:32Z")

</div>

Hi @dima so where are you updating leads from? How does your integration work? I’m studying different ways of integrating leads from Sugar so I was wandering if I could get some tips from you.

---

<div class="post-metadata">

### Author: ![farshad](https://avatars.discourse-cdn.com/v4/letter/f/bbe5ce/32.png) [@farshad](https://forum.mautic.org/u/farshad)
#### Post date: [February 5, 2017, 7:47pm UTC](https://forum.mautic.org/t/update-leads-via-api/1817/8 "2017-02-05T19:47:55Z")

</div>

Hi @dima

Have you had any luck creating the lead update API. I am trying to find out a way to make that for my wordpress website.

---

<div class="post-metadata">

### Author: ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)
#### Post date: [February 2, 2020, 10:59pm UTC](https://forum.mautic.org/t/update-leads-via-api/1817/9 "2020-02-02T22:59:59Z")

</div>


