# Move agent tests and folders

Move between 1 and 100 Agent Testing resources or folders to one destination folder in a single operation.

## Endpoint

`POST /api/v1/workspaces/{workspace_id}/agent-tests/bulk-move`

## Authentication

| Class | Authentication | Minimum role | API key |
| --- | --- | --- | --- |
| customer-api | Bearer API key or dashboard session cookie; dashboard mutations also require X-CX-Request: 1. | member | Allowed |

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspace_id` | path | `string` | Yes | — |

## Request body

### application/json request schema

| Field path | Type | Reference | Format | Nullable | Required | Enum | Description |
| --- | --- | --- | --- | --- | --- | --- | --- |
| `$` | `object` | BulkMoveBody | — | No | Yes | — | — |
| `entity_ids` | `array<string>` | — | — | No | Yes | — | — |
| `entity_ids[]` | `string` | — | — | No | Yes | — | — |
| `move_to` | `string or null` | — | — | Yes | No | — | — |

## Example

```bash
curl --request POST 'https://operade.ai/api/v1/workspaces/ws_demo/agent-tests/bulk-move' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"entity_ids":["test_demo"],"move_to":"testfld_support"}'
```

## Responses

| Status | Description | Content |
| --- | --- | --- |
| 4XX | Handled client error | application/json: `ErrorResponse` |
| 200 | Successful Response | application/json: `MoveResponse` |

### 4XX application/json response schema

| Field path | Type | Reference | Format | Nullable | Required | Enum | Description |
| --- | --- | --- | --- | --- | --- | --- | --- |
| `$` | `object` | ErrorResponse | — | No | Yes | — | — |
| `error` | `object` | ErrorItem | — | No | Yes | — | — |
| `error.code` | `string` | — | — | No | Yes | — | — |
| `error.details` | `object` | — | — | No | No | — | — |
| `error.message` | `string` | — | — | No | Yes | — | — |

### 200 application/json response schema

| Field path | Type | Reference | Format | Nullable | Required | Enum | Description |
| --- | --- | --- | --- | --- | --- | --- | --- |
| `$` | `object` | MoveResponse | — | No | Yes | — | — |
| `moved` | `integer` | — | — | No | Yes | — | — |

### Response example

```json
{
  "moved": 0
}
```

## Errors

Reviewed common and route-declared errors are summarized here; the list is not exhaustive. Start with the [distributed error index](/docs/reference/api/errors) to find each code's canonical domain page.

| Status | Code | Description |
| --- | --- | --- |
| 401 | `unauthenticated` | Authentication is missing, invalid, or revoked. |
| 403 | `forbidden` | The authenticated caller does not have access to this operation. |
| 404 | `not_found` | The requested workspace resource was not found. |
| 422 | `validation_failed` | The request did not pass field or business validation. |

## Related operations

- [Create an agent test](/docs/api-reference/agent-tests/create-agent-test) — `POST /api/v1/workspaces/{workspace_id}/agent-tests`
- [Delete an agent test](/docs/api-reference/agent-tests/delete-agent-test) — `DELETE /api/v1/workspaces/{workspace_id}/agent-tests/{test_id}`
- [Get an agent test](/docs/api-reference/agent-tests/get-agent-test) — `GET /api/v1/workspaces/{workspace_id}/agent-tests/{test_id}`
