API for leads and contacts

hey, is there any api to update and create leads and contacts? can’t find anything

Yes, there are two API versions available:

v8 needs to be set up first, but I would recommend v4.1 anyway.

I’d add as a counter that V8 is a far more modernised method that would be preferable for everything from security through to useability. I’ve not fully made use of 4.1 before so I can’t make a judgement too hard however believe that V8 setup and configuration would be the way to go for the creation of leads and contacts in the most simple and secure manner.

This is the main page for all the calls and commands after following the above guide for installation;

Thank you!
I’ve set it up6 but it doesn’t work. I try to make a request but get the 404 error (The requested URL was not found on this server.).

What should I fix?

What happens if you navigate to your URL followed by /Api/access_token

Example;
www.google.com/Api/access_token
^^^^^^^^^^^^^^ Replacing google with your URL/IP

not found in both cases if I type myip/Api/access_token and myip/suitecrm/Api/access_token (myip/suitecrm/index.php is where my suitecrm is)
I tried /suitecrm/index.php/Api/access_token and thats what i get

Hi,
it’s not working like that, you need to submit the post-parameters too. A tool that is often recommended for these purposes is postman, and you’ll also find an example postman project in your installation folder (Api\docs\postman).
Stick to the installation manual, as some steps have to be completed first, including the troubleshooting hints regarding the rewrite module (see Mac-Rae’s link).

Yes, I’m also truing to do it with postman and it doesn’t work too. Actually before I did all those settings JSON API :: SuiteCRM Documentation it worked
So maybe something is wrong there? What can I fix?

Tagging @crmspace also;

So not getting anything after going to yourIP/suitecrm/Api/access_token says to me your API is not configured properly as you would expect to get a warning page asking you to use post method.

The main things to check now knowing that your API is likely not configured correctly is to check your permission, apache redirect is enabled and check you have generated your API keys on your server.

Creating Keys - JSON API :: SuiteCRM Documentation
Configure apache redirect - JSON API :: SuiteCRM Documentation
Updating permissions on Linux;

 sudo chown -R www-data:www-data .
 sudo chmod -R 755 .
 sudo chmod -R 775 cache custom modules themes data upload
 sudo chmod 775 config_override.php 2>/dev/null

 cd Api/V8/OAuth2
 sudo chmod 600 private.key public.key
 sudo chown www-data:www-data p*.key

Once doing the above you should be able to see the “Post Method” page by navigating again to yourIP/suitecrm/Api/access_token which will confirm you have completed everything required on the backend to start using the API