Skip to Content
HelvetlyDocs
API referenceDocuments

Rename or move a document folder

Needs a token with the write:documents scope. Authentication

Try in Playground sends a real request to app.helvetly.com with a token you paste. It stays in this browser tab only (session storage) and goes to no one else.

PATCH
/api/v1/documents/folders/{id}

Renames and/or moves a folder (parent_id null is the top level). 409 name_taken when a sibling has the name, 422 validation_failed when the folder would move into itself or one of its subfolders. Deleting a folder is done with bulk_documents (action trash).

Authorization

bearerAuth
headerAuthorizationBearer <token>

A personal API token, hvt_…, with scopes such as read:* or write:invoices

Path Parameters

id*string

The folder's id.

Request Body

application/json
  1. body
name?string
Length1 <= length <= 255
parent_id?|

Move into this folder; null moves it to the top level. A folder cannot move into itself or its own subfolders (422).

Response Body

OK

application/json
  1. response
data*
Example Request
curl -X PATCH 'https://app.helvetly.com/api/v1/documents/folders/string' \  -H 'Content-Type: application/json' \  -d '{  "name": "Contracts",  "parent_id": null}'
Example Response
{  "data": {    "id": "string",    "name": "string",    "parent_id": "string",    "file_count": 0,    "size": 0,    "total_files": 0,    "total_size": 0,    "created_by": {      "id": "string",      "name": "string"    },    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z",    "starred": true  }}