> 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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Synthflow APIs
  version: 1.0.0
paths:
  /actions/{action_id}:
    get:
      operationId: get-action
      summary: Get an action
      description: Retrieves metadata about an action.
      tags:
        - ''
      parameters:
        - name: action_id
          in: path
          description: To find an action's ID, go to its page in your Synthflow dashboard.
          required: true
          schema:
            type: string
        - name: include_assistants
          in: query
          description: Include assistant IDs assigned to this action.
          required: false
          schema:
            type: boolean
            default: false
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-action_Response_200'
        '400':
          description: '400'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Get-actionRequestBadRequestError'
servers:
  - url: https://api.synthflow.ai/v2
    description: Global
  - url: https://api.us.synthflow.ai/v2
    description: United States
  - url: https://api.eu.synthflow.ai/v2
    description: European Union
components:
  schemas:
    ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsActionType:
      type: string
      enum:
        - REAL_TIME_BOOKING
        - INFORMATION_EXTRACTOR
        - LIVE_TRANSFER
        - SEND_SMS
        - INCALL_SMS
        - INCALL_WHATSAPP
        - CUSTOM_ACTION
        - CUSTOM_EVAL
      description: Action type.
      title: >-
        ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsActionType
    ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesValuesItemsType:
      type: string
      enum:
        - string
        - integer
        - number
        - boolean
      title: >-
        ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesValuesItemsType
    ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesValuesItemsExample:
      oneOf:
        - type: string
        - type: number
          format: double
        - type: boolean
      title: >-
        ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesValuesItemsExample
    ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesValuesItems:
      type: object
      properties:
        name:
          type: string
        type:
          $ref: >-
            #/components/schemas/ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesValuesItemsType
        description:
          type: string
        example:
          $ref: >-
            #/components/schemas/ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesValuesItemsExample
      title: >-
        ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesValuesItems
    ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesAssistantsItemsAttachmentType:
      type: string
      enum:
        - before
        - during
        - after
      title: >-
        ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesAssistantsItemsAttachmentType
    ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesAssistantsItemsInputVariablesMappingItemsSource:
      type: string
      enum:
        - hardcoded
        - llm
        - system_vars
        - prompt_variables
        - fsm_variables
        - action_results
      title: >-
        ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesAssistantsItemsInputVariablesMappingItemsSource
    ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesAssistantsItemsInputVariablesMappingItemsLlmConfig:
      type: object
      properties:
        description:
          type: string
          description: Description of the variable.
        example:
          type: string
          description: Example of the variable.
        required:
          type: boolean
          description: Whether the variable is required.
      title: >-
        ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesAssistantsItemsInputVariablesMappingItemsLlmConfig
    ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesAssistantsItemsInputVariablesMappingItems:
      type: object
      properties:
        variable_name:
          type: string
        source:
          $ref: >-
            #/components/schemas/ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesAssistantsItemsInputVariablesMappingItemsSource
        hardcoded_value:
          type: string
        llm_config:
          $ref: >-
            #/components/schemas/ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesAssistantsItemsInputVariablesMappingItemsLlmConfig
      title: >-
        ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesAssistantsItemsInputVariablesMappingItems
    ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesAssistantsItems:
      type: object
      properties:
        model_id:
          type: string
        attachment_type:
          $ref: >-
            #/components/schemas/ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesAssistantsItemsAttachmentType
        input_variables_mapping:
          type: array
          items:
            $ref: >-
              #/components/schemas/ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesAssistantsItemsInputVariablesMappingItems
      title: >-
        ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesAssistantsItems
    ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariables:
      type: object
      properties:
        values:
          type: array
          items:
            $ref: >-
              #/components/schemas/ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesValuesItems
          description: Variables that the action expects as runtime input.
        assistants:
          type: array
          items:
            $ref: >-
              #/components/schemas/ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariablesAssistantsItems
          description: >-
            Assistants attached to this action, including per-assistant input
            variable mappings.
      description: >-
        Input variable details for this action, including variable definitions
        and attached assistant IDs.
      title: >-
        ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariables
    ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsParametersHardCoded:
      type: object
      properties:
        sms_message_text:
          type: string
      title: >-
        ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsParametersHardCoded
    ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItems:
      type: object
      properties:
        action_id:
          type: string
          description: Action ID.
        action_type:
          $ref: >-
            #/components/schemas/ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsActionType
          description: Action type.
        name:
          type: string
          description: Action name.
        description:
          type: string
          description: Action description.
        assistants:
          type: array
          items:
            type: string
          description: >-
            Assistant IDs assigned to this action. Returned when
            `include_assistants=true`.
        input_variables:
          $ref: >-
            #/components/schemas/ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsInputVariables
          description: >-
            Input variable details for this action, including variable
            definitions and attached assistant IDs.
        parameters_hard_coded:
          $ref: >-
            #/components/schemas/ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItemsParametersHardCoded
      title: >-
        ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItems
    ActionsActionIdGetResponsesContentApplicationJsonSchemaResponse:
      type: object
      properties:
        actions:
          type: array
          items:
            $ref: >-
              #/components/schemas/ActionsActionIdGetResponsesContentApplicationJsonSchemaResponseActionsItems
      title: ActionsActionIdGetResponsesContentApplicationJsonSchemaResponse
    get-action_Response_200:
      type: object
      properties:
        status:
          type: string
        response:
          $ref: >-
            #/components/schemas/ActionsActionIdGetResponsesContentApplicationJsonSchemaResponse
      title: get-action_Response_200
    Get-actionRequestBadRequestError:
      type: object
      properties: {}
      title: Get-actionRequestBadRequestError
  securitySchemes:
    sec0:
      type: http
      scheme: bearer

```

## 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()
```