---
title: "Reorder agent actions"
method: PATCH
path: "/orgs/agents/{agent_id}/actions/reorder"
tags: ["Agents"]
---

# Reorder agent actions

`PATCH /orgs/agents/{agent_id}/actions/reorder`

## Request

- Base URL: `https://api.useinvent.com`
- URL: `https://api.useinvent.com/orgs/agents/{agent_id}/actions/reorder`
- Auth: HTTP bearer

Reorder the actions of a specific agent.

## Path parameters

- `agent_id` string, required

## Query parameters

- `page` number
- `take` number
- `next` string
- `progressive` boolean

## Request body

- ReorderAgentActionsSchema: Schema for reordering agent actions
  - `positions` object[], required: New explicit position for each action being reordered
    - `id` string, required
    - `position` integer, required

## Response `200`

The reordered agent actions.

- AgentActionSchema[]
  - `id` string, required: The ID of the action
  - `enabled` boolean, required: Whether the action is enabled
  - `name` string, nullable, required: The name of the action
  - `instructions` string, nullable, required: The instructions for the action
  - `action_id` string, required: The ID of the action, e.g. "TOOLS:HTTP_REQUEST", or a "TYPE:*" wildcard covering every action of the app
  - `agent_id` string, required: The ID of the agent
  - `connection_id` string, nullable, required: The ID of the connection to use for the action if required
  - `config` InputValuesWithDefinitionsSchema, required: The input values with their dynamic field definitions
    - `input` object, required: Values of the fields
    - `definitions` DynamicFieldsSchema[]
      - `path` string, required
      - `definition` FieldsSchema, required: The definition of the field schemas
  - `approval_mode` 'auto' | 'ask' | 'never', nullable, required: When the agent must ask for approval before running the action. Null inherits the run default.
  - `position` integer, required: The position of the action within its group. Bucketed in multiples of 100, e.g. 100, 101, 102 for the first group, 200, 201, 202 for the second
  - `created_at` string, date-time, nullable, required
  - `updated_at` string, date-time, nullable, required

---

[API](https://skmtc.dev/useinvent/apis/invent-api.md) · [All operations](https://skmtc.dev/useinvent/apis/invent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/useinvent/apis/invent-api/revisions/98824f3fde82?raw)
