For clean Markdown of any page, append .md to the page URL. For a complete documentation index, see https://docs.synthflow.ai/api-reference/platform-api/actions/llms.txt. For full documentation content, see https://docs.synthflow.ai/api-reference/platform-api/actions/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: 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
  - url: https://api.us.synthflow.ai/v2
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
    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.
        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

```

## SDK Code Examples

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