Skip to content

Rename or move a folder

PUT
/content/management/v1/folders/{id}
curl --request PUT \
--url https://api.ebitex.io/content/management/v1/folders/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "parentFolderId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

Sets a folder’s name and parentFolderId. This is a full replace: omitting parentFolderId moves the folder to the top level. A folder cannot be moved into itself or one of its own descendants.

The key needs edit on the folder, and on the new parent when moving it. Moving a folder changes which access rules and allowed contracts its contents inherit. Folders inherited from another environment are read-only here.

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

id
required
string format: uuid
Media typeapplication/json
object
name
required
string
parentFolderId
required
null | string format: uuid
Examplegenerated
{
"name": "example",
"parentFolderId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

OK

cycle: the new parent is the folder itself or one of its descendants.

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.

access_denied: the key’s role may not edit the folder or the new parent.

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.

No folder has this id in the key’s environment, it is in a branch the key’s role cannot view, or parentFolderId names no folder.

inherited_read_only: the folder is inherited from another environment (sourceEnvironmentId); change it there.

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