> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# GetAction

# Package: actions

# Namespace: ActionCatalogService

# Method link: https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-catalog/get-action.md

## Permission Scopes:
Set Up Automations: SCOPE.CRM.SETUP-AUTOMATIONS

## Introduction

Retrieves a specific version of an action by ID.

This method returns any specified version of the action.

- To retrieve the version of an action that's active on the current site, call [Get Runtime Action](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-catalog/get-runtime-action.md).
- To retrieve the latest version of an action as defined in the [app dashboard](https://dev.wix.com/docs/build-apps/develop-your-app/app-dashboard/about-the-app-dashboard.md), call [Get Latest Action](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-catalog/get-latest-action.md).

---

## REST API

### Schema

```
 Method: getAction
 Description: Retrieves a specific version of an action by GUID.  This method returns any specified version of the action.  - To retrieve the version of an action that's active on the current site, call [Get Runtime Action](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-catalog/get-runtime-action.md). - To retrieve the latest version of an action as defined in the [app dashboard](https://dev.wix.com/docs/build-apps/develop-your-app/app-dashboard/about-the-app-dashboard.md), call [Get Latest Action](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-catalog/get-latest-action.md).
 URL: https://www.wixapis.com/automations/actioncatalog/v1/action/{actionId}
 Method: GET
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  actionId
 Method parameters: 
   param name: actionId | type:   none | required: true 
 Return type: GetActionResponse
  - name: action | type: Action | description: Retrieved action.  
     - name: id | type: string | description: Action GUID.  | validation: format GUID
     - name: appId | type: string | description: GUID of the [app that created the action](https://dev.wix.com/docs/api-reference/business-management/automations/actions/add-an-action-to-your-app.md).  | validation: format GUID
     - name: actionKey | type: string | description: Action key.  Learn about [adding an action to your app](https://dev.wix.com/docs/api-reference/business-management/automations/actions/add-an-action-to-your-app.md).  | validation: minLength 5, maxLength 50
     - name: inputSchema | type: object | description: Action [input schema](https://dev.wix.com/docs/api-reference/business-management/automations/actions/about-actions.md#the-input-schema).  
     - name: outputSchema | type: object | description: Action [output schema](https://dev.wix.com/docs/api-reference/business-management/automations/actions/about-actions.md#the-output-schema).  
     - name: displayName | type: string | description: Action display name. Users see this name when they [choose an action for an automation](https://support.wix.com/en/article/wix-automations-creating-an-automation-with-the-new-builder#step-4-choose-an-action). For example, "Send SMS" or "Create Coupon".  | validation: minLength 1, maxLength 80
     - name: description | type: string | description: Action description displayed in the site dashboard to Wix users.  
     - name: implementedMethods | type: ImplementedMethods | description: Additional [service plugin methods](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/introduction.md#implement-the-service-plugin-methods) implemented for this action.  
        - name: validateConfiguration | type: boolean | description: Whether [Validate Configuration](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/validate-configuration.md) is implemented.  Default: `false`.  
        - name: getQuotaInfo | type: boolean | description: Whether [Get Quota Info](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/get-quota-info.md) is implemented.  Default: `false`.  
     - name: interfaceConfiguration | type: InterfaceConfiguration | description: Selected user interface for the action. The UI is displayed to the Wix user in the site dashboard when they configure the action.  
        - ONE-OF: 
           - name: genericOptions | type: GenericOptions | description: Details for the generic UI.  
              - name: uiSchema | type: object | description: UI schema.  
        - name: type | type: Type | description: Type of action configuration UI.  
             - enum:
             -     UNKNOWN_TYPE: Unknown action configuration UI.
             -     GENERIC: The generic action configuration UI. This requires you to provide a [UI schema](https://dev.wix.com/docs/api-reference/business-management/automations/actions/about-actions.md#the-ui-schema).
     - name: icon | type: Image | description: Action icon displayed in the [site dashboard](https://support.wix.com/en/article/about-your-wix-dashboard) to Wix users.  
        - name: id | type: string | description: WixMedia image GUID.  
        - name: url | type: string | description: Image URL.  
        - name: height | type: integer | description: Original image height.  
        - name: width | type: integer | description: Original image width.  
        - name: altText | type: string | description: Image alt text.  
        - name: filename | type: string | description: Image filename.  
     - name: createdDate | type: string | description: Date and time the action was created.  | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the action was last updated.  | validation: format date-time
     - name: baseUri | type: string | description: Action base URI. Wix calls your action at this base address.  Learn more about the [Action Provider service plugin](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/introduction.md).  | validation: maxLength 256


```

### Examples

### Get action
```curl
curl -X GET 'https://www.wixapis.com/v1/action/a3d2f8e1-7c4b-4a9e-b6d5-1e8f3c2a9b7d' \
    -H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.actions.ActionCatalogService.getAction(actionId)
 Description: Retrieves a specific version of an action by GUID.  This method returns any specified version of the action.  - To retrieve the version of an action that's active on the current site, call [Get Runtime Action](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-catalog/get-runtime-action.md). - To retrieve the latest version of an action as defined in the [app dashboard](https://dev.wix.com/docs/build-apps/develop-your-app/app-dashboard/about-the-app-dashboard.md), call [Get Latest Action](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-catalog/get-latest-action.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  actionId
 Method parameters: 
   param name: actionId | type: string | description: Action GUID. | required: true | validation: format GUID
 Return type: PROMISE<Action>
  - name: _id | type: string | description: Action GUID.  | validation: format GUID
  - name: appId | type: string | description: GUID of the [app that created the action](https://dev.wix.com/docs/api-reference/business-management/automations/actions/add-an-action-to-your-app.md).  | validation: format GUID
  - name: actionKey | type: string | description: Action key.  Learn about [adding an action to your app](https://dev.wix.com/docs/api-reference/business-management/automations/actions/add-an-action-to-your-app.md).  | validation: minLength 5, maxLength 50
  - name: inputSchema | type: object | description: Action [input schema](https://dev.wix.com/docs/api-reference/business-management/automations/actions/about-actions.md#the-input-schema).  
  - name: outputSchema | type: object | description: Action [output schema](https://dev.wix.com/docs/api-reference/business-management/automations/actions/about-actions.md#the-output-schema).  
  - name: displayName | type: string | description: Action display name. Users see this name when they [choose an action for an automation](https://support.wix.com/en/article/wix-automations-creating-an-automation-with-the-new-builder#step-4-choose-an-action). For example, "Send SMS" or "Create Coupon".  | validation: minLength 1, maxLength 80
  - name: description | type: string | description: Action description displayed in the site dashboard to Wix users.  
  - name: implementedMethods | type: ImplementedMethods | description: Additional [service plugin methods](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/introduction.md#implement-the-service-plugin-methods) implemented for this action.  
     - name: validateConfiguration | type: boolean | description: Whether [Validate Configuration](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/validate-configuration.md) is implemented.  Default: `false`.  
     - name: getQuotaInfo | type: boolean | description: Whether [Get Quota Info](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/get-quota-info.md) is implemented.  Default: `false`.  
  - name: interfaceConfiguration | type: InterfaceConfiguration | description: Selected user interface for the action. The UI is displayed to the Wix user in the site dashboard when they configure the action.  
     - ONE-OF: 
        - name: genericOptions | type: GenericOptions | description: Details for the generic UI.  
           - name: uiSchema | type: object | description: UI schema.  
     - name: type | type: Type | description: Type of action configuration UI.  
         - enum:
         -     UNKNOWN_TYPE: Unknown action configuration UI.
         -     GENERIC: The generic action configuration UI. This requires you to provide a [UI schema](https://dev.wix.com/docs/api-reference/business-management/automations/actions/about-actions.md#the-ui-schema).
  - name: icon | type: string | description: Action icon displayed in the [site dashboard](https://support.wix.com/en/article/about-your-wix-dashboard) to Wix users.  
  - name: _createdDate | type: Date | description: Date and time the action was created.  
  - name: _updatedDate | type: Date | description: Date and time the action was last updated.  
  - name: baseUri | type: string | description: Action base URI. Wix calls your action at this base address.  Learn more about the [Action Provider service plugin](https://dev.wix.com/docs/api-reference/business-management/automations/actions/action-provider-service-plugin/introduction.md).  | validation: maxLength 256


```

### Examples

### Get action
Retrieves an action by its ID.

```javascript
import { actionCatalog } from "@wix/automations";

async function getAction() {
  const response = await actionCatalog.getAction(
    "a3d2f8e1-7c4b-4a9e-b6d5-1e8f3c2a9b7d"
  );
  return response;
}

/* Promise resolves to:
 * {
 *   "action": {
 *     "_id": "a3d2f8e1-7c4b-4a9e-b6d5-1e8f3c2a9b7d",
 *     "appId": "e4c3e640-0b63-4bd9-8574-53f8c14e0236",
 *     "actionKey": "send-gift-card",
 *     "inputSchema": {
 *       "$schema": "http://json-schema.org/draft-07/schema",
 *       "type": "object",
 *       "required": ["contactId", "amount"],
 *       "properties": {
 *         "contactId": { "type": "string", "format": "uuid", "title": "Contact ID" },
 *         "amount": { "type": "number", "title": "Gift card amount" }
 *       }
 *     },
 *     "displayName": "Send a gift card",
 *     "description": "Send a gift card to a contact via email.",
 *     "implementedMethods": { "validateConfiguration": false, "getQuotaInfo": false },
 *     "interfaceConfiguration": { "type": "GENERIC" },
 *     "_createdDate": "2024-11-15T10:30:00.000Z",
 *     "_updatedDate": "2024-11-15T10:30:00.000Z"
 *   }
 * }
 */

```

### getAction (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { actionCatalog } from '@wix/automations';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { actionCatalog },
  // Include the auth strategy and host as relevant
});


async function getAction(actionId) {
  const response = await myWixClient.actionCatalog.getAction(actionId);
};
```

---