How to set Collaborators expiry date using API call

New post



  • tony-at-box



    At this time, we don't allow modification of the expires_at parameter of collaborations through the API.



    Depending on your use-case, you may be able to get away with leveraging shared links on the folder rather than collaborations and you can set the "unshared_at" date to automatically unshare the link on a certain date. You can add a shared link with expiration to a folder using a call similar to the below:


    PUT /folders/folder_ID
    -H Authorization Bearer [TOKEN]
    -d {"shared_link": {"unshared_at": "DATE"}}


    ^ returns the shared link along with additional information about it []



    Alternatively, you could put logic into your application to maintain the collaborations by adding and removing them with calls on specific dates - but at this time, you cannot set the expires_at parameter using the API.



    Hopefully that helps!


    Comment actions Permalink
  • lubomiov

    I am too looking at changing the expires_at using the API. This answer seems to be from over an year ago, and wonder if something changed. 


    Looking at the API documentation, there is an expires_at property when updating a collaboration -


    I tried to use it, but the server consistently returns 500: Internal Server Error Also, if I use it on its own, I get a validation error that a "role" is required.


    Comment actions Permalink
  • Murtza

     Sorry for the confusion. There was an error in our documentation. The expires_at property can not be set from the API. As you mentioned, the role parameter is required. I updated the documentation to reflect the correct information for both of these things.

    Comment actions Permalink

Please sign in to leave a comment.