{
  "openapi": "3.1.0",
  "info": {
    "title": "Yungle API",
    "version": "1.0.0",
    "description": "Send transfers, build collections and sync contacts from your own systems. Available on any paid Yungle plan.\n\nFile bytes never travel through this API: endpoints that accept files return a tus endpoint and a per-file upload token, and you stream to that. See the Uploads guide.\n\nThe vault and end-to-end encrypted transfers are not reachable here, and cannot be: their keys are derived in the client and never sent to us.",
    "contact": {
      "name": "Yungle",
      "url": "https://yungle.co/developers"
    }
  },
  "servers": [
    {
      "url": "https://yungle.co/api/v1"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API key from Settings → API keys, sent as `Authorization: Bearer yk_live_…`. Scopes: transfers:read, transfers:write, collections:read, collections:write, contacts:read, contacts:write. A write scope implies read of the same resource."
      }
    }
  },
  "tags": [
    {
      "name": "Account",
      "description": "Who the key is and what it may do."
    },
    {
      "name": "Transfers",
      "description": "One-off sends with an expiring link."
    },
    {
      "name": "Collections",
      "description": "Durable, folder-structured spaces clients are invited into."
    },
    {
      "name": "Contacts",
      "description": "The workspace address book."
    }
  ],
  "paths": {
    "/me": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "The workspace, plan and key behind this request",
        "responses": {
          "200": {
            "description": "Account and key details.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/transfers": {
      "get": {
        "tags": [
          "Transfers"
        ],
        "summary": "List transfers (most recent 100)",
        "responses": {
          "200": {
            "description": "Transfer summaries.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Transfers"
        ],
        "summary": "Create a transfer",
        "description": "Always creates a **draft**: the link is not live and nobody is emailed until you call finalize. Returns a tus endpoint and one upload token per file. An unfinalized draft is swept after 24 hours.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512,
                          "description": "Filename as it should appear to the recipient."
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Exact size in bytes. Must match what you upload."
                        },
                        "type": {
                          "type": "string",
                          "maxLength": 255,
                          "default": "",
                          "description": "MIME type. Best effort; never trusted."
                        },
                        "path": {
                          "type": "string",
                          "maxLength": 1024,
                          "description": "Directory within an uploaded folder, e.g. \"Ceremony/Raw\". Omit for a loose file."
                        }
                      },
                      "required": [
                        "name",
                        "size"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 500
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Shown in your dashboard; never to recipients."
                  },
                  "expiresInDays": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 3650,
                    "description": "Defaults to 7. Clamped to your plan’s maximum (7 free, 90 paid) rather than rejected."
                  }
                },
                "required": [
                  "files"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Draft created, with upload targets.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/transfers/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Transfer id. Never the share slug, which is a capability."
        }
      ],
      "get": {
        "tags": [
          "Transfers"
        ],
        "summary": "Transfer detail, files and recipient status",
        "responses": {
          "200": {
            "description": "The transfer.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Transfers"
        ],
        "summary": "Change expiry or download limit",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expiresInDays": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 3650,
                    "description": "Clamped to your plan’s maximum rather than rejected."
                  },
                  "maxDownloads": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "null lifts the limit. Omit to leave unchanged."
                  }
                },
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated transfer.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Transfers"
        ],
        "summary": "Revoke a transfer",
        "description": "Immediate and irreversible: the per-file encryption keys are destroyed before this returns, so the content is unrecoverable whether or not object storage has caught up.",
        "responses": {
          "200": {
            "description": "The revoked transfer.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/transfers/{id}/finalize": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Transfer id. Never the share slug, which is a capability."
        }
      ],
      "post": {
        "tags": [
          "Transfers"
        ],
        "summary": "Send it",
        "description": "Makes the link live and emails any recipients. Safe to retry — finalizing twice does not re-send. Omit `recipients` for a link-only transfer you share yourself.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "recipients": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "email"
                    },
                    "maxItems": 10,
                    "description": "Omit to get a link only. Each address here is emailed on your behalf."
                  },
                  "message": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "password": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256,
                    "description": "Recipients must enter this to open the transfer."
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 200
                  }
                },
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The finalized transfer, and who was notified.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/transfers/{id}/files": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Transfer id. Never the share slug, which is a capability."
        }
      ],
      "post": {
        "tags": [
          "Transfers"
        ],
        "summary": "Add files to an unsent transfer",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512,
                          "description": "Filename as it should appear to the recipient."
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Exact size in bytes. Must match what you upload."
                        },
                        "type": {
                          "type": "string",
                          "maxLength": 255,
                          "default": "",
                          "description": "MIME type. Best effort; never trusted."
                        },
                        "path": {
                          "type": "string",
                          "maxLength": 1024,
                          "description": "Directory within an uploaded folder, e.g. \"Ceremony/Raw\". Omit for a loose file."
                        }
                      },
                      "required": [
                        "name",
                        "size"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 500
                  }
                },
                "required": [
                  "files"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Upload targets for the new files.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/transfers/{id}/files/{fileId}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Transfer id. Never the share slug, which is a capability."
        },
        {
          "name": "fileId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "File id from the create or add response."
        }
      ],
      "delete": {
        "tags": [
          "Transfers"
        ],
        "summary": "Remove a file from an unsent transfer",
        "responses": {
          "200": {
            "description": "Removed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/transfers/{id}/downloads": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Transfer id. Never the share slug, which is a capability."
        }
      ],
      "get": {
        "tags": [
          "Transfers"
        ],
        "summary": "Download receipts",
        "description": "One page visit is one download, not one per file — events from the same visit share a `sessionId`. Most recent 200 events.",
        "responses": {
          "200": {
            "description": "Download events and per-recipient status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/collections": {
      "get": {
        "tags": [
          "Collections"
        ],
        "summary": "List collections",
        "description": "Never includes your vault, which is not reachable from the API at all.",
        "responses": {
          "200": {
            "description": "Collection summaries.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Collections"
        ],
        "summary": "Create a collection",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2000
                  }
                },
                "required": [
                  "title"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new collection, with its secret link.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/collections/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Collection id. Never a slug — see the Concepts page."
        }
      ],
      "get": {
        "tags": [
          "Collections"
        ],
        "summary": "Collection detail",
        "responses": {
          "200": {
            "description": "The collection.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Collections"
        ],
        "summary": "Rename or re-describe",
        "description": "Title and description only. Sharing settings are deliberately not writable here. Renaming never changes the URL — it has already been sent to people.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2000
                  }
                },
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated collection.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Collections"
        ],
        "summary": "Delete a collection and its contents",
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/collections/{id}/files": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Collection id. Never a slug — see the Concepts page."
        }
      ],
      "get": {
        "tags": [
          "Collections"
        ],
        "summary": "List files",
        "parameters": [
          {
            "name": "folderId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Omit for every file. Pass `root` for the top level, or a folder id."
          }
        ],
        "responses": {
          "200": {
            "description": "Files.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Collections"
        ],
        "summary": "Register files for upload",
        "description": "Reserves quota under a per-workspace lock and creates any folders implied by `path`. Returns a tus endpoint and one upload token per file.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512,
                          "description": "Filename as it should appear to the recipient."
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Exact size in bytes. Must match what you upload."
                        },
                        "type": {
                          "type": "string",
                          "maxLength": 255,
                          "default": "",
                          "description": "MIME type. Best effort; never trusted."
                        },
                        "path": {
                          "type": "string",
                          "maxLength": 1024,
                          "description": "Directory within an uploaded folder, e.g. \"Ceremony/Raw\". Omit for a loose file."
                        }
                      },
                      "required": [
                        "name",
                        "size"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 500
                  },
                  "folderId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Target folder. Omit or null for the collection root."
                  }
                },
                "required": [
                  "files"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Upload targets.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Collections"
        ],
        "summary": "Delete files",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fileIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "minItems": 1,
                    "maxItems": 500
                  }
                },
                "required": [
                  "fileIds"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "How many were deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/collections/{id}/folders": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Collection id. Never a slug — see the Concepts page."
        }
      ],
      "get": {
        "tags": [
          "Collections"
        ],
        "summary": "List folders",
        "description": "Ordered by depth then path, which is **not** a pre-order traversal — build a tree from `parentId` rather than trusting the order.",
        "responses": {
          "200": {
            "description": "Folders.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Collections"
        ],
        "summary": "Create a folder",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "parentId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Omit or null for the collection root."
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new folder.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/collections/{id}/guests": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Collection id. Never a slug — see the Concepts page."
        }
      ],
      "get": {
        "tags": [
          "Collections"
        ],
        "summary": "List guests",
        "responses": {
          "200": {
            "description": "Guests.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Collections"
        ],
        "summary": "Invite guests by email",
        "description": "Guests may view and download this one collection. They are free on every plan and are not workspace members.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "emails": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "email"
                    },
                    "minItems": 1,
                    "maxItems": 25,
                    "description": "Each address is emailed an invite. Capped at 25 per call."
                  }
                },
                "required": [
                  "emails"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Who was invited.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/collections/{id}/guests/{guestId}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Collection id. Never a slug — see the Concepts page."
        },
        {
          "name": "guestId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Guest id from the list endpoint."
        }
      ],
      "delete": {
        "tags": [
          "Collections"
        ],
        "summary": "Remove a guest",
        "responses": {
          "200": {
            "description": "Removed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/contacts": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "List contacts",
        "responses": {
          "200": {
            "description": "Contacts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Contacts"
        ],
        "summary": "Create a contact",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "firstName": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lastName": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "email": {
                    "type": "string",
                    "description": "The only required field. Case-insensitive and unique per workspace."
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "client | colleague | partner | friend | family | other. Unknown values become \"other\"."
                  }
                },
                "required": [
                  "email"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new contact.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/contacts/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Contact id."
        }
      ],
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "Get a contact",
        "responses": {
          "200": {
            "description": "The contact.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Contacts"
        ],
        "summary": "Replace a contact",
        "description": "A full replacement, not a merge: any field you omit is cleared. Send the whole contact back.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "firstName": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "lastName": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "email": {
                    "type": "string",
                    "description": "The only required field. Case-insensitive and unique per workspace."
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "client | colleague | partner | friend | family | other. Unknown values become \"other\"."
                  }
                },
                "required": [
                  "email"
                ],
                "additionalProperties": false,
                "$schema": "http://json-schema.org/draft-07/schema#"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated contact.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Contacts"
        ],
        "summary": "Delete a contact",
        "description": "Revokes nothing — if they were invited to a collection, they keep access.",
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "unauthorized",
                            "insufficient_scope",
                            "upgrade_required",
                            "not_found",
                            "invalid_request",
                            "folder_error",
                            "conflict",
                            "not_editable",
                            "quota_exceeded",
                            "transfer_too_large",
                            "rate_limited",
                            "email_budget_exhausted",
                            "internal_error"
                          ]
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}