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

# Restore a deleted hub

Restores a soft-deleted hub from trash.

# 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.HubErrorCounts": {
        "additionalProperties": false,
        "description": "Counts of hub files with facet errors by category.\nUpdated when the hub index is recomputed.\n",
        "properties": {
          "content": {
            "description": "Errors on the transcript facet.\nData used internally for citations/grounding, as well as in search.\n",
            "minimum": 0,
            "type": "integer",
            "x-struct": null,
            "x-validate": null
          },
          "displayable": {
            "description": "Errors on the displayable facet. Used for file previews.",
            "minimum": 0,
            "type": "integer",
            "x-struct": null,
            "x-validate": null
          },
          "embeddings": {
            "description": "Errors on the embeddings facet, used for hub search and chat",
            "minimum": 0,
            "type": "integer",
            "x-struct": null,
            "x-validate": null
          },
          "ocr": {
            "description": "Errors on the bounding boxes facet, for ocr_pages and ocr_storage_key",
            "minimum": 0,
            "type": "integer",
            "x-struct": null,
            "x-validate": null
          },
          "summary": {
            "description": "Errors on summary facets (full and prefix summary).\nUsed in search and to provide a quick insight into the contents of the file\n",
            "minimum": 0,
            "type": "integer",
            "x-struct": null,
            "x-validate": null
          }
        },
        "required": [
          "ocr",
          "content",
          "embeddings",
          "summary",
          "displayable"
        ],
        "title": "Hubs.HubErrorCounts",
        "type": "object",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Hubs.HubErrorCounts",
        "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
      },
      "Users.PermissionCondition": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/Users.ConditionCreatedByUser"
          },
          {
            "$ref": "#/components/schemas/Users.ConditionManagedRole"
          }
        ],
        "title": "Users.PermissionCondition",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Users.PermissionCondition",
        "x-validate": null
      },
      "Hubs.HubResponse": {
        "additionalProperties": false,
        "anyOf": [
          {
            "$ref": "#/components/schemas/Hubs.Hub"
          }
        ],
        "description": "Response containing a single hub",
        "title": "Hubs.HubResponse",
        "type": "object",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Hubs.HubResponse",
        "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.ContextIndexLenses": {
        "additionalProperties": false,
        "description": "Guidance text that the Hub's owners give to the context index, by slot. It shapes emphasis and tone; it cannot change output formats or citation rules.",
        "properties": {
          "summary": {
            "description": "Guidance for entity summaries, or null when the Hub has none",
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          }
        },
        "required": [
          "summary"
        ],
        "title": "Hubs.ContextIndexLenses",
        "type": "object",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Hubs.ContextIndexLenses",
        "x-validate": null
      },
      "Users.ConditionManagedRole": {
        "additionalProperties": false,
        "description": "A condition restricting operations based on a role of a user that this operation relates to. Only listed roles can be affected by the operation.\n",
        "properties": {
          "any_of": {
            "description": "List of roles that can be affected by the operation",
            "items": {
              "enum": [
                "owner",
                "admin",
                "editor",
                "contributor",
                "reviewer",
                "reader",
                "worker"
              ],
              "type": "string",
              "x-struct": null,
              "x-validate": null
            },
            "type": "array",
            "x-struct": null,
            "x-validate": null
          },
          "permission": {
            "enum": [
              "invite_members",
              "add_members",
              "update_members",
              "remove_members"
            ],
            "type": "string",
            "x-struct": null,
            "x-validate": null
          }
        },
        "required": [
          "permission",
          "any_of"
        ],
        "title": "Users.ConditionManagedRole",
        "type": "object",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Users.ConditionManagedRole",
        "x-validate": null
      },
      "Hubs.Hub": {
        "additionalProperties": false,
        "description": "A hub represents a collection of indexed files",
        "properties": {
          "context_index_enabled": {
            "description": "Whether the context index processes and serves the Hub's files",
            "type": "boolean",
            "x-struct": null,
            "x-validate": null
          },
          "context_index_lenses": {
            "$ref": "#/components/schemas/Hubs.ContextIndexLenses"
          },
          "created_at": {
            "$ref": "#/components/schemas/Common.DateTime"
          },
          "description": {
            "description": "Description of the hub",
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "error_counts": {
            "$ref": "#/components/schemas/Hubs.HubErrorCounts"
          },
          "hub_type": {
            "description": "Hub classification derived from backing relationships",
            "enum": [
              "standard",
              "knowledge_graph"
            ],
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "id": {
            "$ref": "#/components/schemas/Common.UUID"
          },
          "index_status": {
            "enum": [
              "stale",
              "recomputing",
              "ready"
            ],
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "membership_info": {
            "$ref": "#/components/schemas/Projects.MembershipInfo"
          },
          "name": {
            "description": "Name of the hub",
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "summary": {
            "description": "Summary of the hub",
            "nullable": true,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "type": {
            "description": "Resource type",
            "enum": [
              "hub"
            ],
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "updated_at": {
            "$ref": "#/components/schemas/Common.DateTime"
          },
          "workspace_id": {
            "$ref": "#/components/schemas/Common.UUID"
          }
        },
        "required": [
          "id",
          "type",
          "hub_type",
          "name",
          "index_status",
          "error_counts",
          "context_index_enabled",
          "context_index_lenses",
          "created_at",
          "updated_at",
          "workspace_id"
        ],
        "title": "Hubs.Hub",
        "type": "object",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Hubs.Hub",
        "x-validate": null
      },
      "Projects.MembershipInfo": {
        "additionalProperties": false,
        "description": "Project's membership information for the calling user",
        "nullable": true,
        "properties": {
          "conditions": {
            "description": "Additional conditions for the permissions. If condition is present for any given permission, the permission is only effective if all the conditions are met.\n",
            "items": {
              "$ref": "#/components/schemas/Users.PermissionCondition"
            },
            "type": "array",
            "x-struct": null,
            "x-validate": null
          },
          "permissions": {
            "items": {
              "enum": [
                "create_own_api_keys",
                "create_projects",
                "update_projects",
                "delete_projects",
                "update_workspaces",
                "delete_workspaces",
                "invite_members",
                "add_members",
                "update_members",
                "remove_members",
                "update_entities",
                "create_entities",
                "run_playbook",
                "create_assigned_entities",
                "delete_entities",
                "recalculate_entities",
                "create_hubs",
                "update_hubs",
                "delete_hubs",
                "read_hubs",
                "read_hub_files",
                "update_hub_files",
                "delete_hub_files",
                "create_data_stores",
                "update_data_stores",
                "delete_data_stores",
                "manage_data_stores",
                "manage_workload_grants",
                "write_data_stores",
                "read_data_stores",
                "manage_agent_skills",
                "manage_integrations",
                "manage_personal_integrations",
                "manage_inbound_triggers",
                "manage_properties",
                "manage_views",
                "manage_triggers",
                "manage_billing",
                "manage_tool_integrations",
                "manage_project_exports",
                "manage_playbook_email",
                "create_playbook",
                "update_playbook",
                "delete_playbook",
                "read_playbook",
                "read_agent_skills",
                "read_others",
                "revoke_links",
                "use_cases",
                "use_apps",
                "use_llm_chat",
                "use_graphql",
                "create_folders",
                "update_folders",
                "delete_folders",
                "create_files",
                "set_access_type",
                "manage_service_accounts",
                "update_field_reviews",
                "manage_skills",
                "manage_sso",
                "manage_token_reports",
                "manage_slide_decks",
                "manage_organization",
                "read_organization_reports"
              ],
              "type": "string",
              "x-struct": null,
              "x-validate": null
            },
            "type": "array",
            "x-struct": null,
            "x-validate": null
          },
          "role": {
            "enum": [
              "owner",
              "admin",
              "editor",
              "contributor",
              "reviewer",
              "reader",
              "worker"
            ],
            "type": "string",
            "x-struct": null,
            "x-validate": null
          }
        },
        "required": [
          "role",
          "permissions",
          "conditions"
        ],
        "title": "Projects.MembershipInfo",
        "type": "object",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Projects.MembershipInfo",
        "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
      },
      "Users.ConditionCreatedByUser": {
        "additionalProperties": false,
        "description": "A condition restricting operations to resources created by the current user.\nThe field specifies which resource field contains the creator's user ID.\n",
        "properties": {
          "field": {
            "description": "The field on the resource that must match the current user's ID",
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "permission": {
            "enum": [
              "revoke_links"
            ],
            "type": "string",
            "x-struct": null,
            "x-validate": null
          }
        },
        "required": [
          "permission",
          "field"
        ],
        "title": "Users.ConditionCreatedByUser",
        "type": "object",
        "x-struct": "Elixir.AgiDbWeb.Schemas.Users.ConditionCreatedByUser",
        "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/trash/{hub_id}/restore": {
      "post": {
        "callbacks": {},
        "description": "Restores a soft-deleted hub from trash.",
        "operationId": "trash-restore-hub",
        "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"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Hubs.HubResponse"
                }
              }
            },
            "description": "Hubs.HubResponse"
          },
          "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/Common.APIError"
                }
              }
            },
            "description": "Common.APIError"
          },
          "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": "Restore a deleted hub",
        "tags": [
          "Hubs"
        ]
      }
    }
  },
  "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": {}
    }
  ]
}
```