To change the owner of a folder, first invite the user you wish to
transfer the folder to as a collaborator on the folder.
cURL
Node/TypeScript v10
Python v10
.NET v10
Swift v10
Java v10
Java v5
Python v4
.NET v6
Node v4
curl -i -X POST "https://api.box.com/2.0/collaborations" \
-H "authorization: Bearer <ACCESS_TOKEN>" \
-H "content-type: application/json" \
-d '{
"item": {
"type": "file",
"id": "11446498"
},
"accessible_by": {
"type": "user",
"login": "[email protected] "
},
"role": "editor"
}'
Then, update the created collaboration by changing the role of
that invited user to owner.
curl -X PUT https://api.box.com/2.0/collaborations/1234 \
-H "authorization: Bearer <ACCESS_TOKEN>" \
-H "content-type: application/json" \
-d '{
"role": "owner"
}'
Depending on the settings, a user with access to a folder might be able to
invite other users, yet in all cases only the current owner of a folder can
transfer the ownership.