Skip to content

Move components to a folder

POST
/content/management/v1/components/move
curl --request POST \
--url https://api.ebitex.io/content/management/v1/components/move \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "componentIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "folderId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

Moves up to 200 components into the folder folderId, or to the top level when it is omitted or null. Send { "componentIds": ["…"], "folderId": "…" }.

Each component goes through the same checks as an update that changes only the folder: the key needs edit on the component’s folder and on the target, the target must allow the component’s contract, a workflow must leave it editable, and a component owned by a realm above the key’s own is read-only. A move is not all-or-nothing: the answer lists what moved and, for each component that did not, the code an update would have returned. Moving records a new version of the component, as any change to its folder does.

Key: a management key with content.management.authoring.

Media typeapplication/json
object
componentIds
required
Array<string>
folderId
required
null | string format: uuid
Examplegenerated
{
"componentIds": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
],
"folderId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

{ "moved": ["…"], "skipped": [ { "id": "…", "error": "folder_contract_constraint_violation", "message": "…" } ] }. A skipped error is one of already_there, not_found, access_denied, folder_contract_constraint_violation, inherited_read_only, workflow_state_not_editable or conflict.

invalid_request: componentIds is empty or has more than 200 ids.

missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired.

payment_required: the organization’s subscription needs attention.

scope_denied: the key lacks this route’s scope. tier_required: the Content Management API needs the Pro plan or above. ip_denied: the caller’s address is outside the key’s allowed ranges. app_not_available: Content is not enabled for the organization.

Rate limit or quota exceeded; Retry-After says how long to wait. too_many_failed_authentications: too many bad keys from this address.