# API

**Application Program Interface (API)** allows Valorx Fusion App to call Salesforce Webservices. Salesforce will allow to create API using external platforms. Designers can create an Apex Class in **Salesforce** by logging into your **Org Id** or they can even use the existing or predefined API enabled classes.

* Refer [**Exposing Apex Classes as REST Web Services**](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_rest.htm).
* Refer [**Exposing APEX Methods as SOAP Web Services**](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_web_services.htm).

Create a Apex Class in Salesforce. Once a class is created then, open an app from **Connections List** in **Design Studio**, and click on **Task** and select **New API Task**.

![](https://2472585788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFqFFf4143HS0_Wagnz%2Fuploads%2FS7qtwvndEsgvxotMyZKu%2FFusion%20Docs%20Update%20as%20per%20V15%20-%2027.png?alt=media\&token=6f12461c-af85-4834-9f09-8ed4612ddfb7)

**API Task** window will open which will have Class Name, Name, Classes and Actions.

![](https://2472585788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFqFFf4143HS0_Wagnz%2Fuploads%2FuvFqr4kVmSusX2snNstL%2FMicrosoftTeams-image%20\(19\).png?alt=media\&token=92726d9e-f1fd-4736-8b1e-a411a6007553)

Follow the below steps to create and run an API through Valorx Fusion.

* Provide the name of the API task under **Class Name**.
* Select the class from the drop-down provided under "*Classes*".
* Select the **Actions** from the drop-down ( Method that we used to create API task).
* Parameter Mapping will be displayed depending on the Actions selected.
* Select where to display the results under Return Type Mapping.
* Click **Save**.
