{
  "components": {
    "schemas": {
      "RevokeExternalShareRequest": {
        "type": "object",
        "properties": {
          "external_share_id": {
            "pattern": "^[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+$",
            "description": "external share id. Max length: 500 (required)",
            "type": "string",
            "maxLength": 500
          }
        },
        "required": [
          "external_share_id"
        ]
      },
      "VaniEnvelope": {
        "description": "Standard Vani response envelope.",
        "type": "object",
        "properties": {
          "data": {
            "description": "Operation payload. Narrowed per endpoint where a response schema is declared.",
            "type": "object"
          },
          "message": {
            "type": "string"
          },
          "request_uri": {
            "type": "string"
          },
          "status": {
            "description": "success or error",
            "type": "string"
          }
        },
        "required": [
          "status"
        ]
      },
      "VaniError": {
        "description": "Standard Vani error envelope.",
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "details": {
                "description": "Error code and message, plus any context keys (edition_id, space_id, ...).",
                "additionalProperties": true,
                "type": "object",
                "properties": {
                  "sdk_error_code": {
                    "description": "Raw SDK code, present when the error was not mapped.",
                    "type": "string"
                  },
                  "error_code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "request_uri": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "ExternalShareRequest": {
        "type": "object",
        "properties": {
          "is_password_enabled": {
            "description": "is password enabled",
            "type": "boolean"
          },
          "zone_ids": {
            "pattern": "^(?:(^[a-f0-9A-F]{8}-[a-f0-9A-F]{4}-[a-f0-9A-F]{4}-[a-f0-9A-F]{4}-[a-f0-9A-F]{12})((,[a-f0-9A-F]{8}-[a-f0-9A-F]{4}-[a-f0-9A-F]{4}-[a-f0-9A-F]{4}-[a-f0-9A-F]{12})*)?)$",
            "description": "zone ids. Max length: 1000",
            "type": "string",
            "maxLength": 1000
          },
          "password": {
            "pattern": "^(?:[a-zA-Z0-9\\-\\+\\^ '~!@#$%^&\" =?;`/|\\*()\\[\\]{}_:\\.,]+)$",
            "description": "password. Max length: 100",
            "type": "string",
            "maxLength": 100
          },
          "share_type": {
            "description": "share type. Allowed values: ALL_ZONES, PARTIAL_ZONES (required)",
            "type": "string",
            "enum": [
              "ALL_ZONES",
              "PARTIAL_ZONES"
            ]
          },
          "expiration_time": {
            "description": "expiration time. Max length: 30",
            "type": "string",
            "maxLength": 30
          },
          "permission": {
            "description": "permission. Allowed values: EDITOR, COMMENTER, VIEWER (required)",
            "type": "string",
            "enum": [
              "EDITOR",
              "COMMENTER",
              "VIEWER"
            ]
          },
          "link_name": {
            "pattern": "^(?:[a-zA-Z0-9\\-\\+\\^ '~!@#$%^&\" =?;`/|\\*()\\[\\]{}_:\\.,]+)$",
            "description": "link name. Max length: 255",
            "type": "string",
            "maxLength": 255
          },
          "external_share_id": {
            "pattern": "^[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+$",
            "description": "external share id. Max length: 500",
            "type": "string",
            "maxLength": 500
          },
          "status": {
            "description": "status. Allowed values: ACTIVE, INACTIVE",
            "type": "string",
            "enum": [
              "ACTIVE",
              "INACTIVE"
            ]
          }
        },
        "required": [
          "permission",
          "share_type"
        ]
      }
    },
    "responses": {
      "RateLimitExceededThisOperationAllows10Re": {
        "description": "Rate limit exceeded - this operation allows 10 requests per minute per user",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/VaniError"
            }
          }
        }
      },
      "InvalidRequestValidationFailed": {
        "description": "Invalid request - validation failed",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/VaniError"
            }
          }
        }
      },
      "RateLimitExceededThisOperationAllows60Re": {
        "description": "Rate limit exceeded - this operation allows 60 requests per minute per user",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/VaniError"
            }
          }
        }
      },
      "NotFoundAResourceNamedInThePathDoesNotEx10": {
        "description": "Not found - a resource named in the path does not exist, or is not visible to the caller",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/VaniError"
            }
          }
        }
      },
      "InternalServerErrorTheRequestWasWellForm": {
        "description": "Internal server error - the request was well-formed but could not be completed",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/VaniError"
            }
          }
        }
      },
      "UnauthorizedMissingOrInvalidAccessToken9": {
        "description": "Unauthorized - missing or invalid access token",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/VaniError"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "vani-api-key": {
        "in": "header",
        "name": "x-vani-apikey",
        "description": "Edition-scoped API key. ACCEPTED, NOT YET REQUIRED: the bearer token alone authorises every operation today, which is why each one lists a token-only alternative first and a token-plus-key alternative second. Sending the key is harmless and forward-compatible -- the server reads it, and the requirement is expected to become mandatory, at which point the token-only alternative disappears from this contract. The key never authorises on its own. Read or create your edition's key from the edition settings. The two operations on the /editions collection itself never carry one: a key belongs to an edition, so the calls that list or create editions cannot present it.",
        "type": "apiKey"
      },
      "iam-oauth2-schema": {
        "flows": {
          "authorizationCode": {
            "tokenUrl": "https://accounts.zoho.com/oauth/v2/token",
            "authorizationUrl": "https://accounts.zoho.com/oauth/v2/auth",
            "scopes": {
              "Vani.teams.UPDATE": "Update team memberships, roles, and collaboration settings",
              "Vani.spaces.UPDATE": "Update workspaces, folders, and organizational settings",
              "Vani.spaces.DELETE": "Delete workspaces and folders",
              "Vani.zones.READ": "Read zones including tables, cells, and paragraph content",
              "Vani.editions.UPDATE": "Update existing document editions, modify version metadata and publishing state",
              "Vani.spaces.CREATE": "Create new workspaces, folders, and organizational structure",
              "Vani.teams.CREATE": "Create new teams and assign team memberships",
              "Vani.spaces.READ": "Read workspaces, folders, and organizational structure",
              "Vani.editions.CREATE": "Create new document editions and version snapshots",
              "Vani.zones.CREATE": "Create zones including tables, cells, and paragraph content",
              "Vani.teams.READ": "Read team memberships, roles, and collaboration settings",
              "Vani.editions.READ": "Read document editions, version history, and edition metadata",
              "Vani.teams.DELETE": "Delete teams and remove team memberships"
            }
          }
        },
        "x-vani-data-centre": "com",
        "description": "OAuth 2.0 through Zoho Accounts for the .com data centre (the default). Authorisation is NOT served by the API server -- it is a separate host, and each data centre has its own. If your edition is on another data centre, keep these paths and substitute its host from x-vani-accounts-hosts on this scheme. An OAuth client is valid only in the data centre it was registered in, so register at that data centre's api-console. Note that the accounts host does not simply mirror the API host's TLD: Canada authorises at accounts.zohocloud.ca.",
        "x-vani-accounts-hosts": {
          "com": "accounts.zoho.com",
          "eu": "accounts.zoho.eu",
          "ae": "accounts.zoho.ae",
          "in": "accounts.zoho.in",
          "ca": "accounts.zohocloud.ca",
          "sa": "accounts.zoho.sa",
          "com.au": "accounts.zoho.com.au"
        },
        "type": "oauth2"
      }
    },
    "parameters": {
      "SpaceId": {
        "schema": {
          "type": "string"
        },
        "in": "path",
        "name": "space_id",
        "description": "The unique identifier of the space",
        "required": true
      },
      "EditionId": {
        "schema": {
          "type": "string"
        },
        "in": "path",
        "name": "edition_id",
        "description": "The unique identifier of the edition",
        "required": true
      },
      "TeamId": {
        "schema": {
          "type": "string"
        },
        "in": "path",
        "name": "team_id",
        "description": "The unique identifier of the team",
        "required": true
      },
      "Fields5": {
        "schema": {
          "type": "string",
          "enum": [
            "space_id",
            "position",
            "shared_by",
            "permission",
            "share_type",
            "is_password_enabled",
            "password",
            "expiration_time",
            "shared_time",
            "external_share_url",
            "zone_ids",
            "link_name"
          ]
        },
        "in": "query",
        "name": "fields",
        "description": "Specifies the fields (comma-separated) to retrieve. Allowed values: space_id, position, shared_by, permission, share_type, is_password_enabled, password, expiration_time, shared_time, external_share_url, zone_ids, link_name",
        "required": false
      }
    }
  },
  "servers": [
    {
      "variables": {
        "dc": {
          "default": "com",
          "description": "Data-centre TLD for your edition.",
          "enum": [
            "com",
            "in",
            "eu",
            "ca",
            "com.au",
            "sa",
            "ae"
          ]
        }
      },
      "description": "Vani API server. Select the data centre your edition is hosted in.",
      "url": "https://api.app.vanihq.{dc}"
    }
  ],
  "openapi": "3.1.0",
  "paths": {
    "/vani/api/v1/editions/{edition_id}/teams/{team_id}/externalshares/status": {
      "get": {
        "summary": "Check whether external sharing is allowed for the edition and team",
        "security": [
          {
            "iam-oauth2-schema": [
              "Vani.editions.READ",
              "Vani.teams.READ"
            ]
          },
          {
            "vani-api-key": [],
            "iam-oauth2-schema": [
              "Vani.editions.READ",
              "Vani.teams.READ"
            ]
          }
        ],
        "operationId": "getExternalShareStatus",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaniEnvelope"
                },
                "examples": {
                  "Using Filter Fields": {
                    "value": {
                      "data": {
                        "external_share_edition_enabled": true
                      },
                      "message": "External share status fetched successfully",
                      "request_uri": "/vani/api/v1/editions/888012145/teams/4855000000002003/externalshares/status",
                      "status": "success"
                    }
                  },
                  "Fetch Success": {
                    "value": {
                      "data": {
                        "external_share_team_enabled": true,
                        "external_share_edition_enabled": true,
                        "external_share_allowed": true
                      },
                      "message": "External share allowed status fetched successfully",
                      "request_uri": "/vani/api/v1/editions/82513223/teams/1629000000002003/externalshares/status",
                      "status": "success"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestValidationFailed"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedMissingOrInvalidAccessToken9"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundAResourceNamedInThePathDoesNotEx10"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitExceededThisOperationAllows60Re"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerErrorTheRequestWasWellForm"
          }
        },
        "x-vani-operation-type": "READ",
        "parameters": [
          {
            "$ref": "#/components/parameters/EditionId"
          },
          {
            "$ref": "#/components/parameters/TeamId"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "external_share_edition_enabled",
                "external_share_team_enabled",
                "external_share_allowed"
              ]
            },
            "in": "query",
            "name": "fields",
            "description": "Specifies the fields (comma-separated) to retrieve. Allowed values: external_share_edition_enabled, external_share_team_enabled, external_share_allowed",
            "required": false
          }
        ],
        "x-vani-read-only": true,
        "x-vani-destructive": false,
        "x-vani-throttle": {
          "duration": "1M",
          "threshold": 60
        },
        "tags": [
          "External Share"
        ]
      }
    },
    "/vani/api/v1/editions/{edition_id}/spaces/{space_id}/externalshares": {
      "post": {
        "summary": "Publish a space as an external share",
        "security": [
          {
            "iam-oauth2-schema": [
              "Vani.spaces.CREATE"
            ]
          },
          {
            "vani-api-key": [],
            "iam-oauth2-schema": [
              "Vani.spaces.CREATE"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalShareRequest"
              }
            }
          }
        },
        "operationId": "createExternalShare",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaniEnvelope"
                },
                "examples": {
                  "Success": {
                    "value": {
                      "data": {
                        "is_password_enabled": true,
                        "zone_ids": [
                          {
                            "zone_id": "9e7a947b-470b-46e7-be64-4a617abadf43",
                            "permission": "VIEWER"
                          }
                        ],
                        "password": "1",
                        "share_type": "PARTIAL_ZONES",
                        "shared_time": 1752045010623,
                        "external_share_url": "https://app.vanipublic.com/external/open/92c8c172434d1eb794100b0e52303ddaf6ec81d29608502e2b8bce9a5aab731144024ea162631784c784141d8d79c5e3e433279e6f2a4f0841ecfb01ea995155",
                        "expiration_time": 1754627011000,
                        "shared_by": 82512958,
                        "permission": "VIEWER",
                        "space_id": "1629000000297013"
                      },
                      "message": "Space externally shared successfully",
                      "request_uri": "/vani/api/v1/editions/82513223/spaces/1629000000297013/externalshares",
                      "status": "success"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request - validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaniError"
                },
                "examples": {
                  "Invalid Zone ID": {
                    "value": {
                      "error": {
                        "details": {
                          "edition_id": "82513223",
                          "current_user_id": "82512958",
                          "error_code": "EX1006",
                          "message": "External share zones are invalid or not available"
                        }
                      },
                      "request_uri": "/vani/api/v1/editions/82513223/spaces/1629000000297013/externalshares",
                      "status": "error"
                    }
                  },
                  "Invalid Expiry Time": {
                    "value": {
                      "error": {
                        "details": {
                          "edition_id": "82513223",
                          "current_user_id": "82512958",
                          "error_code": "EX1000",
                          "message": "External share expiration time is invalid"
                        }
                      },
                      "request_uri": "/vani/api/v1/editions/82513223/spaces/1629000000297013/externalshares",
                      "status": "error"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedMissingOrInvalidAccessToken9"
          },
          "403": {
            "description": "Forbidden - the caller is authenticated but not allowed to perform this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaniError"
                },
                "examples": {
                  "External Sharing Is Disabled": {
                    "value": {
                      "error": {
                        "details": {
                          "edition_id": "82513223",
                          "current_user_id": "82512958",
                          "error_code": "EX1003",
                          "message": "External share is not allowed for this team"
                        }
                      },
                      "request_uri": "/vani/api/v1/editions/82513223/spaces/1629000000297013/externalshares",
                      "status": "error"
                    }
                  },
                  "External Sharing is Restricted For Free Plan": {
                    "value": {
                      "error": {
                        "details": {
                          "edition_id": "97054676",
                          "current_user_id": "97049596",
                          "error_code": "EX1004",
                          "message": "External share is not available for edition"
                        }
                      },
                      "request_uri": "/vani/api/v1/editions/97054676/spaces/1435000000039005/externalshares",
                      "status": "error"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFoundAResourceNamedInThePathDoesNotEx10"
          },
          "409": {
            "description": "Conflict - the requested change conflicts with the current resource state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaniError"
                },
                "examples": {
                  "Already Externally Shared": {
                    "value": {
                      "error": {
                        "details": {
                          "edition_id": "112255940",
                          "current_user_id": "82512958",
                          "error_code": "EX1019",
                          "message": "External share limit reached for the project.",
                          "space_id": "5777000000929039"
                        }
                      },
                      "request_uri": "/vani/api/v1/editions/112255940/spaces/5777000000929039/externalshares",
                      "status": "error"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitExceededThisOperationAllows60Re"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerErrorTheRequestWasWellForm"
          }
        },
        "x-vani-operation-type": "CREATE",
        "parameters": [
          {
            "$ref": "#/components/parameters/EditionId"
          },
          {
            "$ref": "#/components/parameters/SpaceId"
          }
        ],
        "x-vani-read-only": false,
        "x-vani-destructive": false,
        "x-vani-throttle": {
          "duration": "1M",
          "threshold": 60
        },
        "tags": [
          "External Share"
        ]
      },
      "get": {
        "summary": "Get a space's external share details",
        "security": [
          {
            "iam-oauth2-schema": [
              "Vani.spaces.READ"
            ]
          },
          {
            "vani-api-key": [],
            "iam-oauth2-schema": [
              "Vani.spaces.READ"
            ]
          }
        ],
        "operationId": "getSpaceExternalShares",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaniEnvelope"
                },
                "examples": {
                  "Using Filter Fields": {
                    "value": {
                      "data": {
                        "shared_time": 1753678990289,
                        "space_id": "4855000000088149"
                      },
                      "message": "External share space info fetched successfully",
                      "request_uri": "/vani/api/v1/editions/888012145/spaces/4855000000088149/externalshares",
                      "status": "success"
                    }
                  },
                  "Success": {
                    "value": {
                      "data": {
                        "is_password_enabled": true,
                        "zone_ids": [
                          {
                            "zone_id": "9e7a947b-470b-46e7-be64-4a617abadf43",
                            "permission": "VIEWER"
                          }
                        ],
                        "password": "1",
                        "share_type": "PARTIAL_ZONES",
                        "shared_time": 1752045307273,
                        "external_share_url": "https://app.vanipublic.com/external/open/7b540cd851d86a3cf77b1050c19b88e02d51249cd6c08db6cf99e33e5dc14bccff15aae2435c3dc2bb534e88ab4afc2811a930ea68a6012700e7634857017d12",
                        "expiration_time": 1754723516000,
                        "shared_by": 82512958,
                        "permission": "VIEWER",
                        "space_id": "1629000000297013"
                      },
                      "message": "External share space info fetched successfully",
                      "request_uri": "/vani/api/v1/editions/82513223/spaces/1629000000297013/externalshares",
                      "status": "success"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request - validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaniError"
                },
                "examples": {
                  "Not Externally Shared": {
                    "value": {
                      "error": {
                        "details": {
                          "edition_id": "82513223",
                          "current_user_id": "82512958",
                          "error_code": "S1046",
                          "message": "Space is not externally shared"
                        }
                      },
                      "request_uri": "/vani/api/v1/editions/82513223/spaces/1629000000297013/externalshares",
                      "status": "error"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - missing or invalid access token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaniError"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "error": {
                        "details": {
                          "edition_id": "888012145",
                          "current_user_id": "888015717",
                          "error_code": "EX1007",
                          "message": "The user doesn't have permission to fetch external share info"
                        }
                      },
                      "request_uri": "/vani/api/v1/editions/888012145/spaces/485500000008849/externalshares",
                      "status": "error"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFoundAResourceNamedInThePathDoesNotEx10"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitExceededThisOperationAllows10Re"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerErrorTheRequestWasWellForm"
          }
        },
        "x-vani-operation-type": "READ",
        "parameters": [
          {
            "$ref": "#/components/parameters/EditionId"
          },
          {
            "$ref": "#/components/parameters/SpaceId"
          },
          {
            "$ref": "#/components/parameters/Fields5"
          }
        ],
        "x-vani-read-only": true,
        "x-vani-destructive": false,
        "x-vani-throttle": {
          "duration": "1M",
          "threshold": 10
        },
        "tags": [
          "External Share"
        ]
      },
      "delete": {
        "summary": "Revoke a space's external share",
        "security": [
          {
            "iam-oauth2-schema": [
              "Vani.spaces.DELETE"
            ]
          },
          {
            "vani-api-key": [],
            "iam-oauth2-schema": [
              "Vani.spaces.DELETE"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeExternalShareRequest"
              }
            }
          }
        },
        "operationId": "deleteExternalShares",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaniEnvelope"
                },
                "examples": {
                  "Success": {
                    "value": {
                      "data": {
                        "edition_id": "96499735",
                        "current_user_id": "96384499",
                        "space_id": "3009000000675145",
                        "external_share_removed": true
                      },
                      "message": "External share space removed successfully",
                      "request_uri": "/vani/api/v1/editions/96499735/spaces/3009000000675145/externalshares",
                      "status": "success"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request - validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaniError"
                },
                "examples": {
                  "Space Is Not an External Share": {
                    "value": {
                      "error": {
                        "details": {
                          "edition_id": "82513223",
                          "current_user_id": "82512958",
                          "error_code": "S1046",
                          "message": "Space is not externally shared"
                        }
                      },
                      "request_uri": "/vani/api/v1/editions/82513223/spaces/1629000000297013/externalshares",
                      "status": "error"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedMissingOrInvalidAccessToken9"
          },
          "404": {
            "description": "Not found - a resource named in the path does not exist, or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaniError"
                },
                "examples": {
                  "Space Not Found": {
                    "value": {
                      "error": {
                        "details": {
                          "edition_id": "96499735",
                          "current_user_id": "96384499",
                          "error_code": "S1009",
                          "message": "Space not found",
                          "space_id": "300900000675145"
                        }
                      },
                      "request_uri": "/vani/api/v1/editions/96499735/spaces/300900000675145/externalshares",
                      "status": "error"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimitExceededThisOperationAllows60Re"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerErrorTheRequestWasWellForm"
          }
        },
        "x-vani-operation-type": "DELETE",
        "parameters": [
          {
            "$ref": "#/components/parameters/EditionId"
          },
          {
            "$ref": "#/components/parameters/SpaceId"
          }
        ],
        "x-vani-read-only": false,
        "x-vani-destructive": true,
        "x-vani-throttle": {
          "duration": "1M",
          "threshold": 60
        },
        "tags": [
          "External Share"
        ]
      },
      "put": {
        "summary": "Update a space's external share",
        "security": [
          {
            "iam-oauth2-schema": [
              "Vani.spaces.UPDATE"
            ]
          },
          {
            "vani-api-key": [],
            "iam-oauth2-schema": [
              "Vani.spaces.UPDATE"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExternalShareRequest"
              }
            }
          }
        },
        "operationId": "updateExternalShares",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaniEnvelope"
                },
                "examples": {
                  "Including Invalid zone ids": {
                    "value": {
                      "data": {
                        "is_password_enabled": true,
                        "zone_ids": [
                          {
                            "zone_id": "9e7a947b-470b-46e7-be64-4a617abadf43",
                            "permission": "COMMENTER"
                          }
                        ],
                        "password": "1",
                        "share_type": "PARTIAL_ZONES",
                        "shared_time": 1752045307273,
                        "external_share_url": "https://app.localvanipublic.net/external/open/ea6e71f11f7803677667dec29fc1ea2ea829c2b748a992203c8a3eea26b853568c231f96663a6b841b11c071352ee65b844d010ea52cf7e3810a7bc43c2b8c7f",
                        "expiration_time": 1754627011000,
                        "shared_by": 82512958,
                        "permission": "COMMENTER",
                        "space_id": "1629000000297013"
                      },
                      "message": "External share space updated successfully",
                      "request_uri": "/vani/api/v1/editions/82513223/spaces/1629000000297013/externalshares",
                      "status": "success"
                    }
                  },
                  "Success": {
                    "value": {
                      "data": {
                        "is_password_enabled": true,
                        "zone_ids": [
                          {
                            "zone_id": "9e7a947b-470b-46e7-be64-4a617abadf43",
                            "permission": "COMMENTER"
                          }
                        ],
                        "password": "1",
                        "share_type": "PARTIAL_ZONES",
                        "shared_time": 1752045307273,
                        "external_share_url": "https://app.localvanipublic.net/external/open/e9ee62de0dd78b71ca86147cefb21346908ca9fe277f6be74969d56d23b6ee72ffb5f9a320efe03c02077df9a4d020f251823e81a63cc07b83691170a575ba8f",
                        "expiration_time": 1754627011000,
                        "shared_by": 82512958,
                        "permission": "COMMENTER",
                        "space_id": "1629000000297013"
                      },
                      "message": "External share space updated successfully",
                      "request_uri": "/vani/api/v1/editions/82513223/spaces/1629000000297013/externalshares",
                      "status": "success"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request - validation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaniError"
                },
                "examples": {
                  "All Zone Ids Invalid": {
                    "value": {
                      "error": {
                        "details": {
                          "edition_id": "82513223",
                          "current_user_id": "82512958",
                          "error_code": "EX1006",
                          "message": "External share zones are invalid or not available"
                        }
                      },
                      "request_uri": "/vani/api/v1/editions/82513223/spaces/1629000000297013/externalshares",
                      "status": "error"
                    }
                  },
                  "Invalid Expiry Time": {
                    "value": {
                      "error": {
                        "details": {
                          "edition_id": "82513223",
                          "current_user_id": "82512958",
                          "error_code": "EX1000",
                          "message": "External share expiration time is invalid"
                        }
                      },
                      "request_uri": "/vani/api/v1/editions/82513223/spaces/1629000000297013/externalshares",
                      "status": "error"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedMissingOrInvalidAccessToken9"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundAResourceNamedInThePathDoesNotEx10"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitExceededThisOperationAllows60Re"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerErrorTheRequestWasWellForm"
          }
        },
        "x-vani-operation-type": "UPDATE",
        "parameters": [
          {
            "$ref": "#/components/parameters/EditionId"
          },
          {
            "$ref": "#/components/parameters/SpaceId"
          }
        ],
        "x-vani-read-only": false,
        "x-vani-destructive": false,
        "x-vani-throttle": {
          "duration": "1M",
          "threshold": 60
        },
        "tags": [
          "External Share"
        ]
      }
    },
    "/vani/api/v1/editions/{edition_id}/teams/{team_id}/externalshares": {
      "get": {
        "summary": "Get the external shares of a team's spaces",
        "security": [
          {
            "iam-oauth2-schema": [
              "Vani.editions.READ",
              "Vani.teams.READ"
            ]
          },
          {
            "vani-api-key": [],
            "iam-oauth2-schema": [
              "Vani.editions.READ",
              "Vani.teams.READ"
            ]
          }
        ],
        "operationId": "getTeamExternalShares",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaniEnvelope"
                },
                "examples": {
                  "Using Filter Fields": {
                    "value": {
                      "data": {
                        "external_share_info": [
                          {
                            "external_share_url": "https://app.vanipublic.com/external/open/418a5ec6abf2bb5b7a0486d5aaae300bcb97a2672a1086e25a81c5853896c92d27a8a01fcb9e42a82fe59e5a3c050fb2390d261c80ae2d4f33b09a56b27f58a5",
                            "permission": "VIEWER",
                            "space_id": "1629000000491005"
                          },
                          {
                            "external_share_url": "https://app.vanipublic.com/external/open/f42bcd0a8025fe33bd45bcb176e270275b48312abef2bf9d468a4939709cf9a68db1f73db4f8bdfee7fc07d948d360e083ee198913c863c624304fc274c8d289",
                            "permission": "VIEWER",
                            "space_id": "1629000000309025"
                          },
                          {
                            "external_share_url": "https://app.vanipublic.com/external/open/c7dab478035f95d89f1ad22b507b7bf98bd26c5f33c8d5123f5e85c34ae796ea09b9dd26ae6c0e6ac575a8e387eb98073530e803ecdd2cfa1ba7747726529492",
                            "permission": "COMMENTER",
                            "space_id": "1629000000297013"
                          }
                        ]
                      },
                      "message": "External share spaces fetched successfully",
                      "request_uri": "/vani/api/v1/editions/82513223/teams/1629000000002003/externalshares",
                      "status": "success"
                    }
                  },
                  "Fetch Success": {
                    "value": {
                      "data": {
                        "external_share_info": [
                          {
                            "is_password_enabled": false,
                            "zone_ids": [
                              {
                                "zone_id": "F16ACD54-F0F4-4563-87E7-43EF9A7ED5F8",
                                "permission": "VIEWER"
                              }
                            ],
                            "share_type": "PARTIAL_ZONES",
                            "shared_time": 1743162438306,
                            "external_share_url": "https://app.vanipublic.com/external/open/418a5ec6abf2bb5b7a0486d5aaae300bcb97a2672a1086e25a81c5853896c92d27a8a01fcb9e42a82fe59e5a3c050fb2390d261c80ae2d4f33b09a56b27f58a5",
                            "expiration_time": -1,
                            "shared_by": 82512958,
                            "permission": "VIEWER",
                            "space_id": "1629000000491005"
                          },
                          {
                            "is_password_enabled": false,
                            "zone_ids": [
                              {
                                "zone_id": "4BAAB754-0244-4517-9EF8-3313B3A802EB",
                                "permission": "VIEWER"
                              }
                            ],
                            "share_type": "PARTIAL_ZONES",
                            "shared_time": 1745419204184,
                            "external_share_url": "https://app.vanipublic.com/external/open/f42bcd0a8025fe33bd45bcb176e270275b48312abef2bf9d468a4939709cf9a68db1f73db4f8bdfee7fc07d948d360e083ee198913c863c624304fc274c8d289",
                            "expiration_time": -1,
                            "shared_by": 82512958,
                            "permission": "VIEWER",
                            "space_id": "1629000000309025"
                          },
                          {
                            "is_password_enabled": true,
                            "zone_ids": [
                              {
                                "zone_id": "9e7a947b-470b-46e7-be64-4a617abadf43",
                                "permission": "COMMENTER"
                              },
                              {
                                "zone_id": "33D51B0E-71A3-42FA-BF0F-9CC9BB570E63",
                                "permission": "COMMENTER"
                              }
                            ],
                            "share_type": "PARTIAL_ZONES",
                            "shared_time": 1752045307273,
                            "external_share_url": "https://app.vanipublic.com/external/open/c7dab478035f95d89f1ad22b507b7bf98bd26c5f33c8d5123f5e85c34ae796ea09b9dd26ae6c0e6ac575a8e387eb98073530e803ecdd2cfa1ba7747726529492",
                            "expiration_time": 1754627011000,
                            "shared_by": 82512958,
                            "permission": "COMMENTER",
                            "space_id": "1629000000297013"
                          }
                        ]
                      },
                      "message": "External share spaces fetched successfully",
                      "request_uri": "/vani/api/v1/editions/82513223/teams/1629000000002003/externalshares",
                      "status": "success"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestValidationFailed"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedMissingOrInvalidAccessToken9"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundAResourceNamedInThePathDoesNotEx10"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitExceededThisOperationAllows60Re"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerErrorTheRequestWasWellForm"
          }
        },
        "x-vani-operation-type": "READ",
        "parameters": [
          {
            "$ref": "#/components/parameters/EditionId"
          },
          {
            "$ref": "#/components/parameters/TeamId"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "from",
            "description": "The starting index from where the results should be fetched. Default value is 0",
            "required": false
          },
          {
            "schema": {
              "pattern": "^(?:^(100|[1-9][0-9]?$))$",
              "type": "string"
            },
            "in": "query",
            "name": "limit",
            "description": "The maximum number of results to return in the response. Default value is 20",
            "required": false
          },
          {
            "$ref": "#/components/parameters/Fields5"
          }
        ],
        "x-vani-read-only": true,
        "x-vani-destructive": false,
        "x-vani-throttle": {
          "duration": "1M",
          "threshold": 60
        },
        "tags": [
          "External Share"
        ]
      }
    }
  },
  "info": {
    "contact": {
      "name": "Vani API Support",
      "url": "https://www.vanihq.com/resources/api/doc/"
    },
    "description": "Publish a space externally and manage the resulting public share.",
    "title": "External Share",
    "version": "1.0.0"
  },
  "tags": [
    {
      "name": "External Share",
      "description": "Publish, update, revoke, and inspect external shares."
    }
  ]
}