> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-llms-scoped-indexes.mintlify.site/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

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

#### Api Action

<Tabs>
  <Tab title="TypeScript">
    ```ts theme={null}
    const apiAction = new APIAction(
      url, //Replace this with the required url
      HTTPSRequestMethods.POST //replace this with the type of method
    );

    apiAction.setPayload(payload); //set the payloaf forn the request

    apiAction.setHeaders(headers); //set the header for the request

    apiAction.setDataKey("cometchatData"); //replace this with the key , if you want to replace the key oin which all the data for form will be sent
    ```
  </Tab>
</Tabs>

#### Url Navigation

<Tabs>
  <Tab title="TypeScript">
    ```ts theme={null}
    const urlNavigation = new URLNavigationAction(
      url: "https://www.cometchat.com/",//Replace this with the required url
    );
    ```
  </Tab>
</Tabs>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.