---
title: "Move Agent To Folder"
method: PUT
path: "/v1/folders/move-agent"
tags: ["Folders"]
---

# Move Agent To Folder

`PUT /v1/folders/move-agent`

Move an agent to a folder or disassociate it from any folder.

- If folder_id is provided: Associates the agent with that folder
- If folder_id is null: Disassociates the agent from any folder

Both the agent and folder (if provided) must belong to the user's organization.

## Headers

- `X-API-Key` string, required

## Request body

- MoveAgentRequest
  - `agent_id` integer, required — ID of the agent to move
  - `folder_id` string, uuid, nullable — ID of the target folder (null to disassociate from any folder)

## Response `200`

Successful Response

- MoveAgentResponse
  - `agent_id` integer, required — ID of the agent
  - `folder_id` string, uuid, nullable — ID of the folder (null if disassociated)
  - `status` string — Status of the operation

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/getbluejay/apis/bluejay-api.md) · [All operations](https://skmtc.net/getbluejay/apis/bluejay-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getbluejay/bluejay-api/revisions/4ef94eeb836d/schema)
