# Get Universal Action

Get one published action schema, including its arguments, response fields, and supported controls.

`GET https://connect.mindcloud.co/v2/universal/apps/:appSlug/actions/:actionSlug`

Permissions: any API key can call this endpoint.

## Parameters

### Path

- `appSlug` (string, required): The app, by its slug or its id, from List Universal Apps.
- `actionSlug` (string, required): The action, by its slug or its id, from List Universal Actions.

### Headers

- `X-Company-Id` (string): Optional. The id of the organization to act in. Leave it out to act in the API key's own organization. A key can also act in its child organizations, and, with "Use this key across all of your organizations" on, in every organization its creator can open in the app. List them with GET /v2/companies. Every response's X-Company-Id header names the organization it acted in. See [Organizations](https://mindcloud.co/docs/api/rest/introduction/organizations).

### Query

- `version` (string): The published app version. Defaults to latest.
  The app version to inspect. Defaults to latest.
  Default: `latest`
- `fields` (string): Comma-separated response fields.
  Comma-separated fields to select from the action schema response.

## Example request

```bash
curl --request GET \
  --url 'https://connect.mindcloud.co/v2/universal/apps/slack/actions/send-channel-message?version=latest&fields=actionSlug%2Cname%2CrequiredArguments%2CoptionalArguments%2CresponseFields' \
  --header 'Authorization: Bearer $MINDCLOUD_API_TOKEN'
```

## Response fields

- `id` (string): Unique id of the action.
- `appId` (string): The app that provides this action.
- `appSlug` (string): The app slug used in Universal API routes.
- `appName` (string): The app's display name.
- `appVersion` (string): The resolved published app version.
- `actionSlug` (string): The action slug used in Universal API routes.
- `name` (string): The action's display name.
- `kind` (string): trigger for an action that starts a workflow (add it as a trigger); action for one a step runs.
  Allowed values:
    - `action`
    - `trigger`
- `description` (string): What the action does.
- `method` (string): The provider method selected by the action definition.
- `operation` (string): The action operation, such as read or create.
- `model` (string): The provider model this action uses.
- `supports` (object): The response controls supported by this action.
- `queryCapabilities` (object): Limits and paging capabilities for this action.
- `requiredArguments` (array of objects): Arguments the action requires.
- `optionalArguments` (array of objects): Arguments the action accepts but does not require.
- `responseFields` (array of string): Field keys the action can return.
- `responseSchema` (array of objects): Definitions for fields the action can return.
- `controls` (object): Response controls and their defaults.
- `isSchemaDynamic` (boolean): True when the provider determines the response schema at run time.

## Example response

```json
{
  "success": true,
  "data": {
    "id": "action_send_channel_message",
    "appId": "slack",
    "appSlug": "slack",
    "appName": "Slack",
    "appVersion": "0.3.27",
    "actionSlug": "send-channel-message",
    "name": "Send Channel Message",
    "description": "Sends a message to a Slack channel.",
    "method": "POST",
    "operation": "create",
    "model": "message",
    "requiredArguments": [
      {
        "key": "channel",
        "dataType": "string",
        "required": true
      },
      {
        "key": "text",
        "dataType": "string",
        "required": true
      }
    ],
    "optionalArguments": [],
    "responseFields": [
      "id",
      "channel",
      "text",
      "timestamp"
    ],
    "supports": {
      "fields": true
    },
    "controls": {
      "fields": true
    }
  }
}
```

## Errors

- 400 Unknown query parameter: `VALIDATION_FAILED` / `UNKNOWN_PARAM` "Unknown query parameter "verbosity". Accepted parameters: version, fields."
- 404 Universal action not found: `NOT_FOUND` / `UNIVERSAL_ACTION_NOT_FOUND` "No Universal API action matched the selected app/version/actionSlug."
- 409 Universal action slug conflict: `CONFLICT` / `UNIVERSAL_ACTION_SLUG_CONFLICT` "Multiple Universal API actions resolve to that actionSlug for the selected app/version."
