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

# External actions API

> Run actions in external systems from Fibery automations.

To execute actions in third-party systems, either extend an existing custom integration app, or create a new one.

## **External Actions Domain**

Check [App configuration](/guides/integrations/app-configuration). You can extend it with **actions**.

| Name           | Type   | Description                | Example                                              |
| -------------- | ------ | -------------------------- | ---------------------------------------------------- |
| name           | string | Name                       | "MyApp"                                              |
| website        | string | Website                    | "[http://myawesomeapp.com](http://myawesomeapp.com)" |
| version        | string | Version                    | "1.0.0"                                              |
| …              |        |                            |                                                      |
| **actions**    | Array  | Actions                    | `[]`                                                 |
| responsibleFor | Object | Custom app responsible for | `{...(any other), "automations": true}`              |

### **Action**

Action model has the following structure:

| Name        | Type   | Description           | Required | Example                           |
| ----------- | ------ | --------------------- | -------- | --------------------------------- |
| action      | string | Identity of action    | true     | "Give the id for action"          |
| name        | string | Name of action        | true     | "Give the name for action"        |
| description | string | Description of action | false    | "Give the description for action" |
| args        | Array  | Action arguments      | true     | `[]`                              |

### **Action Argument**

Action argument model has the following structure:

| Name                  | Type    | Description                     | Required | Example                                 |
| --------------------- | ------- | ------------------------------- | -------- | --------------------------------------- |
| id                    | string  | Identity of arg                 | true     | "Give the id for argument"              |
| name                  | string  | Name of arg                     | true     | "Give the name for argument"            |
| description           | string  | Description of arg              | false    | "Give the description for argument"     |
| type                  | string  | Type of arg                     | true     | Currently support `text` and `textarea` |
| textTemplateSupported | boolean | Whether templating is supported | false    | `true` or `false`                       |

## **POST /api/v1/automations/action/execute**

Executes specific action with specified parameters. In case of success response just return empty object with success status code.

Request body sample:

```json theme={null}
{
  "action": {
    "action": "create-pull-request",
    "args": {
      "repo": "me/my-repo",
      "name": "new-branch-name",
      "ref": "main"
    }
  },
  "account": {
    "username": "test_user",
    "password": "test$user!"
  }
}
```

Success response:

```json theme={null}
{}
```

Failure response:

```json theme={null}
{
  "message": "Pull request with specified name exists."
}
```
