Rename or move a folder

View as Markdown

Renames and/or re-parents a folder. Rejects cycles (a folder into itself or a descendant) with 422. Requires file:write on the project.

Authentication

AuthorizationBearer

WorkOS session JWT or an organization API key, sent as Authorization: Bearer <token>.

Path parameters

projectIdstringRequired
folderIdstringRequired

Request

This endpoint expects an object.
namestringOptional1-200 characters
parentIdstring or nullOptional>=1 character

Response

The updated folder.
folderobject

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error