> For the complete documentation index, see [llms.txt](https://docs.fastn.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fastn.ai/build/connectors/action-detail.md).

# Actions

A connector's actions: the action list, the action editor and its seven tabs, mocks, versions and proposing an update.

An **action** is one operation a connector can perform, such as *Create Contact* or *List Owners*. Under the hood it is one HTTP request (method, URL, headers, body) plus two schemas: the input it accepts and the output it returns. Workflows, the Agent and the MCP gateway call actions; they never call the vendor's API directly.

### The action list

On the [connector detail page](/build/connectors/inside-a-connector.md), the connector rail lists every action of the open connector with its method chip (`GET`, `POST`, `PUT`, `PATCH`, `DELETE`).

* Click an action to open it in the editor. The URL becomes `/integrations/connectors/<connector-slug>/<action-slug>`.
* Hover an action and click **⋯** for its menu. On a managed connector it holds **Export**.
* On a connector your workspace owns, **+** next to the connector's name adds an action; see [Add an action](/build/connectors/editing-and-deleting.md#add-an-action).
* Tick actions (or **Select all**) to act on several at once. The rail then shows *n selected* and an **Export** button.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-24a363db8c8d893d1a9579c2caf555272923684c%2Fconnector-actions-selected.webp?alt=media" alt="The connector rail with two actions ticked, Add List Members and Archive Call, and a bar at the top reading 2 selected with an Export link"><figcaption><p>Selecting actions shows the bulk <strong>Export</strong>.</p></figcaption></figure>

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-f61af3b2885e4857b6768106f4098923717dbe98%2Faction-row-menu.webp?alt=media" alt="The Add List Members row with its three-dot menu open, showing one item, Export"><figcaption><p>The menu on a single action.</p></figcaption></figure>

### The action editor

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-c7b35f4a65f89b9eb2d95d65f153099348861c96%2Faction-editor-params.webp?alt=media" alt="The action editor for HubSpot Add List Members: name and description fields at the top, a PUT method selector, the URL https://api.hubapi.com/crm/v3/lists/{{input.listId}}/memberships/add and a Run button, the tabs Params, Headers, Auth, Body, Input schema, Output schema and Mocks with Params open showing No query parameters, and a footer with v1.2, New version, Read-only owned by platform, and Propose an update"><figcaption><p>The editor for one action. <code>{{input.listId}}</code> in the URL is filled in from the action's input when it runs.</p></figcaption></figure>

The top of the editor holds:

| Element         | Meaning                                                                                                                             |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **Name**        | The action's display name.                                                                                                          |
| **Description** | What the action does and how to call it. The Agent reads this, so it should say which inputs matter.                                |
| **Method**      | `GET`, `POST`, `PUT`, `PATCH` or `DELETE`.                                                                                          |
| **URL**         | The endpoint. Parts in double braces are filled in when the action runs: `{{input.<field>}}` takes a value from the action's input. |
| **Run**         | Opens the run panel to call the action once, live or with a mock. See [Running an action](#running-an-action).                      |

#### Placeholders

Anywhere in the URL, headers, query parameters or body, values in double braces are filled in at run time:

* `{{input.<field>}}`: a field from the action's input, as defined in **Input schema**.
* `{{auth.token}}`: the credential from the connection, for example in an `Authorization: Bearer {{auth.token}}` header.

#### The seven tabs

| Tab               | What you set there                                                                                                                                                                                                                                                                                                                                              |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Params**        | Query parameters (**Query Parameters**, **+ Add**). Each one is a key and a value; the value can be a placeholder.                                                                                                                                                                                                                                              |
| **Headers**       | Request headers (**Request Headers**, **+ Add**), as **KEY** / **VALUE** pairs.                                                                                                                                                                                                                                                                                 |
| **Auth**          | How this request is authorised. **Auth type**: `No Auth`, `Basic Auth`, `Bearer Token`, `JWT Bearer`, `AWS Signature`, `OAuth 1.0`, `OAuth 2.0` or `API Key`. **No Auth** (the panel then reads *No auth · This request does not use any authorization.*) is the usual choice when the credential is already sent in a header, as in the HubSpot example below. |
| **Body**          | **Body type**: `JSON`, `Form Data`, `Raw`, `GraphQL` or `Form URL Encoded`, and the body itself.                                                                                                                                                                                                                                                                |
| **Input schema**  | The inputs the action accepts. See below.                                                                                                                                                                                                                                                                                                                       |
| **Output schema** | The shape of the response the action returns. Same editor as the input schema.                                                                                                                                                                                                                                                                                  |
| **Mocks**         | Canned responses used in mock mode. See below.                                                                                                                                                                                                                                                                                                                  |

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-1209c4728eb09471174a0f3c8f6ff624f2948309%2Faction-editor-headers.webp?alt=media" alt="The Headers tab with two rows: Content-Type application/json and Authorization Bearer {{auth.token}}"><figcaption><p>The connection's token goes into the <code>Authorization</code> header through <code>{{auth.token}}</code>.</p></figcaption></figure>

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-25533ec0a7963505540b037252ae98b8644534f6%2Faction-editor-auth.webp?alt=media" alt="The Auth tab with Auth type set to No Auth and the text No auth, This request does not use any authorization"><figcaption><p>The Auth tab. Here the credential is sent in a header instead.</p></figcaption></figure>

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-604d151a1b7a17a4afb1be825685f6f25aa73bea%2Faction-editor-body.webp?alt=media" alt="The Body tab for HubSpot Create Contact: Body type JSON on the left and a body editor labelled body JSON on the right"><figcaption><p>The Body tab with <strong>JSON</strong> selected.</p></figcaption></figure>

#### Input schema and output schema

> Define the expected input parameters for this action.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-3d5b18e96cf2aab8ff6d1663362ede2df426db44%2Faction-editor-input-schema.webp?alt=media" alt="The Input schema tab for Create Contact in Form view: 1 field, properties, of type object, with nested fields email, phone, company, website, jobtitle, lastname, firstname, hs_lead_status and lifecyclestage, each with a key, a label, a description, a type selector, a Required/Optional toggle, a more-options button, a plus button and a delete cross"><figcaption><p>An object field (<code>properties</code>) with nested string fields.</p></figcaption></figure>

Switch between **Form** and **JSON**. In Form view each field is one row:

| Part                        | Meaning                                                                               |
| --------------------------- | ------------------------------------------------------------------------------------- |
| Key                         | The field name used in placeholders, for example `email`.                             |
| Label                       | A readable name, for example *Email*.                                                 |
| Description                 | What the field is for.                                                                |
| Type                        | `string`, `number`, `boolean`, `object` or `array`.                                   |
| **Required** / **Optional** | Whether the caller must send it.                                                      |
| **⋮** (More options)        | **Enum values**: limit the field to a fixed list of values.                           |
| **+**                       | Adds a nested field (*Convert to object and add nested field* on a non-object field). |
| **✕**                       | Removes the field.                                                                    |

**Add** (top right) adds a top-level field. The count (for example *1 field*) shows how many top-level fields there are.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-8c3ccf2314a19988d7076ea8e93036e323d79be4%2Faction-editor-field-options.webp?alt=media" alt="The Input schema tab with a field&#x27;s more-options menu open, showing Enum values"><figcaption><p><strong>More options</strong> on a field.</p></figcaption></figure>

The **Output schema** tab (*Define the expected output structure for this action.*) uses the same editor. Workflows and the Agent read it to know which fields a response contains.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-aa115af107451c34bc130872021c2ad8a5ad5891%2Faction-editor-output-schema.webp?alt=media" alt="The Output schema tab for Create Contact: 5 fields, id string, archived boolean, createdAt string, updatedAt string and properties object"><figcaption><p>The fields Create Contact returns.</p></figcaption></figure>

#### Mocks

> Test cases returned when running in mock mode. LLM-generated and live-captured stubs are auto-updated when you regenerate.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-ca043aed9b63265ad19be7237e687cb4be0bd983%2Faction-editor-mocks.webp?alt=media" alt="The Mocks tab of HubSpot Create Contact, headed Mock Scenarios, with + Add custom and Generate with AI buttons and the empty state No mock scenarios yet. Click Generate with AI to create scenarios automatically"><figcaption><p>The Mocks tab before any scenario exists.</p></figcaption></figure>

A mock is a stored response for this action. When a workflow runs in mock mode, the action returns the mock instead of calling the vendor, so you can test a workflow without touching real data.

* **+ Add custom** adds a scenario you write yourself.
* **Generate with AI** has the AI write scenarios for the action. Generated scenarios are replaced when you generate again.
* Each scenario shows its source (`CUSTOM` for hand-written ones), its name and a description. The bin icon deletes it.
* With none saved, the tab reads *No mock scenarios yet.*

### Running an action

**Run** opens a panel titled with the method and the action's name.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-26d20e86652ab71f0433c291faa13a169fa06512%2Faction-run-panel.webp?alt=media" alt="The run panel for GET List Users with the Mock toggle switched on: Mock scenario (optional), No saved mock scenarios. AI will generate a realistic response, an Input section with Form and JSON views and a plus button, and a Run Mock button"><figcaption><p>The run panel in mock mode.</p></figcaption></figure>

| Part                          | Meaning                                                                                                                                        |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| **Mock**                      | Toggle. Off: the call goes to the real app. On: no call is made; a mock response is returned instead.                                          |
| **Connection**                | *(Live mode.)* Which of your connections to run as. With no connection it reads *No connections available.* and **Run Action** stays disabled. |
| **Mock scenario (optional)**  | *(Mock mode.)* Which saved mock to return. With none saved: *No saved mock scenarios. AI will generate a realistic response.*                  |
| **Input**                     | The action's input, in **Form** or **JSON** view. **+** adds a field.                                                                          |
| **Run Action** / **Run Mock** | Runs it.                                                                                                                                       |

The result appears beside the inputs: the HTTP status, the time taken (`0ms (mock)` for a mock), and **Response** and **Request** tabs with the response body and the request that was sent.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-4ea07e39bcf2c9ddf39a2f32ea3cdacc475399b0%2Faction-run-live-result.webp?alt=media" alt="The run panel for GET List Users with a Mock button, Connection set to default (default), a Run Action button, and on the right HTTP 200, the response time and the Response tab showing a JSON array of sample users"><figcaption><p>A live run through a connection: status, time and the response body.</p></figcaption></figure>

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-b32f3ab5ab52161ef50417dd12d013c11556a830%2Faction-run-live-request.webp?alt=media" alt="The same run panel with the Request tab selected: URL GET https://jsonplaceholder.typicode.com/users?_limit=[redacted], and Body: No request body, GET requests do not send one"><figcaption><p>The Request tab shows what was sent. Query values are shown as <code>[redacted]</code>.</p></figcaption></figure>

After a successful live run the action is marked **Live tested** (a green check also appears next to it in the rail), and **Last test** in the panel reopens the most recent result.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-6fec56f2a16aecf892f5411d02bf082f7e884102%2Faction-run-mock-result.webp?alt=media" alt="The run panel after Run Mock: on the right HTTP 200, 0ms (mock), Response and Request tabs, and the response body null"><figcaption><p>A mock run for an action with no saved scenarios and no output schema.</p></figcaption></figure>

### Versions

The footer shows the action's version, for example `v1.2`, and **New version**. On an action your workspace owns it also shows **Save Changes**. Hovering the version explains it: *Internal revision — major.minor. A minor bump reaches pinned callers automatically; a major fork does not.*

**New version** opens a small form:

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-8031c229c0e113af56bd0676c5b99c43400a9cc2%2Faction-new-version.webp?alt=media" alt="The New version form above the editor footer: a Fork selector set to Next internal major (breaking), checkboxes Deprecate this version and Make default, and Create and Cancel buttons"><figcaption><p>Creating a new version of an action.</p></figcaption></figure>

| Field                      | Meaning                                                                                                                                                                                                                                                                                                                 |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Fork**                   | **Next internal major (breaking)**: a new major version of this action, for a change that would break existing callers. **New external version**: a version tied to a different version of the vendor's API. External versions are what [version pins](/build/connectors/inside-a-connector.md#version-pins) work with. |
| **Deprecate this version** | Marks the current version as deprecated.                                                                                                                                                                                                                                                                                |
| **Make default**           | Makes the new version the one used when a caller does not ask for a specific version.                                                                                                                                                                                                                                   |

**Create** makes the version; **Cancel** closes the form.

### Platform-owned actions and Propose an update

Actions on a managed connector belong to fastn. Their footer reads *Read-only — owned by platform*, and you cannot save changes to them. You can still read every tab, run the action, and export it.

If an action is wrong or missing something, click **Propose an update**:

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-72ba601616169145b08429a276ea94d0e3b3269b%2Faction-propose-update.webp?alt=media" alt="The Propose an update form at the bottom of the editor: a text box reading Add a note for the reviewer (optional), why this update, what changed, with Cancel and Propose update buttons"><figcaption><p>A proposal goes to fastn for review.</p></figcaption></figure>

1. Make your changes in the editor tabs.
2. Click **Propose an update** and add a note for the reviewer: why the update is needed and what changed.
3. Click **Propose update**.

Fastn reviews the proposal. Nothing changes on the connector until it is accepted.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fastn.ai/build/connectors/action-detail.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
