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

# List Actions for an Agent

> List for actions for an agent

List for actions for an agent

```http theme={null}
GET https://services.leadconnectorhq.com/conversation-ai/agents/{agentId}/actions/list
```

## Autorización

<ParamField header="Authorization" type="string" required>
  Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
</ParamField>

<ParamField header="Version" type="string" required default="2021-07-28">
  Versión de la API.
</ParamField>

## Path parameters

<ParamField path="agentId" type="string" required />

## Respuestas

<Accordion title="200 - Success">
  <ResponseField name="data" type="object[]" required>
    Grouped actions by type

    <Expandable title="cada item">
      <ResponseField name="id" type="string" required default="actionId123">
        Unique identifier for the action
      </ResponseField>

      <ResponseField name="name" type="string" required default="Trigger Workflow">
        Name of the action
      </ResponseField>

      <ResponseField name="type" type="string" required default="triggerWorkflow">
        Type of the action Posibles valores: 'triggerWorkflow', 'updateContactField', 'appointmentBooking', 'stopBot', 'humanHandOver', 'advancedFollowup', 'transferBot'
      </ResponseField>

      <ResponseField name="agentId" type="string" default="agentId123">
        Agent ID where the action belongs
      </ResponseField>

      <ResponseField name="details" type="object" required>
        Action-specific details. The structure depends on the action type. For TRIGGER\_WORKFLOW use triggerWorkflowDto, for UPDATE\_CONTACT\_FIELD use updateContactFieldDto, for APPOINTMENT\_BOOKING use appointmentBookingDto, for STOP\_BOT use stopBotDto, for HUMAN\_HAND\_OVER use humanHandOverDto, for ADVANCED\_FOLLOWUP use advancedFollowupDto, and for TRANSFER\_BOT use transferBotDto.
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="success" type="boolean" required default="True">
    Success status of the request
  </ResponseField>

  ```json theme={null}
  {
    "data": [
      {
        "id": "actionId123",
        "name": "Trigger Workflow",
        "type": "triggerWorkflow",
        "agentId": "agentId123"
      }
    ],
    "success": true
  }
  ```
</Accordion>

<Accordion title="400 - Bad Request">
  ```json theme={null}
  {}
  ```
</Accordion>

<Accordion title="401 - Unauthorized">
  ```json theme={null}
  {}
  ```
</Accordion>

<Accordion title="422 - Unprocessable Entity">
  ```json theme={null}
  {}
  ```
</Accordion>

## Ejemplo

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET 'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/actions/list' \
    -H 'Authorization: Bearer YOUR_TOKEN' \
    -H 'Version: 2021-07-28'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/actions/list', {
    method: 'GET',
    headers: {
      Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
      Version: '2021-07-28',
    },
  });
  const data = await response.json();
  ```

  ```python Python theme={null}
  import os, requests
  response = requests.request(
      'GET',
      'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/actions/list',
      headers={
          'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
          'Version': '2021-07-28',
      },
  )
  data = response.json()
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init('https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/actions/list');
  curl_setopt_array($ch, [
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_CUSTOMREQUEST => 'GET',
      CURLOPT_HTTPHEADER => [
          'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
          'Version: 2021-07-28',
      ],
  ]);
  $data = json_decode(curl_exec($ch), true);
  ```
</CodeGroup>
