Showing results for 
Search instead for 
Did you mean: 

Create new endpoint in the API

Create new endpoint in the API

Hi everybody,


I'm currently working on an headless eCommerce website, whose back-end is Magento 2.3.


In order to fullfill some custom needs, I have to enhance the provided API and add new endpoints to it. 


Though this kind of need seems pretty usual to me, I didn't read anything about this subject in the Magento API documentation.


Any help would be greatly appreciated!




Re: Create new endpoint in the API

Hello @david_iux ,


To create custom API, Please follow this blog

You can refer below link for Magento 2.x version.

I have used below body for creating customers through Rest Api and it worked properly.

Url :

Type: POST

Content-Type : application/json

payload Data:

     "customer": {
         "email": "",
         "firstname": "Abc",
         "lastname": "Xyz"   

     "password": "Abc@123456"


    "id": 4,
    "group_id": 1,
    "created_at": "2017-01-27 18:35:48",
    "updated_at": "2017-01-27 18:35:48",
    "created_in": "Default Store View",
    "email": "",
    "firstname": "Abc",
    "lastname": "Xyz",
    "store_id": 1,
    "website_id": 1,
    "addresses": [],
    "disable_auto_group_change": 0

Call through postman see example in attachment:




If my answer is useful, please Accept as Solution & give Kudos