Skip to content
StudyFetch API

Folders

Update folder

OpenAPI specification
PATCH/api/v1/folders/{id}

Authentication

x-api-key

Request

curl --globoff --request PATCH \
  --url 'https://api.example.com/api/v1/folders/%3Cid%3E' \
  --header 'x-api-key: <API_KEY>' \
  --header 'Content-Type: application/json' \
  --data-raw '{}'

Replace credential and <field> placeholders with your own values. URL placeholders appear as %3Cfield%3E. Review the example values before sending your request.

Replace https://api.example.com with the API server URL.

Use the sample JSON body as your starting point, and enter values that match the endpoint's schema.

Parameters

idpath · string · required

Folder ID

Request body schema or example

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "New folder name"
    },
    "parentFolderId": {
      "type": "string",
      "description": "New parent folder ID"
    },
    "description": {
      "type": "string",
      "description": "New folder description"
    },
    "metadata": {
      "type": "object",
      "description": "Updated metadata"
    }
  }
}

Responses

200Folder updated successfully
{
  "type": "object",
  "properties": {
    "_id": {
      "type": "string",
      "description": "Folder ID"
    },
    "name": {
      "type": "string",
      "description": "Folder name"
    },
    "organizationId": {
      "type": "string",
      "description": "Organization ID"
    },
    "parentFolderId": {
      "type": "string",
      "description": "Parent folder ID",
      "nullable": true
    },
    "description": {
      "type": "string",
      "description": "Folder description"
    },
    "status": {
      "type": "string",
      "description": "Folder status",
      "enum": [
        "active",
        "deleted"
      ]
    },
    "metadata": {
      "description": "Folder metadata",
      "allOf": [
        {
          "type": "object",
          "properties": {
            "color": {
              "type": "string",
              "description": "Folder color"
            },
            "icon": {
              "type": "string",
              "description": "Folder icon"
            },
            "materialCount": {
              "type": "number",
              "description": "Number of materials in folder"
            },
            "totalSize": {
              "type": "number",
              "description": "Total size of materials in folder"
            },
            "lastActivity": {
              "format": "date-time",
              "type": "string",
              "description": "Last activity date"
            }
          }
        }
      ]
    },
    "createdAt": {
      "format": "date-time",
      "type": "string",
      "description": "Creation date"
    },
    "updatedAt": {
      "format": "date-time",
      "type": "string",
      "description": "Last update date"
    }
  },
  "required": [
    "_id",
    "name",
    "organizationId",
    "status",
    "createdAt",
    "updatedAt"
  ]
}