> ## Documentation Index
> Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Action Entity

> Action Entity — CometChat documentation.

Base class for defining the type of actions that can be performed on `BaseInteractiveElement`

Various types of Actions:

| Action             | Description                                                                                          |
| ------------------ | ---------------------------------------------------------------------------------------------------- |
| **Api Action**     | To perform Post, PUT , DELETE, PATCH type of API actions on the user-defined APIs with given payload |
| **URL Navigation** | To open any defined action on given url                                                              |
| **Custom Action**  | To set custom action on front end                                                                    |

**API Action**

<Tabs>
  <Tab title="Java">
    ```java theme={null}
    APIAction apiAction = new APIAction("https url", "POST", "Keyname"); // Keyname can be any userdefined string
    JSONObject payload = new JSONObject(finalString);
    apiAction.setPayload(payload);

    JSONObject header = new JSONObject();
    apiAction.setHeaders(header);
    ```
  </Tab>
</Tabs>

**URL Navigation**

<Tabs>
  <Tab title="Java">
    ```java theme={null}
    URLNavigationAction urlNavigationAction = new URLNavigationAction("https://www.cometchat.com/");
    ```
  </Tab>
</Tabs>
