> For a complete page index, fetch https://docs.synthflow.ai/llms.txt. For full documentation content, fetch https://docs.synthflow.ai/llms-full.txt.

# Get an action

GET https://api.synthflow.ai/v2/actions/{action_id}

Retrieves metadata about an action.

Reference: https://docs.synthflow.ai/api-reference/platform-api/actions/get-action

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.synthflow.ai/v2` (Global, default)
- `https://api.us.synthflow.ai/v2` (United States)
- `https://api.eu.synthflow.ai/v2` (European Union)

## Request

### Path parameters

- `action_id` (string, required) — To find an action's ID, go to its page in your Synthflow dashboard.

### Query parameters

- `include_assistants` (boolean, optional, default: false) — Include assistant IDs assigned to this action.

## Response

### 200

200

- `status` (string, optional)
- `response` (ActionsActionIdGetResponsesContentApplicationJsonSchemaResponse, optional)

## Errors

### 400 Bad Request Error

400

## Types

### ActionsActionIdGetResponsesContentApplicationJsonSchemaResponse

- `actions` (list of ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItems, optional)

### ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItems

- `action_id` (string, optional) — Action ID.
- `action_type` (enum, optional) — Action type.
  - Allowed values: `REAL_TIME_BOOKING_CALCOM`, `REAL_TIME_BOOKING_GHL`, `INFORMATION_EXTRACTOR`, `LIVE_TRANSFER`, `SEND_SMS`, `INCALL_SMS`, `INCALL_WHATSAPP`, `CUSTOM_ACTION`, `CUSTOM_EVAL`, `IVR`, `RINGCX_HANDOFF`, `MCP`, `FIVE9_HANDOFF`, `SEND_EMAIL`
- `name` (string, optional) — Action name.
- `description` (string, optional) — Action description.
- `assistants` (list of string, optional) — Assistant IDs assigned to this action. Returned when `include_assistants=true`.
- `input_variables` (ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariables, optional) — Read-only. `values` lists the input variables saved on the action in the dashboard, and `assistants` lists each agent's mapping. It is not a parameter on `Create an action`, where variables are defined with `variables_during_the_call`.
- `parameters_hard_coded` (ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsParametersHardCoded, optional)

### ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariables

Read-only. `values` lists the input variables saved on the action in the dashboard, and `assistants` lists each agent's mapping. It is not a parameter on `Create an action`, where variables are defined with `variables_during_the_call`.

- `values` (list of ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesValuesItems, optional) — Input variables saved on the action in the dashboard. Empty for a custom action saved only through the API, where the variables are the ones in `variables_during_the_call`.
- `assistants` (list of ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesAssistantsItems, optional) — Assistants attached to this action, including per-assistant input variable mappings.

### ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsParametersHardCoded

- `sms_message_text` (string, optional)
- `recipients` (list of string, optional) — Email addresses that receive the call summary of a post-call email action.
- `server_name` (string, optional) — MCP server name.
- `server_namespace` (string, optional) — MCP namespace prefixing tool names.
- `tools` (list of string, optional) — Namespaced MCP tool names.
- `timeout_ms` (integer, optional) — MCP tool timeout in milliseconds.
- `transfer_mode` (enum, optional) — Transfer mode of a live transfer action.
  - Allowed values: `cold_transfer`, `warm_transfer`, `warm_transfer_with_context`
- `pre_message_pause` (integer, optional) — Silence in seconds before each stage message of a live transfer action.
- `post_message_pause` (integer, optional) — Silence in seconds after each stage message of a live transfer action.
- `dtmf_duration_ms` (integer, optional) — DTMF tone duration in milliseconds of a live transfer action.
- `background_music` (LiveTransferBackgroundMusic, optional) — Hold music the caller hears while a warm transfer is being set up.
- `preferred_caller_id` (string, optional) — Custom caller ID of a live transfer action.
- `sip_headers` (list of LiveTransferSipHeader, optional) — Custom SIP headers of a live transfer action.
- `sip_send_as_uui` (boolean, optional) — Whether the SIP headers of a live transfer action are sent as one User-to-User header.
- `sip_uui_delimiter` (string, optional) — User-to-User delimiter of a live transfer action.
- `sip_uui_encoding` (enum, optional) — User-to-User encoding of a live transfer action.
  - Allowed values: `ascii`, `hex`
- `run_action_before_call_start` (boolean, optional) — Whether a custom action runs before the call starts.
- `variables` (list of string, optional) — Result variable paths selected on a custom action. Empty when none is set.
- `api_response` (ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsParametersHardCodedApiResponse, optional, nullable) — Example of the body the custom action's API returns. `null` when no example is stored or when the last `Initialize` run in the dashboard failed. After a successful `Initialize` in the dashboard, it holds the body that run returned.
- `run_action_before_call_starts` (boolean, optional, deprecated) — Legacy alias of run_action_before_call_start.

### ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesValuesItems

- `name` (string, optional)
- `type` (enum, optional)
  - Allowed values: `string`, `integer`, `number`, `boolean`
- `description` (string, optional)
- `example` (ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesValuesItemsExample, optional)

### ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesAssistantsItems

- `model_id` (string, optional)
- `attachment_type` (enum, optional)
  - Allowed values: `before`, `during`, `after`
- `input_variables_mapping` (list of ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesAssistantsItemsInputVariablesMappingItems, optional) — Source of each input variable for this agent. `source_key` is not returned.

### LiveTransferBackgroundMusic

Hold music the caller hears while a warm transfer is being set up.

- `active` (boolean, optional) — Turns hold music on or off. Can be true only in a warm transfer mode. Required when you send `type` and the action has no stored value yet.
- `type` (enum, optional) — Music track. Required when `active` is true.
  - Allowed values: `ambient-background`, `inspirational-symphony-classical-music`, `modern-jazz`

### LiveTransferSipHeader

Custom SIP header sent with a transfer to a SIP URI.

- `name` (string, required) — Header name. Must start with `X-` and contain only letters, digits, hyphen and underscore. Reserved names are rejected.
- `value` (string, required) — Header value, or the extraction prompt when `mode` is `prompt`. Cannot be empty. In `default` mode it cannot contain CR, LF or NULL characters and may use variables such as `{customer_id}`.
- `mode` (enum, optional, default: default) — Use `default` to send the value as written, or `prompt` to have the agent extract the value from the conversation.
  - Allowed values: `default`, `prompt`

### ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsParametersHardCodedApiResponse

Example of the body the custom action's API returns. `null` when no example is stored or when the last `Initialize` run in the dashboard failed. After a successful `Initialize` in the dashboard, it holds the body that run returned.

- map from string to any
- list of any

### ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesValuesItemsExample

- string
- double
- boolean

### ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesAssistantsItemsInputVariablesMappingItems

- `variable_name` (string, optional)
- `source` (enum, optional)
  - Allowed values: `hardcoded`, `llm`, `system_vars`, `prompt_variables`, `fsm_variables`, `action_results`
- `hardcoded_value` (string, optional)
- `llm_config` (ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesAssistantsItemsInputVariablesMappingItemsLlmConfig, optional)

### ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesAssistantsItemsInputVariablesMappingItemsLlmConfig

- `description` (string, optional) — Description of the variable.
- `example` (string, optional) — Example of the variable.
- `required` (boolean, optional) — Whether the variable is required.

## Examples

**Response**

```json
{
  "status": "ok",
  "response": {
    "actions": [
      {
        "action_id": "1725911493083x249395485329627420",
        "action_type": "SEND_SMS",
        "name": "send_sms",
        "description": "If the user has confirmed interest in scheduling a demo meeting",
        "assistants": [
          "8d389276-9e87-42bf-a84f-d7e257cebc70",
          "082e0a19-0f16-4c01-b1c8-3ab21233f3bd"
        ],
        "input_variables": {
          "values": [
            {
              "name": "lead_email",
              "type": "string",
              "description": "Lead email to use in the action.",
              "example": "lead@example.com"
            }
          ],
          "assistants": [
            {
              "model_id": "73396cf4-fe75-4192-b186-c4cff6a4e358",
              "attachment_type": "during",
              "input_variables_mapping": [
                {
                  "variable_name": "lead_email",
                  "source": "llm"
                }
              ]
            }
          ]
        },
        "parameters_hard_coded": {
          "sms_message_text": "Hello!"
        }
      }
    ]
  }
}
```

**SDK Code**

```python get-action_example
import requests

url = "https://api.synthflow.ai/v2/actions/action_id"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```go get-action_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.synthflow.ai/v2/actions/action_id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby get-action_example
require 'uri'
require 'net/http'

url = URI("https://api.synthflow.ai/v2/actions/action_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java get-action_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.synthflow.ai/v2/actions/action_id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```csharp get-action_example
using RestSharp;

var client = new RestClient("https://api.synthflow.ai/v2/actions/action_id");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift get-action_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.synthflow.ai/v2/actions/action_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```