---
updatedAt: 2026-09-02T17:35:26.000Z
agentTools:
  projectIndex: https://docs.go.v7labs.com/llms.txt
---

# Update hub file

Update a hub file by ID

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "Common.APIErrorDetails": {
        "description": "Additional structured error context. Shape varies by error code.\n\n- For conflict errors: contains a `conflicts` array with conflicting resources\n- For other errors: may contain arbitrary error-specific context",
        "nullable": true,
        "oneOf": [
          {
            "$ref": "#/components/schemas/Common.ConflictErrorDetails"
          },
          {
            "additionalProperties": true,
            "description": "Generic error details for non-conflict errors",
            "type": "object",
            "x-struct": null,
            "x-validate": null
          }
        ],
        "title": "Common.APIErrorDetails",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Common.APIErrorDetails",
        "x-validate": null
      },
      "Hubs.Folder": {
        "additionalProperties": false,
        "description": "A hub folder row (`HubFolderChild` read model): appears in flat file lists and as a child under `FolderContentsFolder`.",
        "properties": {
          "created_at": {
            "$ref": "#/components/schemas/Common.DateTime"
          },
          "full_path": {
            "description": "Canonical full path (e.g. /a/b). For folders, equals path.",
            "nullable": false,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "hub_id": {
            "$ref": "#/components/schemas/Common.UUID"
          },
          "id": {
            "$ref": "#/components/schemas/Common.UUID"
          },
          "name": {
            "description": "Folder display name",
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "parent_id": {
            "$ref": "#/components/schemas/Common.NullableUUID"
          },
          "path": {
            "description": "Path from root (e.g. /a/b), including the folder name; derived from full_path",
            "nullable": false,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "type": {
            "enum": [
              "folder"
            ],
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "updated_at": {
            "$ref": "#/components/schemas/Common.DateTime"
          }
        },
        "required": [
          "id",
          "hub_id",
          "name",
          "path",
          "full_path",
          "type",
          "parent_id",
          "updated_at",
          "created_at"
        ],
        "title": "Hubs.Folder",
        "type": "object",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Hubs.Folder",
        "x-validate": null
      },
      "Common.ConflictErrorDetails": {
        "additionalProperties": false,
        "description": "Details for conflict errors",
        "properties": {
          "conflicts": {
            "description": "List of conflicting resources",
            "items": {
              "additionalProperties": true,
              "type": "object",
              "x-struct": null,
              "x-validate": null
            },
            "type": "array",
            "x-struct": null,
            "x-validate": null
          }
        },
        "required": [
          "conflicts"
        ],
        "title": "Common.ConflictErrorDetails",
        "type": "object",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Common.ConflictErrorDetails",
        "x-validate": null
      },
      "Hubs.FileNameConflict": {
        "additionalProperties": false,
        "description": "Details about a file name conflict. Returned when attempting to add files with duplicate names.",
        "properties": {
          "conflict_type": {
            "description": "Type of conflict: 'batch_duplicate' means the filename appears multiple times in the upload batch, 'existing_file' means a file with the same name already exists in the target folder, 'existing_folder' means a folder with the same name already exists in the target folder",
            "enum": [
              "batch_duplicate",
              "existing_file",
              "existing_folder"
            ],
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "filename": {
            "description": "The conflicting filename",
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "parent_id": {
            "$ref": "#/components/schemas/Common.NullableUUID"
          }
        },
        "required": [
          "parent_id",
          "filename",
          "conflict_type"
        ],
        "title": "Hubs.FileNameConflict",
        "type": "object",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Hubs.FileNameConflict",
        "x-validate": null
      },
      "Common.NullableUUID": {
        "example": "e23ff3f3-8f77-4e78-9e81-fdb25abfb781",
        "format": "uuid",
        "nullable": true,
        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
        "title": "Common.NullableUUID",
        "type": "string",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Common.NullableUUID",
        "x-validate": null
      },
      "Common.UUID": {
        "example": "e23ff3f3-8f77-4e78-9e81-fdb25abfb781",
        "format": "uuid",
        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
        "title": "Common.UUID",
        "type": "string",
        "x-struct": null,
        "x-validate": null
      },
      "Hubs.File": {
        "additionalProperties": false,
        "description": "Represents an item in a hub that is a file (not a folder)",
        "properties": {
          "created_at": {
            "$ref": "#/components/schemas/Common.DateTime"
          },
          "displayable_storage_key": {
            "$ref": "#/components/schemas/Common.NullableString"
          },
          "displayable_url": {
            "$ref": "#/components/schemas/Common.NullableURL"
          },
          "document_type": {
            "description": "Document classification for the hub file.",
            "enum": [
              "excel",
              "document",
              "invalid",
              "image",
              "text",
              "docx"
            ],
            "nullable": false,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "errored_fields": {
            "default": [],
            "description": "Hub file fields whose relevant facets are currently errored",
            "items": {
              "enum": [
                "content",
                "summary",
                "ocr",
                "displayable",
                "embeddings"
              ],
              "type": "string",
              "x-struct": null,
              "x-validate": null
            },
            "type": "array",
            "x-struct": null,
            "x-validate": null
          },
          "file_id": {
            "$ref": "#/components/schemas/Common.UUID"
          },
          "file_source_updated_at": {
            "$ref": "#/components/schemas/Common.NullableDateTime"
          },
          "file_status": {
            "description": "Status of the underlying file record (hub facet aggregate).",
            "enum": [
              "awaiting_confirmation",
              "processing",
              "ready",
              "error"
            ],
            "nullable": false,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "full_path": {
            "description": "Canonical full path (e.g. /a/b/file.pdf)",
            "nullable": false,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "hub_id": {
            "$ref": "#/components/schemas/Common.UUID"
          },
          "id": {
            "$ref": "#/components/schemas/Common.UUID"
          },
          "name": {
            "$ref": "#/components/schemas/Common.String"
          },
          "ocr_pages": {
            "default": [],
            "description": "OCR page metadata for grounding with bounding boxes",
            "items": {
              "$ref": "#/components/schemas/Projects.ListEntities.OCRPage"
            },
            "type": "array",
            "x-struct": null,
            "x-validate": null
          },
          "parent_id": {
            "$ref": "#/components/schemas/Common.NullableUUID"
          },
          "path": {
            "description": "Path from root (e.g. /a/b), excluding the file name; derived from full_path",
            "nullable": false,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "pdf_storage_key": {
            "$ref": "#/components/schemas/Common.NullableString"
          },
          "pdf_url": {
            "$ref": "#/components/schemas/Common.NullableURL"
          },
          "processing_fields": {
            "default": [],
            "description": "Hub file fields whose relevant facets are currently processing",
            "items": {
              "enum": [
                "content",
                "summary",
                "ocr",
                "displayable",
                "embeddings"
              ],
              "type": "string",
              "x-struct": null,
              "x-validate": null
            },
            "type": "array",
            "x-struct": null,
            "x-validate": null
          },
          "storage_key": {
            "$ref": "#/components/schemas/Common.String"
          },
          "summary": {
            "$ref": "#/components/schemas/Common.NullableString"
          },
          "type": {
            "enum": [
              "file"
            ],
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "updated_at": {
            "$ref": "#/components/schemas/Common.DateTime"
          },
          "url": {
            "$ref": "#/components/schemas/Common.URL"
          }
        },
        "required": [
          "created_at",
          "displayable_storage_key",
          "displayable_url",
          "document_type",
          "file_id",
          "file_status",
          "full_path",
          "hub_id",
          "id",
          "name",
          "ocr_pages",
          "errored_fields",
          "parent_id",
          "path",
          "pdf_storage_key",
          "pdf_url",
          "processing_fields",
          "storage_key",
          "summary",
          "type",
          "updated_at",
          "url"
        ],
        "title": "Hubs.File",
        "type": "object",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Hubs.File",
        "x-validate": null
      },
      "Common.NullableDateTime": {
        "description": "DateTime in RFC3339 format",
        "example": "2020-01-20T14:00:00Z",
        "format": "date-time",
        "nullable": true,
        "title": "Common.NullableDateTime",
        "type": "string",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Common.NullableDateTime",
        "x-validate": null
      },
      "Common.URL": {
        "example": "https://example.com",
        "pattern": "^http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+$",
        "title": "Common.URL",
        "type": "string",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Common.URL",
        "x-validate": null
      },
      "Hubs.UpdateHubFileResponse": {
        "additionalProperties": false,
        "anyOf": [
          {
            "$ref": "#/components/schemas/Hubs.Folder"
          },
          {
            "$ref": "#/components/schemas/Hubs.File"
          }
        ],
        "description": "Response containing the updated hub file",
        "title": "Hubs.UpdateHubFileResponse",
        "type": "object",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Hubs.UpdateHubFileResponse",
        "x-validate": null
      },
      "Hubs.UpdateHubFileRequest": {
        "additionalProperties": false,
        "description": "Request to update a hub file",
        "properties": {
          "name": {
            "description": "New name for the file or folder",
            "minLength": 1,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          }
        },
        "required": [
          "name"
        ],
        "title": "Hubs.UpdateHubFileRequest",
        "type": "object",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Hubs.UpdateHubFileRequest",
        "x-validate": null
      },
      "Hubs.HubFileConflictError": {
        "additionalProperties": false,
        "description": "Error response for hub file name conflicts",
        "properties": {
          "code": {
            "example": "conflict",
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "details": {
            "properties": {
              "conflicts": {
                "description": "List of file name conflicts",
                "items": {
                  "$ref": "#/components/schemas/Hubs.FileNameConflict"
                },
                "type": "array",
                "x-struct": null,
                "x-validate": null
              }
            },
            "required": [
              "conflicts"
            ],
            "type": "object",
            "x-struct": null,
            "x-validate": null
          },
          "message": {
            "example": "File name conflicts detected",
            "type": "string",
            "x-struct": null,
            "x-validate": null
          }
        },
        "required": [
          "code",
          "message",
          "details"
        ],
        "title": "Hubs.HubFileConflictError",
        "type": "object",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Hubs.HubFileConflictError",
        "x-validate": null
      },
      "Common.DateTime": {
        "description": "DateTime in RFC3339 format",
        "example": "2020-01-20T14:00:00Z",
        "format": "date-time",
        "title": "Common.DateTime",
        "type": "string",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Common.DateTime",
        "x-validate": null
      },
      "Common.APIError": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "example": "bad_request",
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "details": {
            "$ref": "#/components/schemas/Common.APIErrorDetails"
          },
          "message": {
            "example": "Bad Request",
            "type": "string",
            "x-struct": null,
            "x-validate": null
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "Common.APIError",
        "type": "object",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Common.APIError",
        "x-validate": null
      },
      "Projects.ListEntities.OCRPage": {
        "additionalProperties": false,
        "description": "OCR page metadata",
        "properties": {
          "height": {
            "type": "number",
            "x-struct": null,
            "x-validate": null
          },
          "number": {
            "minimum": 1,
            "type": "integer",
            "x-struct": null,
            "x-validate": null
          },
          "offset": {
            "minimum": 0,
            "type": "integer",
            "x-struct": null,
            "x-validate": null
          },
          "unit": {
            "enum": [
              "inch",
              "pixel"
            ],
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "width": {
            "type": "number",
            "x-struct": null,
            "x-validate": null
          }
        },
        "required": [
          "number",
          "offset",
          "unit",
          "width",
          "height"
        ],
        "title": "Projects.ListEntities.OCRPage",
        "type": "object",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Projects.ListEntities.OCRPage",
        "x-validate": null
      },
      "Common.NullableString": {
        "nullable": true,
        "title": "Common.NullableString",
        "type": "string",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Common.NullableString",
        "x-validate": null
      },
      "Common.String": {
        "title": "Common.String",
        "type": "string",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Common.String",
        "x-validate": null
      },
      "Common.NullableURL": {
        "example": "https://example.com",
        "nullable": true,
        "pattern": "^http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+$",
        "title": "Common.NullableURL",
        "type": "string",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Common.NullableURL",
        "x-validate": null
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "in": "header",
        "name": "X-API-KEY",
        "type": "apiKey"
      },
      "BearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "title": "V7 Go API",
    "version": "0.1.0"
  },
  "openapi": "3.0.0",
  "paths": {
    "/api/workspaces/{workspace_id}/hubs/{hub_id}/files/{hub_file_id}": {
      "put": {
        "callbacks": {},
        "description": "Update a hub file by ID",
        "operationId": "hub-update-file",
        "parameters": [
          {
            "description": "",
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Common.UUID"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "hub_id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Common.UUID"
            }
          },
          {
            "description": "",
            "in": "path",
            "name": "hub_file_id",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Common.UUID"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Hubs.UpdateHubFileRequest"
              }
            }
          },
          "description": "Hubs.UpdateHubFileRequest",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Hubs.UpdateHubFileResponse"
                }
              }
            },
            "description": "Hubs.UpdateHubFileResponse"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common.APIError"
                }
              }
            },
            "description": "Common.APIError"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common.APIError"
                }
              }
            },
            "description": "Common.APIError"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common.APIError"
                }
              }
            },
            "description": "Common.APIError"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common.APIError"
                }
              }
            },
            "description": "Common.APIError"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Hubs.HubFileConflictError"
                }
              }
            },
            "description": "Hubs.HubFileConflictError"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common.APIError"
                }
              }
            },
            "description": "Common.APIError"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Common.APIError"
                }
              }
            },
            "description": "Common.APIError"
          }
        },
        "summary": "Update hub file",
        "tags": [
          "HubFiles"
        ]
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    },
    {
      "ApiKeyAuth": []
    }
  ],
  "servers": [
    {
      "description": "EU",
      "url": "https://go.v7labs.com",
      "variables": {}
    },
    {
      "description": "US",
      "url": "https://go.us.v7labs.com",
      "variables": {}
    },
    {
      "description": "UAE",
      "url": "https://go.uae.v7labs.com",
      "variables": {}
    }
  ]
}
```