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

# GET /v1/agents/{id}/actions

> What the actions of a case or step can point to.

A case or a step carries `actions`: a list of strings, each one a function name or an id, for example `["get_appointment_availability", "create_appointment"]`. An action is what gives the agent the tool: a case that points to `create_appointment` is what lets the agent book. This endpoint lists every valid string, grouped by what it is, so you can fill them without guessing. You send only the string; the API works out what it is.

## Endpoint

```
GET https://api.keebai.com/v1/agents/{id}/actions
```

## Required scope

`agents:read`

## Path parameters

| Parameter | Type | Description |
| - | - | - |
| `id` | `string` | `ObjectId` of the agent. |

## Example request

```bash curl theme={"system"}
curl https://api.keebai.com/v1/agents/6650a1b2c3d4e5f6a7b8c9d0/actions \
  -H "Authorization: Bearer kbai_pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
```

## Response

### 200 OK

```json theme={"system"}
{
  "native": [
    { "target": "get_appointment_availability", "group": "scheduling", "description": "..." },
    { "target": "create_appointment", "group": "scheduling", "description": "..." }
  ],
  "catalog": [
    { "target": "services", "name": "Servicios" }
  ],
  "tool": [
    { "target": "6650b0c1d2e3f4a5b6c7d8e9", "name": "CRM externo", "description": "..." }
  ],
  "move_stage": [
    { "target": "6650c1d2e3f4a5b6c7d8e9f0", "name": "Inicial", "pipeline": "Ventas", "is_human_stage": false, "stage_type": "normal" },
    { "target": "6650c1d2e3f4a5b6c7d8e9f1", "name": "Atención manual", "pipeline": "Ventas", "is_human_stage": true, "stage_type": "normal" }
  ],
  "tag": [
    { "target": "6650d2e3f4a5b6c7d8e9f0a1", "name": "Cliente frecuente" }
  ],
  "send_file": [
    { "target": "6650e3f4a5b6c7d8e9f0a1b2", "name": "Lista de precios 2026", "mime_type": "application/pdf" }
  ]
}
```

| Group | What `target` is |
| - | - |
| `native` | A platform function the company has. Functions of an app or channel the company does not have are left out. |
| `catalog` | The type of one of the company's active catalogs. |
| `tool` | The id of an active [webhook tool](https://docs.keebai.com/dev/endpoints/tools-list.md). |
| `move_stage` | The id of a stage in a pipeline tied to this agent. A stage with `is_human_stage: true` hands the conversation to a person. |
| `tag` | The id of a CRM tag the agent can apply. |
| `send_file` | The id of a file in the company's vault that the agent can send. |

### 401 Unauthorized

Missing, invalid, revoked, or expired token.

### 403 Forbidden

The token does not have the `agents:read` scope.

### 404 Not Found

No agent with that id in the token's company and project.

### 502 Bad Gateway

The agent service or the CRM is unreachable.

## Operational notes

* **Put these targets as they are in the `actions` of [a section](https://docs.keebai.com/dev/endpoints/agents-prompt-set.md)** or of a route. A string that is not in this list returns 400 `UNKNOWN_ACTION_TARGET`; one that appears in two groups returns 400 `AMBIGUOUS_ACTION_TARGET`.
* **An agent being created has no stages yet.** Its pipeline is created with it, so `move_stage` targets go in once the agent exists.
* **Removing the last action that points to a function takes that tool away from the agent.** Omitting `actions` on a case keeps the ones it had.


## OpenAPI

````yaml GET /v1/agents/{id}/actions
openapi: 3.0.0
info:
  title: Keebai Public API
  description: Superficie pública REST autenticada con Personal Access Tokens (PAT).
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.keebai.com
    description: Production
security: []
tags: []
paths:
  /v1/agents/{id}/actions:
    get:
      tags:
        - agents
      summary: Listar a que puede apuntar una accion del agente
      description: >-
        Los `target` validos para las `actions` de un caso o un paso, agrupados
        por `kind`: funciones nativas que la empresa tiene, catalogos,
        herramientas webhook activas y las etapas de los embudos ligados al
        agente. Una accion es lo que monta la tool en el agente.
      operationId: PublicAgentsController_listActions
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicAgentActionsResponseDto'
      security:
        - PAT: []
components:
  schemas:
    PublicAgentActionsResponseDto:
      type: object
      properties:
        native:
          type: array
          items:
            $ref: '#/components/schemas/PublicNativeActionDto'
        catalog:
          type: array
          items:
            $ref: '#/components/schemas/PublicCatalogActionDto'
        tool:
          type: array
          items:
            $ref: '#/components/schemas/PublicToolActionDto'
        move_stage:
          type: array
          items:
            $ref: '#/components/schemas/PublicStageActionDto'
        tag:
          type: array
          items:
            $ref: '#/components/schemas/PublicTagActionDto'
        send_file:
          type: array
          items:
            $ref: '#/components/schemas/PublicFileActionDto'
      required:
        - native
        - catalog
        - tool
        - move_stage
        - tag
        - send_file
    PublicNativeActionDto:
      type: object
      properties:
        target:
          type: string
          example: create_appointment
        group:
          type: string
          example: scheduling
        description:
          type: string
      required:
        - target
        - group
        - description
    PublicCatalogActionDto:
      type: object
      properties:
        target:
          type: string
          example: services
        name:
          type: string
          example: Servicios
      required:
        - target
        - name
    PublicToolActionDto:
      type: object
      properties:
        target:
          type: string
          description: Id de la herramienta webhook.
        name:
          type: string
        description:
          type: string
      required:
        - target
        - name
        - description
    PublicStageActionDto:
      type: object
      properties:
        target:
          type: string
          description: Id de la etapa.
        name:
          type: string
          example: Atencion manual
        pipeline:
          type: string
          description: Nombre del embudo de la etapa.
        is_human_stage:
          type: boolean
          description: Una etapa humana es la que deriva la conversacion a una persona.
        stage_type:
          type: string
          example: normal
      required:
        - target
        - name
        - pipeline
        - is_human_stage
        - stage_type
    PublicTagActionDto:
      type: object
      properties:
        target:
          type: string
          description: Id de la etiqueta.
        name:
          type: string
          example: Cliente frecuente
      required:
        - target
        - name
    PublicFileActionDto:
      type: object
      properties:
        target:
          type: string
          description: Id del archivo en la boveda.
        name:
          type: string
          example: Lista de precios 2026
        mime_type:
          type: string
          example: application/pdf
      required:
        - target
        - name
        - mime_type
  securitySchemes:
    PAT:
      scheme: bearer
      bearerFormat: kbai_pk_<hex>
      type: http
      description: >-
        Personal Access Token con prefijo `kbai_pk_`. Generar desde el portal
        con permiso `developer.manage_tokens`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.