1. Creating Script-2-API
REST API definition is made by easily entering the general information of the API on the Script-2-API screen.
1.1. Creating the /sendMail Method
In the image below, the /sendMail method is created in Groovy to send emails by retrieving email information from the request message body. To add a method, click the Add button, enter the method information, and press the Save button.
You can test the script code by clicking the Try It button.
2. Viewing API Definition Documents
Click the Show Specs link to access the API definition files for Mail API.

3. Creating API Proxy
You can instantly create an API Proxy by clicking the Create API Proxy button from the Script-2-API screen.

3.1 Deploying the API Proxy
Mail API Proxy can be quickly deployed to a defined environment and made available for client consumption. This operation can be managed through the dialog opened by the Deploy button on the API Proxy screen.

4. Testing
The image below shows testing the /sendMail method from the API Proxy page;

