API documentation
    API documentation
    • Back to home
    • File
    • List
      GET
    • Detail
      GET
    • Upload
      PUT
    • Update
      PUT
    • Download
      GET
    • Delete
      DELETE
    • Public Download
      GET
    • Share file with user
      PUT

      Update

      PUT
      https://api.everabyte.io/api/files/update/b5h86j5dkl7m0rnylnkt3kfh
      This endpoint is used to update the metadata of a specific file, including its name, visibility settings, and retention time.
      Endpoint: /files/update/{fileId}
      Method: PUT
      Path Parameters:
      fileId (required): The ID of the file to be updated. Example: b5h86j5dkl7m0rnylnkt3kfh
      Request Body Parameters:
      {
        "name": "Doc NDA",
        "visibility": "private",
        "retentionPeriod": "90d"
      }
      name (required, string): The new name of the file.
      visibility (required, string): Indicates whether the file is private or public.
      retentionPeriod (optional, string): Specifies the duration for which the file should be retained. Allowed values are:
      Days: 30d, 45d, 90d, 120d, 180d
      Years: 1Y, 2Y, 3Y, 5Y
      Example Request (Updating name and visibility to private):
      PUT /files/update/b5h86j5dkl7m0rnylnkt3kfh
      Content-Type: application/json
      
      {
        "name": "Updated NDA Document",
        "visibility": "private"
      }
      This request updates the file with ID b5h86j5dkl7m0rnylnkt3kfh. The file's name is changed to "Updated NDA Document", and its visibility is set to "private".
      Example Request (Updating retention period):
      PUT /files/update/b5h86j5dkl7m0rnylnkt3kfh
      Content-Type: application/json
      
      {
        "retentionPeriod": "1Y"
      }
      This request updates the file with ID b5h86j5dkl7m0rnylnkt3kfh, setting its retention period to 1 year.
      Response Codes:
      200 OK: File metadata successfully updated.
      400 Bad Request: Invalid request parameters or body (e.g., invalid visibility value, invalid retentionPeriod format or value).
      404 Not Found: File not found.
      500 Internal Server Error: Server error.

      Request

      Authorization
      Provide your bearer token in the
      Authorization
      header when making requests to protected resources.
      Example:
      Authorization: Bearer ********************
      Body Params application/json

      Example
      {
          "name": "Dr. Cory Quigley",
          "visibility": "private"
      }

      Request Code Samples

      Shell
      JavaScript
      Java
      Swift
      Go
      PHP
      Python
      HTTP
      C
      C#
      Objective-C
      Ruby
      OCaml
      Dart
      R
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location --request PUT 'https://api.everabyte.io/api/files/update/b5h86j5dkl7m0rnylnkt3kfh' \
      --header 'Authorization: Bearer <token>' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "name": "Dr. Cory Quigley",
          "visibility": "private"
      }'

      Responses

      🟢200Success
      application/json
      Body

      Example
      {}
      Modified at 2025-08-05 00:32:56
      Previous
      Upload
      Next
      Download
      Built with