Welcome to the new Box Support website. Check out all the details here on what’s changed.

Cannot move, rename, files or foder 405 returned

Answered
New post

Comments

2 comments

  • Official comment
    Peter Christensen

    Hi Stéphane

    It looks to me like you are using the https://upload.box.com endpoint for your rename folder call. This endpoint is only for uploading files. For any other API actions such as update, rename or move you need to use https://api.box.com

    So it should work like this: 

    curl --location --request PUT 'https://api.box.com/api/2.0/folders/12858XXX9798' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer R3Tw4fOBrEPlGl3k7mxxx0Ty0yE41PeP' \
    --data-raw '{
    "name": "New folder name"
    }'

    Hope this helps

    Best regards, Peter Christensen, Platform Solutions Engineer

     

    Comment actions Permalink
  • Stéphane PIERRE

    Thanks Peter,
    it's my fault (a bad copy pasted!) the error was under my nose and yet I did not see it !!

    On the other hand it is also necessary to remove the "/ api /":

    "https://api.box.com/2.0/folders/"+folderId
    0
    Comment actions Permalink

Please sign in to leave a comment.