# 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**.

![](/files/psMAv9VY5IetOSvnVZyX)

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

![](/files/Q72ACZhLbWOPLLOi6eXo)

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**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.valorx.com/valorx-fusion/design-studio/tasks/api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
