{
  "components": {
    "schemas": {
      "ActorKind": {
        "enum": [
          "user",
          "agent",
          "service_identity",
          "system",
          "platform_user"
        ],
        "type": "string"
      },
      "ActorRef": {
        "description": "A person, an agent (`ivy` for the built-in assistant), a service identity or Ivy itself.",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/ActorKind"
          }
        },
        "required": [
          "type",
          "id"
        ],
        "type": "object"
      },
      "AgentChangesPending": {
        "description": "Deletes and conflicting overwrites the sandbox made, held until the person confirms them\n(`…/sandbox/changes/{change_set_id}/apply` or `/discard`).",
        "properties": {
          "change_set_id": {
            "type": "string"
          },
          "conflicts": {
            "items": {
              "$ref": "#/components/schemas/PendingConflictItem"
            },
            "type": "array"
          },
          "deletes": {
            "items": {
              "$ref": "#/components/schemas/PendingDeleteItem"
            },
            "type": "array"
          }
        },
        "required": [
          "change_set_id",
          "deletes",
          "conflicts"
        ],
        "type": "object"
      },
      "AgentChangesSaved": {
        "description": "Files the sandbox created or changed, saved as new versions after a step.",
        "properties": {
          "checkpoint": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "files": {
            "items": {
              "$ref": "#/components/schemas/SandboxSavedFile"
            },
            "type": "array"
          },
          "skipped": {
            "description": "Paths over the write-back limits, not saved.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "checkpoint",
          "files",
          "skipped"
        ],
        "type": "object"
      },
      "AgentCredential": {
        "description": "The organisation's model credential an agent's admin configuration (`agents/<id>.toml`)\nnames.",
        "properties": {
          "fall_back_to_ivy": {
            "description": "Whether the agent runs on Ivy's account, in credits, while the credential can't be used.",
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/CredentialState"
          }
        },
        "required": [
          "name",
          "fall_back_to_ivy",
          "state"
        ],
        "type": "object"
      },
      "AgentDone": {
        "description": "Data of the `done` SSE event.",
        "properties": {
          "message": {
            "$ref": "#/components/schemas/ChatMessage"
          }
        },
        "required": [
          "message"
        ],
        "type": "object"
      },
      "AgentError": {
        "description": "Data of the `error` SSE event. The stream ends after it.",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "AgentMessageStart": {
        "description": "Data of the `message_start` SSE event.",
        "properties": {
          "message_id": {
            "type": "string"
          },
          "model": {
            "description": "The model producing this message.",
            "type": "string"
          }
        },
        "required": [
          "message_id",
          "model"
        ],
        "type": "object"
      },
      "AgentModel": {
        "description": "A model the assistant can use.",
        "properties": {
          "description": {
            "type": "string"
          },
          "display_name": {
            "description": "The model's name, the same for both of its variants: `eu` tells them apart.",
            "type": "string"
          },
          "eu": {
            "description": "Whether this is the model's EU variant, served from an endpoint in the EU. An\norganisation with EU-only AI processing (`AiSettings.eu_only`) sees only these.",
            "type": "boolean"
          },
          "id": {
            "description": "Variant id: the model's id (`claude-opus-5-5`), with `-eu` for its EU variant\n(`claude-opus-5-5-eu`); pass it as `SendMessage.model`.",
            "type": "string"
          },
          "is_default": {
            "description": "Used when `SendMessage.model` is absent.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "display_name",
          "description",
          "is_default",
          "eu"
        ],
        "type": "object"
      },
      "AgentModelList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AgentModel"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "AgentProvider": {
        "enum": [
          "anthropic",
          "google",
          "mistral",
          "openai",
          "deepseek"
        ],
        "type": "string"
      },
      "AgentRunState": {
        "description": "`working`: an agent turn is queued or running. `done` and `failed`: the latest turn\nsucceeded or failed after the caller last read the conversation (while conversations with\npeople are on; without read state only `working` is given). A cancelled turn leaves none.",
        "enum": [
          "working",
          "done",
          "failed"
        ],
        "type": "string"
      },
      "AgentRuntime": {
        "enum": [
          "ivy",
          "sandbox"
        ],
        "type": "string"
      },
      "AgentSandboxStatus": {
        "description": "The conversation's sandbox. `reason` says why it stopped or is unavailable; a new one is\nstarted (with a fresh working copy) the next time the assistant needs a shell.",
        "properties": {
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "$ref": "#/components/schemas/SandboxState"
          }
        },
        "required": [
          "state"
        ],
        "type": "object"
      },
      "AgentStreamEvent": {
        "description": "One server-sent event of `sendMessage`: the SSE `event:` field is `event` and the\nSSE `data:` field is the JSON of `data`. The stream ends after `done` or `error`.",
        "oneOf": [
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/AgentMessageStart"
              },
              "event": {
                "enum": [
                  "message_start"
                ],
                "type": "string"
              }
            },
            "required": [
              "data",
              "event"
            ],
            "type": "object"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/AgentTextDelta"
              },
              "event": {
                "enum": [
                  "text_delta"
                ],
                "type": "string"
              }
            },
            "required": [
              "data",
              "event"
            ],
            "type": "object"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/AgentThinking"
              },
              "event": {
                "enum": [
                  "thinking"
                ],
                "type": "string"
              }
            },
            "required": [
              "data",
              "event"
            ],
            "type": "object"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/AgentToolCall"
              },
              "event": {
                "enum": [
                  "tool_call"
                ],
                "type": "string"
              }
            },
            "required": [
              "data",
              "event"
            ],
            "type": "object"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/AgentToolResult"
              },
              "event": {
                "enum": [
                  "tool_result"
                ],
                "type": "string"
              }
            },
            "required": [
              "data",
              "event"
            ],
            "type": "object"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/AgentToolProgress"
              },
              "event": {
                "enum": [
                  "tool_progress"
                ],
                "type": "string"
              }
            },
            "required": [
              "data",
              "event"
            ],
            "type": "object"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/AgentSandboxStatus"
              },
              "event": {
                "enum": [
                  "sandbox_status"
                ],
                "type": "string"
              }
            },
            "required": [
              "data",
              "event"
            ],
            "type": "object"
          },
          {
            "description": "An app instance of the conversation started, changed state or stopped.",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/AppInstance",
                "description": "An app instance of the conversation started, changed state or stopped."
              },
              "event": {
                "enum": [
                  "app_status"
                ],
                "type": "string"
              }
            },
            "required": [
              "data",
              "event"
            ],
            "type": "object"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/AgentChangesSaved"
              },
              "event": {
                "enum": [
                  "changes_saved"
                ],
                "type": "string"
              }
            },
            "required": [
              "data",
              "event"
            ],
            "type": "object"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/AgentChangesPending"
              },
              "event": {
                "enum": [
                  "changes_pending"
                ],
                "type": "string"
              }
            },
            "required": [
              "data",
              "event"
            ],
            "type": "object"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/AgentDone"
              },
              "event": {
                "enum": [
                  "done"
                ],
                "type": "string"
              }
            },
            "required": [
              "data",
              "event"
            ],
            "type": "object"
          },
          {
            "properties": {
              "data": {
                "$ref": "#/components/schemas/AgentError"
              },
              "event": {
                "enum": [
                  "error"
                ],
                "type": "string"
              }
            },
            "required": [
              "data",
              "event"
            ],
            "type": "object"
          }
        ]
      },
      "AgentTextDelta": {
        "description": "Data of the `text_delta` SSE event.",
        "properties": {
          "text": {
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "type": "object"
      },
      "AgentThinking": {
        "description": "Data of the `thinking` SSE event: the summarized progress note so far, replacing the one before it.",
        "properties": {
          "text": {
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "type": "object"
      },
      "AgentToolCall": {
        "description": "Data of the `tool_call` SSE event.",
        "properties": {
          "id": {
            "type": "string"
          },
          "input": {},
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "input"
        ],
        "type": "object"
      },
      "AgentToolProgress": {
        "description": "Live output of a running tool: a `bash` command's output, or an event of the code run that\n`run_code` started (`event` is then the run's event name: `stdout`, `stderr`, `output_file`, …).",
        "properties": {
          "data": {},
          "event": {
            "type": "string"
          },
          "tool_use_id": {
            "type": "string"
          }
        },
        "required": [
          "tool_use_id",
          "event",
          "data"
        ],
        "type": "object"
      },
      "AgentToolResult": {
        "description": "Data of the `tool_result` SSE event.",
        "properties": {
          "files": {
            "description": "The files the call listed, found, looked up, read or wrote.",
            "items": {
              "$ref": "#/components/schemas/FileRef"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "invalidates": {
            "items": {
              "$ref": "#/components/schemas/InvalidatedResource"
            },
            "type": "array"
          },
          "sources": {
            "description": "The pages a web search found or a fetch read.",
            "items": {
              "$ref": "#/components/schemas/WebSource"
            },
            "type": "array"
          },
          "status": {
            "$ref": "#/components/schemas/ToolCallStatus"
          },
          "summary": {
            "type": "string"
          },
          "view": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ToolView"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "status",
          "summary",
          "invalidates"
        ],
        "type": "object"
      },
      "AgentUnavailableReason": {
        "description": "Why an agent can't run in this space now.",
        "enum": [
          "provider_not_configured",
          "provider_not_enabled",
          "runtime_not_available",
          "no_models",
          "config_pending",
          "source_missing",
          "source_inactive"
        ],
        "type": "string"
      },
      "AiProviderSetting": {
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "provider": {
            "$ref": "#/components/schemas/AgentProvider"
          }
        },
        "required": [
          "provider",
          "enabled"
        ],
        "type": "object"
      },
      "AiSettings": {
        "properties": {
          "eu_available": {
            "description": "Whether this installation offers any EU model variant (Mistral's models are served only in\nthe EU). Without one, EU-only processing would leave no models, so it can't be turned on.\nIt is on by default only where the installation offers an EU variant of the built-in\nassistant's models (Claude's), so the assistant keeps a model.",
            "type": "boolean"
          },
          "eu_only": {
            "description": "EU-only AI processing. While it is on, only EU model variants (`AgentModel.eu`) are\nlisted, accepted in chats and run by agents; turning it off adds the regular variants,\nserved from outside the EU. On by default wherever the installation offers EU variants.",
            "type": "boolean"
          },
          "providers": {
            "description": "The model providers this installation offers, and whether the organisation's chats and\nagents may use each one's models. Anthropic's (the built-in assistant's) always may;\nMistral's may until an admin says otherwise, and Google's and OpenAI's only once an admin\nallows them.",
            "items": {
              "$ref": "#/components/schemas/AiProviderSetting"
            },
            "type": "array"
          },
          "updated_at": {
            "description": "When an owner or admin last changed them; `null` while they are the defaults.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "eu_only",
          "eu_available",
          "providers"
        ],
        "type": "object"
      },
      "Answer": {
        "properties": {
          "confidence": {
            "description": "How sure the model is of its answer, from 0 to 1, where it says; act on confident\nanswers and hand the rest to a person or a larger model.",
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "id": {
            "description": "The question's `id`.",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/QuestionKind"
          },
          "probabilities": {
            "additionalProperties": {
              "format": "double",
              "type": "number"
            },
            "description": "For `choice` each option's probability, for `score` each level's.",
            "propertyNames": {
              "type": "string"
            },
            "type": [
              "object",
              "null"
            ]
          },
          "probability": {
            "description": "How likely the answer is: of yes for `boolean`, of the chosen option for `choice`;\n`null` for `score`, whose levels are in `probabilities`.",
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "value": {
            "$ref": "#/components/schemas/DecisionValue"
          }
        },
        "required": [
          "id",
          "kind",
          "value"
        ],
        "type": "object"
      },
      "AnswerMode": {
        "description": "`every_message`: the conversation's one agent answers each of its person's messages;\n`mentions`: agents answer only messages that @mention them.",
        "enum": [
          "every_message",
          "mentions"
        ],
        "type": "string"
      },
      "ApiKeyInfo": {
        "description": "The calling API key.",
        "properties": {
          "expires_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "key_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organisation_id": {
            "type": "string"
          },
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/ApiScope"
            },
            "type": "array"
          },
          "service_identity_id": {
            "type": "string"
          },
          "service_identity_name": {
            "type": "string"
          }
        },
        "required": [
          "key_id",
          "name",
          "scopes",
          "service_identity_id",
          "service_identity_name",
          "organisation_id"
        ],
        "type": "object"
      },
      "ApiScope": {
        "description": "What an API key may do. `write` includes `read` of the same family; `workflows:run` is its\nown grant.",
        "enum": [
          "workspaces:read",
          "files:read",
          "files:write",
          "conversations:read",
          "conversations:write",
          "code_runs:read",
          "code_runs:write",
          "share_links:read",
          "share_links:write",
          "channels:read",
          "channels:write",
          "workflows:read",
          "workflows:write",
          "workflows:run",
          "records:read",
          "records:write"
        ],
        "type": "string"
      },
      "AppAccess": {
        "description": "Who may use a space-owned app: `read` apps any member, `write` apps only the\nspace's editors and admins.",
        "enum": [
          "read",
          "write"
        ],
        "type": "string"
      },
      "AppAdminReason": {
        "description": "What makes an app's snapshot need a space admin, with step-up, to approve it. Without any,\nthe space's editors may approve it too.",
        "enum": [
          "frontend",
          "processes",
          "services",
          "tools",
          "ui",
          "egress",
          "secrets",
          "runs",
          "write_access",
          "collection_write"
        ],
        "type": "string"
      },
      "AppApprovalProblem": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "AppApprovalReview": {
        "description": "What an admin reviews before approving one of the space's own apps.",
        "properties": {
          "app_id": {
            "type": "string"
          },
          "approved": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ApprovedAppSnapshot"
              },
              {
                "type": "null"
              }
            ]
          },
          "can_approve": {
            "description": "The caller may approve `current` (an admin-tier approval still asks for step-up).",
            "type": "boolean"
          },
          "can_revoke": {
            "type": "boolean"
          },
          "changes": {
            "description": "`current` against `approved` by path; without an approval, every file is `added`.",
            "items": {
              "$ref": "#/components/schemas/AppSnapshotChange"
            },
            "type": "array"
          },
          "current": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AppSnapshot",
                "description": "The app as its files are now; absent while they can't make a snapshot (`problem`)."
              },
              {
                "type": "null"
              }
            ]
          },
          "needs_admin": {
            "description": "Of `current`; empty when the space's editors may approve it.",
            "items": {
              "$ref": "#/components/schemas/AppAdminReason"
            },
            "type": "array"
          },
          "org_admins_approve": {
            "description": "The organisation lets only its owners and admins approve apps, whatever `needs_admin`\nsays.",
            "type": "boolean"
          },
          "problem": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AppApprovalProblem"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "app_id",
          "needs_admin",
          "changes",
          "can_approve",
          "can_revoke",
          "org_admins_approve"
        ],
        "type": "object"
      },
      "AppCollection": {
        "additionalProperties": false,
        "description": "A collection of the space the app reads, or reads and writes, through `window.ivy.records`\nand its processes' app token.",
        "properties": {
          "access": {
            "$ref": "#/components/schemas/AppAccess",
            "description": "`write` needs the app's own `access = \"write\"`."
          },
          "name": {
            "description": "The collection's name in the space.",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "AppDefinition": {
        "properties": {
          "access": {
            "$ref": "#/components/schemas/AppAccess"
          },
          "assistant": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LocalisedText",
                "description": "How the built-in assistant uses the app, given in its prompt with the description."
              },
              {
                "type": "null"
              }
            ]
          },
          "collections": {
            "description": "Absent in versions stored before apps declared collections.",
            "items": {
              "$ref": "#/components/schemas/AppCollection"
            },
            "type": "array"
          },
          "creates": {
            "items": {
              "$ref": "#/components/schemas/FileTemplate"
            },
            "type": "array"
          },
          "description": {
            "$ref": "#/components/schemas/LocalisedText"
          },
          "egress": {
            "description": "The hosts its processes reach through the egress proxy, on HTTPS, or `host:port` for a\nport the installation's proxy opens to apps, such as IMAP's 993.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "environment": {
            "description": "The sandbox environment its processes need (`runtime` in older manifests).",
            "type": [
              "string",
              "null"
            ]
          },
          "fallback": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AppFallback"
              },
              {
                "type": "null"
              }
            ]
          },
          "frontend": {
            "$ref": "#/components/schemas/AppFrontend"
          },
          "id": {
            "type": "string"
          },
          "manifest": {
            "description": "Where its manifest is: a `*.ivy-app.toml` file; `.ivy/apps/<id>.toml` in versions stored\nbefore them.",
            "type": "string"
          },
          "name": {
            "$ref": "#/components/schemas/LocalisedText"
          },
          "open": {
            "description": "The file a `page` app opens when it is opened by itself, as a path in the space: its\ndata, which approving the app doesn't pin.",
            "type": [
              "string",
              "null"
            ]
          },
          "opens": {
            "items": {
              "$ref": "#/components/schemas/FileHandler"
            },
            "type": "array"
          },
          "page": {
            "description": "The page of a `page` frontend: a path in the version.",
            "type": [
              "string",
              "null"
            ]
          },
          "processes": {
            "items": {
              "$ref": "#/components/schemas/AppProcess"
            },
            "type": "array"
          },
          "root": {
            "description": "The folder of the version the app is made of, outside `.ivy/`.",
            "type": [
              "string",
              "null"
            ]
          },
          "runs": {
            "description": "Absent in versions stored before run handlers existed.",
            "items": {
              "$ref": "#/components/schemas/RunHandler"
            },
            "type": "array"
          },
          "scratch": {
            "description": "Paths under `/workspace` that are never written back.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "secrets": {
            "items": {
              "$ref": "#/components/schemas/AppSecret"
            },
            "type": "array"
          },
          "services": {
            "description": "Absent in versions stored before services existed.",
            "items": {
              "$ref": "#/components/schemas/AppService"
            },
            "type": "array"
          },
          "share_files": {
            "description": "The folders or globs a share of the app copies (`[share] files`).",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "shareable": {
            "type": "boolean"
          },
          "tools": {
            "items": {
              "$ref": "#/components/schemas/AppTool"
            },
            "type": "array"
          },
          "ui": {
            "items": {
              "$ref": "#/components/schemas/AppUiResource"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "frontend",
          "opens"
        ],
        "type": "object"
      },
      "AppFallback": {
        "description": "What runs a page app where pages can't: an installation without the sandboxed preview\norigin, or a visitor who can't read the space.",
        "enum": [
          "builtin"
        ],
        "type": "string"
      },
      "AppFileChange": {
        "enum": [
          "added",
          "removed",
          "modified"
        ],
        "type": "string"
      },
      "AppFrontend": {
        "enum": [
          "builtin",
          "page",
          "port",
          "terminal",
          "none"
        ],
        "type": "string"
      },
      "AppInstance": {
        "description": "One running copy of an app: in the sandbox session of a conversation, or the space's own.",
        "properties": {
          "access": {
            "$ref": "#/components/schemas/AppAccess"
          },
          "app_id": {
            "type": "string"
          },
          "conversation_id": {
            "description": "The conversation of a session-owned instance.",
            "type": [
              "string",
              "null"
            ]
          },
          "frontend": {
            "$ref": "#/components/schemas/AppFrontend",
            "description": "From the snapshot it runs: a `port` frontend opens through `…/frontend-grants`."
          },
          "id": {
            "type": "string"
          },
          "last_active_at": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "$ref": "#/components/schemas/LocalisedText"
          },
          "owner": {
            "$ref": "#/components/schemas/AppInstanceOwner"
          },
          "reason": {
            "description": "Why it stopped: `idle`, `lifetime`, `requested`, `usage_limit_reached`, `exited`,\n`failed`, `tools_mismatch` (its MCP server offers other tools than the manifest declares),\n`files_changed` (a shared app's copies or its app were refreshed; it starts again with\nthem),\n`access_revoked`, `approval_revoked`, `owner_deactivated`, `workspace_archived`,\n`app_runtime_unavailable`,\n`crashed`, `sandbox_busy` (a space's instance found every app slot taken) or\n`unavailable`.",
            "type": [
              "string",
              "null"
            ]
          },
          "snapshot_hash": {
            "type": "string"
          },
          "started_at": {
            "format": "date-time",
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/AppInstanceState"
          },
          "status": {
            "$ref": "#/components/schemas/AppInstanceStatus"
          },
          "stopped_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "app_id",
          "name",
          "owner",
          "state",
          "access",
          "frontend",
          "snapshot_hash",
          "started_at",
          "last_active_at",
          "status"
        ],
        "type": "object"
      },
      "AppInstanceList": {
        "description": "A conversation's 20 newest app instances, newest first: those running and those stopped in\nthe last 7 days. For a space: its own running instances, by app.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AppInstance"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "AppInstanceOwner": {
        "enum": [
          "session",
          "workspace"
        ],
        "type": "string"
      },
      "AppInstanceState": {
        "enum": [
          "starting",
          "running",
          "stopping",
          "stopped"
        ],
        "type": "string"
      },
      "AppInstanceStatus": {
        "description": "What the instance's processes last reported, read every 30 seconds while it runs. Everything\nin it comes from the app's own code.",
        "properties": {
          "dropped": {
            "description": "Space paths a `read` app changed, which weren't saved.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "processes": {
            "items": {
              "$ref": "#/components/schemas/AppProcessStatus"
            },
            "type": "array"
          },
          "skipped": {
            "description": "Space paths a `write` app changed that couldn't be saved: too large, past a\ncheckpoint's file count, or deleted or conflicting where nobody can confirm it (a\nspace's own instance runs as its identity).",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "processes"
        ],
        "type": "object"
      },
      "AppOpenFile": {
        "description": "A page app's default file (its manifest's `open`), as the space has it now.",
        "properties": {
          "file_id": {
            "type": "string"
          },
          "path": {
            "description": "Its path from the top of the space, such as `crm/data/crm.crm-data`.",
            "type": "string"
          }
        },
        "required": [
          "file_id",
          "path"
        ],
        "type": "object"
      },
      "AppPage": {
        "description": "A page app's page, from the version of the space that declares the app.",
        "properties": {
          "html": {
            "description": "The page as one HTML document. Run it only in the sandboxed preview origin\n(`runnerOrigin`), never on the app's own origin.",
            "type": "string"
          },
          "source_space_id": {
            "description": "The space that declares the app, such as `ivy-core`.",
            "type": "string"
          },
          "source_workspace_id": {
            "deprecated": true,
            "description": "Legacy name of `source_space_id`, sent and accepted until 2027-05-31.",
            "type": "string",
            "x-ivy-legacy-of": "source_space_id"
          },
          "version_id": {
            "type": "string"
          }
        },
        "required": [
          "source_workspace_id",
          "version_id",
          "html",
          "source_space_id"
        ],
        "type": "object"
      },
      "AppProcess": {
        "properties": {
          "command": {
            "description": "The program and its arguments, run in the app's root without a shell.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "mcp": {
            "description": "It speaks MCP over stdio and serves the app's tools.",
            "type": "boolean"
          },
          "port": {
            "description": "The port a `port` frontend or a service is served from.",
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "ready": {
            "$ref": "#/components/schemas/ProcessReady"
          },
          "restart": {
            "$ref": "#/components/schemas/ProcessRestart"
          }
        },
        "required": [
          "id",
          "command"
        ],
        "type": "object"
      },
      "AppProcessState": {
        "enum": [
          "starting",
          "ready",
          "running",
          "exited",
          "failed"
        ],
        "type": "string"
      },
      "AppProcessStatus": {
        "properties": {
          "busy": {
            "description": "Why the process asked not to be stopped, while it does.",
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "exit_code": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "ports": {
            "items": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            },
            "type": "array"
          },
          "progress": {
            "description": "From 0 to 1.",
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "restarts": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "state": {
            "$ref": "#/components/schemas/AppProcessState"
          },
          "text": {
            "description": "The last status line the process sent.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "state",
          "restarts"
        ],
        "type": "object"
      },
      "AppSecret": {
        "additionalProperties": false,
        "description": "A secret the app's processes ask Ivy for while they run; its value is never in a version.",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/SecretKind"
          },
          "name": {
            "type": "string"
          },
          "optional": {
            "description": "The app starts without it, and its process asks whether the person signed in; without\nit a start waits for the sign-in.",
            "type": "boolean"
          },
          "per": {
            "$ref": "#/components/schemas/SecretOwner"
          },
          "scopes": {
            "description": "The OAuth scopes the sign-in asks for.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "name",
          "per",
          "kind",
          "scopes"
        ],
        "type": "object"
      },
      "AppService": {
        "additionalProperties": false,
        "description": "A WebSocket a process serves for Ivy's own clients, reached through the app gateway.",
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/AppServiceKind"
          },
          "path": {
            "description": "The path the WebSocket opens, starting with `/`.",
            "type": "string"
          },
          "process": {
            "description": "The id of the process that serves it, on its `port`.",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "process",
          "path"
        ],
        "type": "object"
      },
      "AppServiceKind": {
        "description": "What a service offers Ivy's own clients (session-apps-processes.md §2 \"Services\").",
        "enum": [
          "speech-to-text"
        ],
        "type": "string"
      },
      "AppSnapshot": {
        "description": "Exactly what an app runs: its definition and its files, hashed together.",
        "properties": {
          "definition": {
            "$ref": "#/components/schemas/AppDefinition"
          },
          "files": {
            "description": "The manifest, the page and every file under the app's root but its default file, by\npath.",
            "items": {
              "$ref": "#/components/schemas/AppSnapshotFile"
            },
            "type": "array"
          },
          "hash": {
            "description": "SHA-256 over the files' paths and hashes, computed like a version id.",
            "type": "string"
          },
          "input_schemas": {
            "description": "Each tool's input schema, by tool name.",
            "type": "object"
          },
          "source": {
            "$ref": "#/components/schemas/AppSnapshotSource"
          }
        },
        "required": [
          "hash",
          "source",
          "definition",
          "input_schemas",
          "files"
        ],
        "type": "object"
      },
      "AppSnapshotChange": {
        "properties": {
          "change": {
            "$ref": "#/components/schemas/AppFileChange"
          },
          "diff": {
            "description": "A unified diff of a changed UTF-8 file, when both sides are small enough to show.",
            "type": [
              "string",
              "null"
            ]
          },
          "path": {
            "type": "string"
          },
          "size_bytes": {
            "description": "The file's size now; a removed file's as approved.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "path",
          "change",
          "size_bytes"
        ],
        "type": "object"
      },
      "AppSnapshotFile": {
        "properties": {
          "file_id": {
            "description": "For the space's own files: the file and the version read.",
            "type": [
              "string",
              "null"
            ]
          },
          "file_version_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "path": {
            "type": "string"
          },
          "sha256": {
            "type": "string"
          },
          "size_bytes": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "path",
          "sha256",
          "size_bytes"
        ],
        "type": "object"
      },
      "AppSnapshotSource": {
        "oneOf": [
          {
            "description": "A version of a space Ivy ships or a space imports.",
            "properties": {
              "kind": {
                "enum": [
                  "version"
                ],
                "type": "string"
              },
              "space_id": {
                "type": "string"
              },
              "version_id": {
                "type": "string"
              },
              "workspace_id": {
                "deprecated": true,
                "description": "Legacy name of `space_id`, sent and accepted until 2027-05-31.",
                "type": "string",
                "x-ivy-legacy-of": "space_id"
              }
            },
            "required": [
              "workspace_id",
              "version_id",
              "kind",
              "space_id"
            ],
            "type": "object"
          },
          {
            "description": "The space's own files, read from their clean versions.",
            "properties": {
              "kind": {
                "enum": [
                  "workspace_files"
                ],
                "type": "string"
              },
              "space_id": {
                "type": "string"
              },
              "workspace_id": {
                "deprecated": true,
                "description": "Legacy name of `space_id`, sent and accepted until 2027-05-31.",
                "type": "string",
                "x-ivy-legacy-of": "space_id"
              }
            },
            "required": [
              "workspace_id",
              "kind",
              "space_id"
            ],
            "type": "object"
          }
        ]
      },
      "AppTool": {
        "additionalProperties": false,
        "description": "A tool the app's MCP process serves, offered to agents as `<app>__<name>`.",
        "properties": {
          "description": {
            "description": "For the model, in English.",
            "type": "string"
          },
          "input_schema": {
            "description": "Its JSON Schema, a path relative to the app's root.",
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "description",
          "input_schema"
        ],
        "type": "object"
      },
      "AppToolCallResult": {
        "description": "What the app's MCP server answered.",
        "properties": {
          "content": {
            "description": "MCP content items as the server sent them: `text`, `image` and others.",
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "is_error": {
            "description": "The tool reported an error (MCP `isError`).",
            "type": "boolean"
          }
        },
        "required": [
          "content",
          "is_error"
        ],
        "type": "object"
      },
      "AppUiResource": {
        "additionalProperties": false,
        "description": "A static MCP Apps UI resource, `ui://<app>/<name>`.",
        "properties": {
          "name": {
            "type": "string"
          },
          "page": {
            "description": "An HTML file, a path relative to the app's root.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "page"
        ],
        "type": "object"
      },
      "ApplyChanges": {
        "additionalProperties": false,
        "description": "D10: deletes listed here are carried out; conflicts follow their choice. Anything not\nlisted is dropped.",
        "properties": {
          "conflicts": {
            "additionalProperties": {
              "$ref": "#/components/schemas/ConflictChoice"
            },
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          },
          "deletes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ApprovedAppSnapshot": {
        "properties": {
          "approved_at": {
            "format": "date-time",
            "type": "string"
          },
          "approved_by": {
            "type": "string"
          },
          "from_message": {
            "description": "Approved from an approval request in a conversation rather than this screen.",
            "type": "boolean"
          },
          "last_editor": {
            "description": "The approver had made the latest edit to one of its files.",
            "type": "boolean"
          },
          "snapshot": {
            "$ref": "#/components/schemas/AppSnapshot"
          }
        },
        "required": [
          "snapshot",
          "approved_by",
          "approved_at",
          "last_editor",
          "from_message"
        ],
        "type": "object"
      },
      "AskStatus": {
        "enum": [
          "draft",
          "open",
          "answered",
          "declined",
          "expired",
          "cancelled"
        ],
        "type": "string"
      },
      "AuthorKind": {
        "enum": [
          "user",
          "agent",
          "system"
        ],
        "type": "string"
      },
      "BatchDelete": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "The record's id; or give its `key`.",
            "type": [
              "string",
              "null"
            ]
          },
          "key": {
            "description": "The record's key value.",
            "type": [
              "object",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "BatchItem": {
        "properties": {
          "error": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BatchItemError"
              },
              {
                "type": "null"
              }
            ]
          },
          "index": {
            "description": "The item's place in the batch, from 0.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "key": {
            "description": "The item's key value as text, for an upsert or a delete by key.",
            "type": [
              "string",
              "null"
            ]
          },
          "outcome": {
            "$ref": "#/components/schemas/ItemOutcome"
          },
          "record_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "index",
          "outcome"
        ],
        "type": "object"
      },
      "BatchItemError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "field": {
            "description": "The request field at fault, such as `fields.name`.",
            "type": [
              "string",
              "null"
            ]
          },
          "message": {
            "type": "string"
          },
          "reason": {
            "description": "A stable code for a validation failure, such as `required`.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "BatchSync": {
        "additionalProperties": false,
        "properties": {
          "delete_missing": {
            "description": "After the upserts, deletes the collection's records with a key the batch didn't name,\nonly when every item succeeded and it named at least one. Records without a key are\nnever deleted. Needs the collection's `access.delete`.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "BatchUpsert": {
        "additionalProperties": false,
        "properties": {
          "fields": {
            "description": "Values by field key, as `PUT …/records/by-key/{value}` takes them.",
            "type": "object"
          },
          "key": {
            "description": "The key's value: a text, or a whole number for a `number` key.",
            "type": "object"
          }
        },
        "required": [
          "key"
        ],
        "type": "object"
      },
      "BindingState": {
        "description": "Where a value's binding stands (§7.5).",
        "enum": [
          "current",
          "needs_confirmation",
          "behind"
        ],
        "type": "string"
      },
      "CallAppTool": {
        "additionalProperties": false,
        "properties": {
          "input": {
            "description": "The tool's input, checked against the schema the app declares for it.",
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      },
      "Change": {
        "description": "Something a new version of a collection file changes that waits for a space admin to apply\nit: a breaking change, or a change of who may write.",
        "properties": {
          "code": {
            "description": "`field_removed`, `field_type_changed`, `field_required`, `limit_tightened`,\n`option_removed`, `index_removed`, `title_changed`, `key_changed`, `comments_removed`,\n`access_changed`, `read_only_changed`, `source_added`, `source_changed` or\n`source_removed`.",
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "path": {
            "description": "Where in the new version, such as `fields.stage.options`.",
            "type": "string"
          }
        },
        "required": [
          "code",
          "path",
          "message"
        ],
        "type": "object"
      },
      "ChangeSet": {
        "properties": {
          "awaiting_user_id": {
            "description": "The person whose turn made the changes, the only one whose Apply and Discard work (D10),\nor for a schedule's turn the approver it names (§9): everyone else sees \"Waiting for …\".",
            "type": "string"
          },
          "change_set_id": {
            "type": "string"
          },
          "conflicts": {
            "items": {
              "$ref": "#/components/schemas/PendingConflictItem"
            },
            "type": "array"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "deletes": {
            "items": {
              "$ref": "#/components/schemas/PendingDeleteItem"
            },
            "type": "array"
          }
        },
        "required": [
          "change_set_id",
          "deletes",
          "conflicts",
          "created_at",
          "awaiting_user_id"
        ],
        "type": "object"
      },
      "Channel": {
        "properties": {
          "archived_at": {
            "description": "Archived channels are read-only.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "$ref": "#/components/schemas/ActorRef"
          },
          "default_agent": {
            "description": "The agent that answers `@Ivy` mentions in its threads and the flows that post to\nit: an agent id, `ivy` for the built-in assistant. Agents answer only when mentioned.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "is_default": {
            "description": "The space's default channel (\"Everyone in this space\", §5.1): open, and never\narchived, deleted or bound.",
            "type": "boolean"
          },
          "last_activity_at": {
            "description": "The latest message in any of its threads, for its readers; absent before its first\nthread. Refetch the threads when it moves instead of polling them.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "latest_message": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ChannelLatestMessage",
                "description": "The newest message of the thread with the latest activity, for readers of that thread;\nabsent while it has none, or when that message was deleted or is a notice."
              },
              {
                "type": "null"
              }
            ]
          },
          "member": {
            "description": "The caller joined it (open) or belongs to it (invited); only members post in it. Every\nspace member belongs to the default channel. A space admin who isn't a member sees an\ninvited channel's name and member count only.",
            "type": "boolean"
          },
          "member_count": {
            "description": "For the default channel, the space's member count.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "membership": {
            "$ref": "#/components/schemas/ChannelMembership",
            "description": "`open`: every space member finds and reads it, and joins it to post and be notified;\n`invited`: only its members read it, never admins; `platform`: bound to Slack or Teams\n(phase 4)."
          },
          "mirrored": {
            "description": "Its messages are copied to and from the platform channel now, as the mirror itself decides:\nmirroring is on and the organisation entitled to it, the binding is consented to and\nconfirmed, and neither the channel nor its Teams team is archived.",
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "notify": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NotifyLevel",
                "description": "The caller's notification level for its threads; absent means their level for channels\n(`new_posts` unless they chose another)."
              },
              {
                "type": "null"
              }
            ]
          },
          "pinned_file_ids": {
            "description": "Up to [20] space files, in pin order. Members see them resolved with\n`listChannelPins`; trashed and deleted ones drop out there.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "platform": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Platform",
                "description": "The platform a `platform` channel is bound to, also while mirroring is off."
              },
              {
                "type": "null"
              }
            ]
          },
          "platform_channel_name": {
            "description": "The name of the Slack or Teams channel a `platform` channel is bound to, without `#`, for\nits readers, when the platform gave it.",
            "type": [
              "string",
              "null"
            ]
          },
          "purpose": {
            "description": "Given to agents as context in every thread.",
            "type": "string"
          },
          "run_state": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AgentRunState",
                "description": "`working` while the latest agent turn in any of its threads is queued or running, for\nits readers; absent otherwise. Its threads' `run_state` says how their turns ended."
              },
              {
                "type": "null"
              }
            ]
          },
          "space_id": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "updates": {
            "description": "The space's Updates channel.",
            "type": "boolean"
          },
          "workspace_id": {
            "deprecated": true,
            "description": "Legacy name of `space_id`, sent and accepted until 2027-05-31.",
            "type": "string",
            "x-ivy-legacy-of": "space_id"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "name",
          "purpose",
          "membership",
          "pinned_file_ids",
          "created_by",
          "updates",
          "is_default",
          "member",
          "member_count",
          "created_at",
          "updated_at",
          "space_id"
        ],
        "type": "object"
      },
      "ChannelLatestMessage": {
        "description": "A channel's newest message, to show beside its name.",
        "properties": {
          "author": {
            "$ref": "#/components/schemas/ActorRef"
          },
          "author_name": {
            "description": "A `platform_user` author's name on Slack or Teams.",
            "type": [
              "string",
              "null"
            ]
          },
          "conversation_id": {
            "description": "The channel thread it was posted in.",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "text": {
            "description": "Its text on one line without formatting, mentions as `@Name`, cut at a word to at most\n140 characters and \"…\".",
            "type": "string"
          }
        },
        "required": [
          "conversation_id",
          "author",
          "text",
          "created_at"
        ],
        "type": "object"
      },
      "ChannelList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Channel"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "ChannelMembership": {
        "description": "`platform` is reserved for a channel bound to Slack or Teams (phase 4).",
        "enum": [
          "open",
          "invited",
          "platform"
        ],
        "type": "string"
      },
      "ChannelPinList": {
        "properties": {
          "items": {
            "description": "The pinned files the caller can open, in pin order.",
            "items": {
              "$ref": "#/components/schemas/File"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "ChatAttachment": {
        "description": "A space file attached to a message, as it was named when it was sent.",
        "properties": {
          "file_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "file_id",
          "name"
        ],
        "type": "object"
      },
      "ChatMessage": {
        "properties": {
          "acting_for": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ActorRef",
                "description": "On an agent's message: the person or service identity its turn acted for."
              },
              {
                "type": "null"
              }
            ]
          },
          "ask_id": {
            "description": "An agent's ask (or approval request) and a person's answer to it: read it with `getAsk`\n(§9).",
            "type": [
              "string",
              "null"
            ]
          },
          "attachments": {
            "description": "The space files the person attached to a user message.",
            "items": {
              "$ref": "#/components/schemas/ChatAttachment"
            },
            "type": "array"
          },
          "author": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ActorRef",
                "description": "Who wrote it; absent on messages stored before authors were recorded, where a `user`\nmessage is the chat creator's and an `assistant` one its agent's."
              },
              {
                "type": "null"
              }
            ]
          },
          "author_name": {
            "description": "A `platform_user` author's name on Slack or Teams, as the platform gave it.",
            "type": [
              "string",
              "null"
            ]
          },
          "branch": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MessageBranch",
                "description": "On the first message of a tail that was edited or regenerated: which of the tails\nthis is, and how many there are (`selectMessageBranch`)."
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "deleted_at": {
            "description": "A deleted message keeps its place as a tombstone.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "edited_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "feedback": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Feedback",
                "description": "The caller's own rating of an assistant message."
              },
              {
                "type": "null"
              }
            ]
          },
          "file_links": {
            "description": "The `ivy-file:` links in an assistant message's text that were checked when it was\nstored: a tool in this chat returned the file, or the person can read it in the chat's\nspace. Other `ivy-file:` links in the text are not files.",
            "items": {
              "$ref": "#/components/schemas/FileRef"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "in_reply_to": {
            "description": "On an agent's reply: the message it answers.",
            "type": [
              "string",
              "null"
            ]
          },
          "mentions": {
            "description": "Participant keys (`user:<id>`, `agent:<id>`) the message mentions, checked by the server.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "model": {
            "description": "The model that produced an assistant message.",
            "type": [
              "string",
              "null"
            ]
          },
          "notice": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SystemNotice",
                "description": "On a `system` message: what happened."
              },
              {
                "type": "null"
              }
            ]
          },
          "origin": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MessageOrigin"
              },
              {
                "type": "null"
              }
            ]
          },
          "parts": {
            "items": {
              "$ref": "#/components/schemas/ChatPart"
            },
            "type": "array"
          },
          "quote": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MessageQuote",
                "description": "A quoted reply: the earlier message of this conversation it replies to, shown above its\ntext as it reads now."
              },
              {
                "type": "null"
              }
            ]
          },
          "reactions": {
            "description": "Filled when the conversation is read; never stored with the message.",
            "items": {
              "$ref": "#/components/schemas/ReactionSummary"
            },
            "type": "array"
          },
          "read_through": {
            "description": "On an agent's reply: the last message its turn read. Messages between that one and the\nreply were posted while it ran.",
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "$ref": "#/components/schemas/ChatRole"
          },
          "stopped_by": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ActorRef",
                "description": "On an agent's reply that a person stopped: who stopped it (\"Stopped by Dana\")."
              },
              {
                "type": "null"
              }
            ]
          },
          "thinking": {
            "description": "On an agent's reply, only for the person its turn acted for: the model's reasoning.",
            "items": {
              "$ref": "#/components/schemas/ChatThinking"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "role",
          "parts",
          "created_at"
        ],
        "type": "object"
      },
      "ChatOrigin": {
        "description": "Where a chat started outside the app: a channel thread or the person's direct chat with Ivy.",
        "properties": {
          "binding_id": {
            "description": "The channel binding; absent for a direct chat.",
            "type": [
              "string",
              "null"
            ]
          },
          "channel_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "platform": {
            "$ref": "#/components/schemas/Platform"
          }
        },
        "required": [
          "platform"
        ],
        "type": "object"
      },
      "ChatPart": {
        "oneOf": [
          {
            "properties": {
              "text": {
                "type": "string"
              },
              "type": {
                "enum": [
                  "text"
                ],
                "type": "string"
              }
            },
            "required": [
              "text",
              "type"
            ],
            "type": "object"
          },
          {
            "properties": {
              "duration_ms": {
                "description": "From the call starting to its result being recorded.",
                "format": "int64",
                "minimum": 0,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "files": {
                "description": "The files the call listed, found, looked up, read or wrote.",
                "items": {
                  "$ref": "#/components/schemas/FileRef"
                },
                "type": "array"
              },
              "id": {
                "type": "string"
              },
              "input": {},
              "name": {
                "type": "string"
              },
              "sources": {
                "description": "The pages a web search found or a fetch read, shown as the reply's sources.",
                "items": {
                  "$ref": "#/components/schemas/WebSource"
                },
                "type": "array"
              },
              "status": {
                "$ref": "#/components/schemas/ToolCallStatus"
              },
              "summary": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "enum": [
                  "tool_call"
                ],
                "type": "string"
              },
              "view": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ToolView"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "name",
              "input",
              "status",
              "type"
            ],
            "type": "object"
          }
        ]
      },
      "ChatRole": {
        "enum": [
          "user",
          "assistant",
          "system"
        ],
        "type": "string"
      },
      "ChatThinking": {
        "description": "A summary of the model's reasoning as the model returned it, not an exact account of it.\nIt can quote what only the person the turn acted for may read.",
        "properties": {
          "before_part": {
            "description": "Where it sits among the message's `parts`: before `parts[before_part]`, or after them\nall when it equals their count.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "duration_ms": {
            "format": "int64",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "text",
          "before_part"
        ],
        "type": "object"
      },
      "CheckFile": {
        "additionalProperties": false,
        "description": "A file of the space, or draft text that isn't saved.",
        "properties": {
          "content": {
            "description": "Draft text, instead of `file_id`; needs `kind` or `path`.",
            "type": [
              "string",
              "null"
            ]
          },
          "file_id": {
            "description": "Checks the file's readable version, or `version_id`.",
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FileKind"
              },
              {
                "type": "null"
              }
            ]
          },
          "path": {
            "description": "Where the draft would be saved, such as `notes/notes.ivy-app.toml`: decides the kind when\n`kind` is absent, and an app manifest's id.",
            "type": [
              "string",
              "null"
            ]
          },
          "version_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "CheckFlow": {
        "properties": {
          "file_id": {
            "type": "string"
          },
          "version_id": {
            "type": "string"
          }
        },
        "required": [
          "file_id",
          "version_id"
        ],
        "type": "object"
      },
      "CheckIssue": {
        "properties": {
          "code": {
            "type": "string"
          },
          "column": {
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "line": {
            "description": "1-based; absent for a problem found outside the file, such as a missing reference.",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "message": {
            "type": "string"
          },
          "path": {
            "description": "Where in the file, such as `steps[2].ask.to`; empty for the whole file.",
            "type": "string"
          }
        },
        "required": [
          "path",
          "code",
          "message"
        ],
        "type": "object"
      },
      "CheckStatus": {
        "enum": [
          "ok",
          "error",
          "disabled"
        ],
        "type": "string"
      },
      "CodeExecutionInfo": {
        "description": "Whether code runs and the assistant's sandbox are available, and the plan's limits.",
        "properties": {
          "available": {
            "type": "boolean"
          },
          "builds": {
            "description": "Whether the installation builds organisation environments from Dockerfiles.",
            "type": "boolean"
          },
          "default_timeout_seconds": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "max_concurrent_runs": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "max_concurrent_sessions": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "max_timeout_seconds": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "reason": {
            "description": "Why it is unavailable, for organisation admins only: the sandbox service's own words,\nwhich may name cluster addresses.",
            "type": [
              "string",
              "null"
            ]
          },
          "reason_code": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/UnavailableReason",
                "description": "Why it is unavailable as a stable code, for organisation admins only; absent when the\nsandbox service didn't name one."
              },
              {
                "type": "null"
              }
            ]
          },
          "sizes": {
            "description": "The same sizes with the resources a sandbox of each gets.",
            "items": {
              "$ref": "#/components/schemas/SandboxSize"
            },
            "type": "array"
          },
          "status": {
            "$ref": "#/components/schemas/CodeExecutionStatus",
            "description": "`off`: whoever operates the installation hasn't switched code execution on;\n`unavailable`: it is switched on but can't run now, such as while the sandbox's isolation\ncheck fails."
          },
          "tiers": {
            "description": "The sizes the installation offers that the organisation's plan includes, smallest first;\na run that names none gets the installation's smallest.",
            "items": {
              "$ref": "#/components/schemas/ComputeTier"
            },
            "type": "array"
          }
        },
        "required": [
          "available",
          "status",
          "tiers",
          "sizes",
          "builds",
          "max_concurrent_runs",
          "max_concurrent_sessions",
          "default_timeout_seconds",
          "max_timeout_seconds"
        ],
        "type": "object"
      },
      "CodeExecutionStatus": {
        "description": "`off`: the installation doesn't run code (`SANDBOX_ENABLED` is off, or no sandbox service is\nset up); `unavailable`: it does, but can't now, such as while the sandbox's isolation check\nfails.",
        "enum": [
          "available",
          "off",
          "unavailable"
        ],
        "type": "string"
      },
      "CodeRun": {
        "description": "One code run: its outcome, timings, compute and the file versions it saved. Output text is\nin the run's log (`…/runs/{run_id}/log`), never here.",
        "properties": {
          "billed_cpu_seconds": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "cpu_millis": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "credits_ucr": {
            "description": "Credits charged, in millionths of a credit.",
            "format": "int64",
            "type": "integer"
          },
          "environment": {
            "description": "The sandbox environment the run ran in.",
            "type": "string"
          },
          "exit_code": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "failure_code": {
            "description": "Why a run failed without an exit code (e.g. `sandbox_interrupted`).",
            "type": [
              "string",
              "null"
            ]
          },
          "file_id": {
            "type": "string"
          },
          "file_name": {
            "type": "string"
          },
          "finished_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "log_available": {
            "type": "boolean"
          },
          "log_truncated": {
            "type": "boolean"
          },
          "outputs": {
            "items": {
              "$ref": "#/components/schemas/RunOutputFile"
            },
            "type": "array"
          },
          "queued_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "run_id": {
            "type": "string"
          },
          "runtime": {
            "description": "The same as `environment`, for clients from before environments.",
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/RunSource"
          },
          "started_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/RunStatus"
          },
          "tier": {
            "type": "string"
          },
          "timeout_seconds": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "version_id": {
            "type": "string"
          },
          "wall_millis": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "run_id",
          "file_id",
          "version_id",
          "file_name",
          "environment",
          "runtime",
          "tier",
          "source",
          "status",
          "timeout_seconds",
          "cpu_millis",
          "wall_millis",
          "billed_cpu_seconds",
          "credits_ucr",
          "outputs",
          "log_available",
          "log_truncated"
        ],
        "type": "object"
      },
      "CodeRunList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/CodeRun"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "CollectionDetail": {
        "properties": {
          "collection": {
            "$ref": "#/components/schemas/CollectionSummary"
          },
          "pending_schema": {
            "description": "The version waiting for a space admin, as its file has it.",
            "type": [
              "object",
              "null"
            ]
          },
          "schema": {
            "description": "The declaration it serves, as a collection file has it; a built-in collection's merged\nwith the space's extension.",
            "type": "object"
          }
        },
        "required": [
          "collection",
          "schema"
        ],
        "type": "object"
      },
      "CollectionList": {
        "properties": {
          "items": {
            "description": "Built-in collections first, then the space's own by name.",
            "items": {
              "$ref": "#/components/schemas/CollectionSummary"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "CollectionState": {
        "enum": [
          "applied",
          "needs_confirmation",
          "detached"
        ],
        "type": "string"
      },
      "CollectionSummary": {
        "properties": {
          "builtin": {
            "description": "Ships with Ivy; `file_id` is then the space's extension file, if it has one.",
            "type": "boolean"
          },
          "detached_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "file_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "pending": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PendingChange"
              },
              {
                "type": "null"
              }
            ]
          },
          "record_count": {
            "description": "How many records it holds, as last counted.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "schema_hash": {
            "description": "Every record write names the hash of the declaration it was checked against.",
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/CollectionState"
          },
          "version_id": {
            "description": "The file version it serves; absent for a built-in collection the space doesn't extend.",
            "type": [
              "string",
              "null"
            ]
          },
          "views": {
            "description": "The space's boards over it, by title.",
            "items": {
              "$ref": "#/components/schemas/ViewSummary"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "name",
          "label",
          "builtin",
          "state",
          "schema_hash",
          "record_count",
          "views"
        ],
        "type": "object"
      },
      "ComputeTier": {
        "description": "A sandbox size the installation declares, such as `s`, `m`, `l` or `xl`.",
        "maxLength": 16,
        "pattern": "^[a-z][a-z0-9-]{0,15}$",
        "type": "string"
      },
      "ConflictChoice": {
        "enum": [
          "keep_mine",
          "keep_theirs",
          "save_copy"
        ],
        "type": "string"
      },
      "ConnectionList": {
        "description": "`GET …/connections`.",
        "properties": {
          "can_manage": {
            "description": "The caller may set, rotate, remove and confirm values: a person who is a space\nadmin (step-up is still asked for when they do).",
            "type": "boolean"
          },
          "connections": {
            "items": {
              "$ref": "#/components/schemas/ConnectionSummary"
            },
            "type": "array"
          },
          "file": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ConnectionsFileState",
                "description": "Absent while the space has no `connections.ivy.yaml` at its root."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "connections",
          "can_manage"
        ],
        "type": "object"
      },
      "ConnectionSummary": {
        "description": "One declared connection or stored value; never the value itself.",
        "properties": {
          "auth": {
            "description": "`bearer`, `basic`, `header`, `query`, `oauth2_client_credentials` or `github_app`;\nabsent when it is no longer declared.",
            "type": [
              "string",
              "null"
            ]
          },
          "binding": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BindingState"
              },
              {
                "type": "null"
              }
            ]
          },
          "bound_version_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "declared": {
            "type": "boolean"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "direct_runs": {
            "type": "boolean"
          },
          "github_app": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/GithubApp",
                "description": "The installation, repositories and permissions of a `github_app` connection."
              },
              {
                "type": "null"
              }
            ]
          },
          "hosts": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "last_used_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "rotated_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "set_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "token_host": {
            "description": "The host of the token endpoint, for `oauth2_client_credentials`: outside reach like\n`hosts`, but never callable by code.",
            "type": [
              "string",
              "null"
            ]
          },
          "value_set": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "hosts",
          "direct_runs",
          "declared",
          "value_set"
        ],
        "type": "object"
      },
      "ConnectionsFileState": {
        "description": "The space's `connections.ivy.yaml`, as of its current version.",
        "properties": {
          "errors": {
            "items": {
              "$ref": "#/components/schemas/CheckIssue"
            },
            "type": "array"
          },
          "file_id": {
            "type": "string"
          },
          "version_id": {
            "type": "string"
          }
        },
        "required": [
          "file_id",
          "version_id",
          "errors"
        ],
        "type": "object"
      },
      "ConnectorAccess": {
        "enum": [
          "connected",
          "provider_disabled",
          "no_service_access"
        ],
        "type": "string"
      },
      "ConnectorFolderState": {
        "description": "Whether the space can see a mounted drive's contents.",
        "properties": {
          "access": {
            "$ref": "#/components/schemas/ConnectorAccess"
          },
          "mount_id": {
            "type": "string"
          },
          "provider": {
            "$ref": "#/components/schemas/Provider"
          },
          "web_url": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "provider",
          "mount_id",
          "access"
        ],
        "type": "object"
      },
      "Conversation": {
        "properties": {
          "agent_id": {
            "description": "The chat's `WorkspaceAgent.id`; absent for the built-in assistant.",
            "type": [
              "string",
              "null"
            ]
          },
          "answer_mode": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AnswerMode",
                "description": "Which messages an agent answers here (§3.4), for the header."
              },
              {
                "type": "null"
              }
            ]
          },
          "archived_at": {
            "description": "Since when the conversation is out of the caller's own lists (`archiveConversation`).\nSomeone posting brings it back, as does an agent answering or mentioning the caller.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "assignee": {
            "description": "A participant key.",
            "type": [
              "string",
              "null"
            ]
          },
          "can_post": {
            "description": "Whether the caller may post here: they take part, or may join by posting. `false` for\na channel thread whose open channel they haven't joined (§5), or whose channel is\narchived.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "channel_id": {
            "description": "Set on a channel thread: the channel it belongs to.",
            "type": [
              "string",
              "null"
            ]
          },
          "chat_origin": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ChatOrigin",
                "description": "Set on a chat started from Slack or Teams."
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ActorRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ConversationKind",
                "description": "Set while conversations with people are on, like the fields below."
              },
              {
                "type": "null"
              }
            ]
          },
          "last_message_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "last_read": {
            "description": "The caller's read position: the index of the last message they read (`PATCH` with\n`last_read` moves it).",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "last_reply_at": {
            "description": "When the latest reply counted in `reply_count` was written; absent without one.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "last_reply_by": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ActorRef",
                "description": "Who wrote the latest reply counted in `reply_count`; absent without one."
              },
              {
                "type": "null"
              }
            ]
          },
          "latest_replies": {
            "description": "Only in a channel's thread list (`view=channel`): its latest replies, at most 3, oldest\nfirst, as its post shows them under itself.",
            "items": {
              "$ref": "#/components/schemas/ReplyPreview"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "mentioned": {
            "description": "A message mentions the caller since they last marked the conversation read.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "notify": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NotifyLevel",
                "description": "The caller's notification level here; absent means the kind's default."
              },
              {
                "type": "null"
              }
            ]
          },
          "participant_keys": {
            "description": "The active participants other than the caller: whom a list row names. Those who wrote\nin it come first, the latest writer first; those who never did follow in the order they\njoined.",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "peer_key": {
            "description": "In a `direct` conversation, the other participant's key (`user:<id>` or `agent:<id>`).\nConversations with the same peer stay separate.",
            "type": [
              "string",
              "null"
            ]
          },
          "pinned": {
            "description": "Pinned chats come first in `listConversations`. With several people, each pins for\nthemself.",
            "type": "boolean"
          },
          "post": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ReplyPreview",
                "description": "Only in a channel's thread list (`view=channel`): its first message, which its post\nshows; absent while it is deleted or couldn't be read."
              },
              {
                "type": "null"
              }
            ]
          },
          "reply_count": {
            "description": "The messages after the conversation's first one, by people and agents alike; system\nnotices and deleted messages don't count. Absent on a conversation no message was\nwritten to since replies were counted, until it is next listed as a channel thread or\nwritten to.",
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "run_state": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AgentRunState",
                "description": "What the conversation's latest agent turn is doing for the caller; absent while no agent\nworks here or the caller has seen how the latest turn ended."
              },
              {
                "type": "null"
              }
            ]
          },
          "space_id": {
            "type": "string"
          },
          "status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ConversationStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "type": "string"
          },
          "unread_count": {
            "description": "Messages after the caller's read position.",
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "visibility": {
            "$ref": "#/components/schemas/ConversationVisibility"
          },
          "workspace_id": {
            "deprecated": true,
            "description": "Legacy name of `space_id`, sent and accepted until 2027-05-31.",
            "type": "string",
            "x-ivy-legacy-of": "space_id"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "visibility",
          "title",
          "created_at",
          "updated_at",
          "space_id"
        ],
        "type": "object"
      },
      "ConversationDetail": {
        "properties": {
          "active_run_id": {
            "description": "A reply still being written: follow it with `GET …/runs/{run_id}/events`.",
            "type": [
              "string",
              "null"
            ]
          },
          "conversation": {
            "$ref": "#/components/schemas/Conversation"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/ChatMessage"
            },
            "type": "array"
          },
          "mirror": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ConversationMirror",
                "description": "A channel thread mirrored to Slack or Teams (phase 4)."
              },
              {
                "type": "null"
              }
            ]
          },
          "queue": {
            "$ref": "#/components/schemas/QueueState",
            "description": "The messages waiting for the current reply to finish."
          },
          "stream_seq": {
            "description": "While conversations with people are on: the live stream sequence this state reflects\n(`GET …/events` with `Last-Event-ID` continues from it).",
            "format": "int64",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "conversation",
          "messages"
        ],
        "type": "object"
      },
      "ConversationKind": {
        "description": "What the UI calls a conversation; derived from its visibility and participants, never stored\nas the truth. `shared` is deprecated: it names a shared thread not yet moved into a channel.",
        "enum": [
          "direct",
          "group",
          "shared",
          "channel"
        ],
        "type": "string"
      },
      "ConversationList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Conversation"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "ConversationMirror": {
        "description": "Where a mirrored thread also lives (docs/product/conversations-design.md §10.3).",
        "properties": {
          "channel_name": {
            "description": "The platform channel's name, without `#`.",
            "type": [
              "string",
              "null"
            ]
          },
          "hidden_external_messages": {
            "description": "Messages from people who aren't linked members of this space: never stored, only\ncounted.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "platform": {
            "$ref": "#/components/schemas/Platform"
          }
        },
        "required": [
          "platform",
          "hidden_external_messages"
        ],
        "type": "object"
      },
      "ConversationStatus": {
        "enum": [
          "open",
          "waiting",
          "done"
        ],
        "type": "string"
      },
      "ConversationStreamEvent": {
        "description": "An event of `streamConversationEvents`: ids, and for a message the message as it is when\ndelivered.",
        "properties": {
          "conversation_id": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/StreamKind"
          },
          "message": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ChatMessage",
                "description": "For `message_*` and `reaction`: the message now, a deleted one as its tombstone; absent\nwhen it no longer exists."
              },
              {
                "type": "null"
              }
            ]
          },
          "message_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "run_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "kind",
          "conversation_id"
        ],
        "type": "object"
      },
      "ConversationView": {
        "description": "Which chats `listConversations` returns.",
        "enum": [
          "mine",
          "direct",
          "groups",
          "shared",
          "assigned",
          "channel",
          "private"
        ],
        "type": "string"
      },
      "ConversationVisibility": {
        "description": "Who reads a chat: `private` its participants, `channel` the channel's readers. `workspace`\n(a shared thread, read by every space member) is deprecated: a request may still send it,\nmeaning the space's default channel, and shared threads move into that channel.",
        "enum": [
          "private",
          "workspace",
          "channel"
        ],
        "type": "string"
      },
      "CreateChannel": {
        "additionalProperties": false,
        "properties": {
          "default_agent": {
            "description": "An agent active in the space (`ivy` for the built-in assistant).",
            "type": [
              "string",
              "null"
            ]
          },
          "members": {
            "description": "No longer taken: everyone in the space finds the channel and joins it themselves. Must be\nempty.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "membership": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ChannelMembership",
                "description": "`open`, the default and the only kind created: spaces are the unit of access, so every\nchannel is open to its space (§5). `invited` is refused."
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "description": "1-80 characters, unique in the space (ignoring case).",
            "type": "string"
          },
          "purpose": {
            "description": "At most 1,000 characters.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "CreateConversation": {
        "additionalProperties": false,
        "description": "Without a body, or without `participants`, a chat of the caller with the space's\nbuilt-in assistant, as before.",
        "properties": {
          "channel_id": {
            "description": "Starts a thread in this channel of the space (while channels are on): its visibility\nis `channel`, its readers the channel's, and agents answer it only when mentioned, except\nan agent `participants` names, which answers its first message. `participants` may also\nname people who read the channel.",
            "type": [
              "string",
              "null"
            ]
          },
          "participants": {
            "description": "The others: `user:<id>` for space members, `agent:<id>` for agents active in the\nspace (`agent:ivy` for the built-in assistant). The caller is always a participant.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "title": {
            "description": "1-200 characters; without it, an agent names the chat, and a conversation without one\ntakes the first line of its first message.",
            "type": [
              "string",
              "null"
            ]
          },
          "visibility": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ConversationVisibility",
                "description": "`private` (default). A space whose agent conversations go to a channel creates\nconversations with an agent there. Deprecated: `workspace` starts the conversation in\nthe space's default channel."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "CreateFolder": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "description": "1-255 characters.",
            "type": "string"
          },
          "parent_id": {
            "description": "Defaults to `root`.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "CreateRecord": {
        "additionalProperties": false,
        "properties": {
          "fields": {
            "description": "Values by field key; fields left out get their `default`.",
            "type": "object"
          },
          "place": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RecordPlace",
                "description": "Puts the record in a column of a board over the collection, where the board puts new\ncards."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "fields"
        ],
        "type": "object"
      },
      "CreateRecordComment": {
        "additionalProperties": false,
        "properties": {
          "body": {
            "description": "Markdown, 1 to 8,000 characters.",
            "type": "string"
          }
        },
        "required": [
          "body"
        ],
        "type": "object"
      },
      "CreateShareLink": {
        "additionalProperties": false,
        "properties": {
          "access": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ShareAccess",
                "description": "Defaults to `view`."
              },
              {
                "type": "null"
              }
            ]
          },
          "audience": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ShareAudience",
                "description": "Defaults to `organisation`. `anyone` needs the organisation's external links setting, and\na person: API keys share inside the organisation only."
              },
              {
                "type": "null"
              }
            ]
          },
          "budget_credits": {
            "description": "App links: the link identity's credits a billing period, 1 to the organisation's\n`max_app_link_budget_credits`; defaults to 100.",
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "conversation_id": {
            "description": "The conversation whose composer offered the link, which the caller reads; recorded with\nthe link's creation.",
            "type": [
              "string",
              "null"
            ]
          },
          "entry_id": {
            "description": "A file's or folder's id, or with `entry_kind` `app` an app's id.",
            "type": "string"
          },
          "entry_kind": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ShareEntryKind",
                "description": "`app` shares an app with `shareable = true` in a share space of its own; left out,\nthe entry's own kind."
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "description": "Left out: external links expire after 7 days (or the organisation's maximum), others\nnever. `null`: no expiry, unless the organisation forces one for external links.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "notify": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ShareNotify",
                "description": "Emails the link; people only."
              },
              {
                "type": "null"
              }
            ]
          },
          "password": {
            "description": "8-128 characters; stored as an Argon2id hash.",
            "type": [
              "string",
              "null"
            ]
          },
          "pin_version": {
            "description": "A file's version number to serve; left out or `null` follows the newest clean version.",
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "role": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ShareRole",
                "description": "App links: the role every visitor acts with, `viewer` (the default) or `editor`, within\nthe organisation's `app_links` setting."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "entry_id"
        ],
        "type": "object"
      },
      "CreatedShareLink": {
        "properties": {
          "emailed": {
            "description": "How many emails were queued.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "share_link": {
            "$ref": "#/components/schemas/ShareLink"
          },
          "url": {
            "description": "`{APP_ORIGIN}/s/{token}`. Shown only here: Ivy keeps only a hash of the token.",
            "type": "string"
          }
        },
        "required": [
          "share_link",
          "url",
          "emailed"
        ],
        "type": "object"
      },
      "CredentialState": {
        "description": "Whether an agent can use the credential its configuration names.",
        "enum": [
          "ready",
          "outside_eu",
          "not_granted",
          "wrong_provider"
        ],
        "type": "string"
      },
      "DecisionOption": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "description": "What the option stands for, when its name doesn't say.",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "description": "What the answer names when it chooses this option; unique within the question.",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "DecisionRequest": {
        "additionalProperties": false,
        "properties": {
          "questions": {
            "description": "1 to 16 questions, answered together against the same state.",
            "items": {
              "$ref": "#/components/schemas/Question"
            },
            "type": "array"
          },
          "state": {
            "description": "What the questions are about: a message, a document, a situation.",
            "type": "string"
          }
        },
        "required": [
          "state",
          "questions"
        ],
        "type": "object"
      },
      "DecisionValue": {
        "oneOf": [
          {
            "type": "boolean"
          },
          {
            "type": "string"
          },
          {
            "format": "double",
            "type": "number"
          }
        ]
      },
      "Decisions": {
        "properties": {
          "answers": {
            "description": "One per question, in the request's order.",
            "items": {
              "$ref": "#/components/schemas/Answer"
            },
            "type": "array"
          },
          "model": {
            "description": "The model version that answered.",
            "type": "string"
          }
        },
        "required": [
          "answers",
          "model"
        ],
        "type": "object"
      },
      "DiffHunk": {
        "properties": {
          "lines": {
            "items": {
              "$ref": "#/components/schemas/DiffLine"
            },
            "type": "array"
          },
          "new_lines": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "new_start": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "old_lines": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "old_start": {
            "description": "From 1.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "old_start",
          "old_lines",
          "new_start",
          "new_lines",
          "lines"
        ],
        "type": "object"
      },
      "DiffLine": {
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/DiffLineKind"
          },
          "text": {
            "description": "Without its line ending.",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "text"
        ],
        "type": "object"
      },
      "DiffLineKind": {
        "enum": [
          "context",
          "added",
          "removed"
        ],
        "type": "string"
      },
      "Disposition": {
        "enum": [
          "attachment",
          "inline"
        ],
        "type": "string"
      },
      "DriveKind": {
        "enum": [
          "onedrive",
          "sharepoint_library",
          "my_drive",
          "shared_drive"
        ],
        "type": "string"
      },
      "EditMessage": {
        "additionalProperties": false,
        "properties": {
          "attachments": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "client_message_id": {
            "description": "As in `SendMessage`: a repeated id follows the run the first request started.",
            "type": [
              "string",
              "null"
            ]
          },
          "model": {
            "type": [
              "string",
              "null"
            ]
          },
          "quote": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/QuoteInput",
                "description": "The message the new version quotes; `null` removes the quote, left out keeps the\nedited message's."
              },
              {
                "type": "null"
              }
            ]
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "type": "object"
      },
      "Entry": {
        "description": "A folder or file in a listing.",
        "properties": {
          "available": {
            "description": "Files only: a clean version can be opened.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "connector": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EntryConnector"
              },
              {
                "type": "null"
              }
            ]
          },
          "content_type": {
            "description": "Files only; sniffed from the content.",
            "type": [
              "string",
              "null"
            ]
          },
          "current_version": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/EntryKind"
          },
          "name": {
            "type": "string"
          },
          "parent_id": {
            "description": "`root` at the top of the space.",
            "type": "string"
          },
          "scan_status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ScanStatus",
                "description": "Files only: of the current version."
              },
              {
                "type": "null"
              }
            ]
          },
          "size_bytes": {
            "description": "Files only.",
            "format": "int64",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "updated_by": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "kind",
          "id",
          "name",
          "parent_id",
          "updated_at"
        ],
        "type": "object"
      },
      "EntryCapabilities": {
        "description": "What the caller may do with an entry, after their space role and the source's\ncapabilities.",
        "properties": {
          "download": {
            "type": "boolean"
          },
          "move": {
            "type": "boolean"
          },
          "rename": {
            "type": "boolean"
          },
          "restore_version": {
            "type": "boolean"
          },
          "trash": {
            "type": "boolean"
          },
          "versions": {
            "type": "boolean"
          },
          "write": {
            "type": "boolean"
          }
        },
        "required": [
          "write",
          "rename",
          "move",
          "trash",
          "versions",
          "restore_version",
          "download"
        ],
        "type": "object"
      },
      "EntryConnector": {
        "description": "An entry of a connected drive.",
        "properties": {
          "export_formats": {
            "description": "`?format=` values `GET …/content` accepts for a native document.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "mount_id": {
            "type": "string"
          },
          "native_document": {
            "description": "A Google Doc, Sheet, Slides or Drawing: opens as an export, edited at Google.",
            "type": "boolean"
          },
          "native_type": {
            "description": "The native document's own type (`application/vnd.google-apps.document`, …); `content_type`\nis its view export.",
            "type": [
              "string",
              "null"
            ]
          },
          "provider": {
            "$ref": "#/components/schemas/Provider"
          },
          "web_url": {
            "description": "Opens the item at the provider.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "provider",
          "mount_id",
          "native_document"
        ],
        "type": "object"
      },
      "EntryKind": {
        "enum": [
          "folder",
          "file"
        ],
        "type": "string"
      },
      "EntryList": {
        "properties": {
          "connector": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ConnectorFolderState",
                "description": "In a connected drive: whether the caller can see its contents. `items` is empty unless\n`access` is `connected`."
              },
              {
                "type": "null"
              }
            ]
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/Entry"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "parent": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Folder",
                "description": "The listed folder; absent at the root."
              },
              {
                "type": "null"
              }
            ]
          },
          "path": {
            "description": "From the root to the listed folder.",
            "items": {
              "$ref": "#/components/schemas/PathSegment"
            },
            "type": "array"
          }
        },
        "required": [
          "items",
          "path"
        ],
        "type": "object"
      },
      "EntrySearchResult": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Entry"
          },
          {
            "properties": {
              "path": {
                "items": {
                  "$ref": "#/components/schemas/PathSegment"
                },
                "type": "array"
              }
            },
            "required": [
              "path"
            ],
            "type": "object"
          }
        ]
      },
      "EntrySearchResults": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/EntrySearchResult"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "EntrySort": {
        "enum": [
          "name",
          "updated_at",
          "size"
        ],
        "type": "string"
      },
      "EntrySource": {
        "description": "Where an entry's content lives: Ivy storage, or a connected drive (see `connector`).",
        "enum": [
          "ivy",
          "connector"
        ],
        "type": "string"
      },
      "ErrorBody": {
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "ErrorDetail": {
        "properties": {
          "code": {
            "type": "string"
          },
          "details": {
            "description": "Conflict context on some `409`/`412` responses: `existing_id`, `current`,\n`current_version_id`; on a `validation_failed` with a `reason`, its parameters (`min`,\n`max`, `value`).",
            "type": [
              "object",
              "null"
            ]
          },
          "field": {
            "description": "On a `validation_failed`: the request field the error is about, when it is about one.",
            "type": [
              "string",
              "null"
            ]
          },
          "message": {
            "type": "string"
          },
          "reason": {
            "description": "On a `validation_failed`: a stable code for what is wrong with the field (`required`,\n`too_long`, `out_of_range`, `not_a_domain`, …). Clients translate it; `message` is English\nfor logs and API consumers.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "Feedback": {
        "enum": [
          "up",
          "down"
        ],
        "type": "string"
      },
      "File": {
        "properties": {
          "capabilities": {
            "$ref": "#/components/schemas/EntryCapabilities"
          },
          "connector": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EntryConnector"
              },
              {
                "type": "null"
              }
            ]
          },
          "content_type": {
            "description": "Of the current version; sniffed from the content.",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "current_version": {
            "description": "The newest version, whatever its scan status.",
            "format": "int32",
            "type": "integer"
          },
          "current_version_id": {
            "description": "The content ETag of the current version (`If-Match` of `PUT …/content`).",
            "type": "string"
          },
          "dimensions": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ImageDimensions",
                "description": "Of the current version, once it's clean; only `GET …/files/{file_id}` and a restore\nreturn it."
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "parent_id": {
            "type": "string"
          },
          "path": {
            "items": {
              "$ref": "#/components/schemas/PathSegment"
            },
            "type": "array"
          },
          "revision": {
            "description": "The JSON ETag is `\"r{revision}\"`.",
            "format": "int64",
            "type": "integer"
          },
          "scan_status": {
            "$ref": "#/components/schemas/ScanStatus",
            "description": "Of the current version."
          },
          "served_version": {
            "description": "The newest clean version, which downloads serve; absent until one is clean.",
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "served_version_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "size_bytes": {
            "description": "Of the current version.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "source": {
            "$ref": "#/components/schemas/EntrySource"
          },
          "space_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/FileStatus"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "updated_by": {
            "type": "string"
          },
          "workspace_id": {
            "deprecated": true,
            "description": "Legacy name of `space_id`, sent and accepted until 2027-05-31.",
            "type": "string",
            "x-ivy-legacy-of": "space_id"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "parent_id",
          "name",
          "path",
          "source",
          "capabilities",
          "size_bytes",
          "content_type",
          "current_version",
          "current_version_id",
          "scan_status",
          "revision",
          "status",
          "created_by",
          "created_at",
          "updated_by",
          "updated_at",
          "space_id"
        ],
        "type": "object"
      },
      "FileCheck": {
        "description": "What the check of one file found (`POST …/file-checks`, the agents' `check_file`).",
        "properties": {
          "file_id": {
            "description": "The file and version checked; absent for a draft.",
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "$ref": "#/components/schemas/FileKind"
          },
          "path_changes": {
            "description": "A flow file's version: how it rewires the steps of the version before it, such as\n\"‘Pay’ now runs after ‘Check’ instead of ‘Approve’.\"",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "problems": {
            "items": {
              "$ref": "#/components/schemas/FileProblem"
            },
            "type": "array"
          },
          "reference": {
            "$ref": "#/components/schemas/HelpReference"
          },
          "valid": {
            "description": "No errors; warnings don't count.",
            "type": "boolean"
          },
          "version_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "kind",
          "valid",
          "problems",
          "reference"
        ],
        "type": "object"
      },
      "FileHandler": {
        "additionalProperties": false,
        "description": "Files an app opens: by extension, else by MIME type (`type/subtype`, or `type/*`).",
        "properties": {
          "default": {
            "description": "Opens these files before the apps of Ivy Core, unless the space or the person chose\nanother app.",
            "type": "boolean"
          },
          "edits": {
            "type": "boolean"
          },
          "extensions": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "mime_types": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "edits"
        ],
        "type": "object"
      },
      "FileKind": {
        "enum": [
          "workflow",
          "connections",
          "app_manifest",
          "dashboard",
          "collection",
          "board"
        ],
        "type": "string"
      },
      "FileProblem": {
        "properties": {
          "code": {
            "type": "string"
          },
          "column": {
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "hint": {
            "description": "What to do about it, in English.",
            "type": [
              "string",
              "null"
            ]
          },
          "line": {
            "description": "1-based; absent for a problem found outside the file, such as a missing reference.",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "message": {
            "type": "string"
          },
          "path": {
            "description": "Where in the file, such as `steps[2].ask.to`; empty for the whole file.",
            "type": "string"
          },
          "reference": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/HelpReference",
                "description": "Where the format reference describes the part of the file it's about."
              },
              {
                "type": "null"
              }
            ]
          },
          "severity": {
            "$ref": "#/components/schemas/Severity"
          }
        },
        "required": [
          "path",
          "severity",
          "code",
          "message"
        ],
        "type": "object"
      },
      "FileRef": {
        "description": "A space file a tool call touched or a reply links to. Replies link one as the Markdown\nlink target `ivy-file:<file_id>` or `ivy-file:<file_id>@<version>`.",
        "properties": {
          "file_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "path": {
            "description": "From the top of the space, such as `/Reports/Q3.csv`.",
            "type": [
              "string",
              "null"
            ]
          },
          "space_id": {
            "description": "The space the file is in, when it isn't the conversation's: one the conversation's\nspace reaches through connections.",
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "description": "The version read or linked; absent for the current version and for connected-drive\nfiles, which have no Ivy versions.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "workspace_id": {
            "deprecated": true,
            "description": "Legacy name of `space_id`, sent and accepted until 2027-05-31.",
            "type": [
              "string",
              "null"
            ],
            "x-ivy-legacy-of": "space_id"
          }
        },
        "required": [
          "file_id",
          "name"
        ],
        "type": "object"
      },
      "FileStatus": {
        "enum": [
          "active",
          "trashed"
        ],
        "type": "string"
      },
      "FileTemplate": {
        "additionalProperties": false,
        "description": "A kind of file the app adds to the \"New file\" menu.",
        "properties": {
          "extension": {
            "type": "string"
          },
          "icon": {
            "description": "A Material Symbols name.",
            "type": "string"
          },
          "template": {
            "description": "A file of the version outside `.ivy/` whose bytes are the new file's content; absent\nfor an empty file.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "extension",
          "icon"
        ],
        "type": "object"
      },
      "FileVersion": {
        "properties": {
          "author": {
            "$ref": "#/components/schemas/FileVersionAuthor"
          },
          "content_type": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "dimensions": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ImageDimensions",
                "description": "Recorded when the version is scanned clean."
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "The content ETag of this version.",
            "type": "string"
          },
          "restored_from": {
            "description": "The version this one restored.",
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "scan_detail": {
            "description": "The signature or failure reason; only for the uploader and space admins.",
            "type": [
              "string",
              "null"
            ]
          },
          "scan_status": {
            "$ref": "#/components/schemas/ScanStatus"
          },
          "sha256": {
            "type": "string"
          },
          "size_bytes": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "source": {
            "$ref": "#/components/schemas/FileVersionSource"
          },
          "source_app": {
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "version",
          "size_bytes",
          "sha256",
          "content_type",
          "source",
          "author",
          "scan_status",
          "created_at"
        ],
        "type": "object"
      },
      "FileVersionAuthor": {
        "properties": {
          "display_name": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/AuthorKind"
          }
        },
        "required": [
          "id",
          "kind",
          "display_name"
        ],
        "type": "object"
      },
      "FileVersionList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/FileVersion"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "FileVersionSource": {
        "enum": [
          "upload",
          "save",
          "restore",
          "agent",
          "app"
        ],
        "type": "string"
      },
      "FlowCheck": {
        "description": "The check of one version (`POST …/flows/check`).",
        "properties": {
          "errors": {
            "items": {
              "$ref": "#/components/schemas/CheckIssue"
            },
            "type": "array"
          },
          "file_id": {
            "type": "string"
          },
          "identity_cannot_reach": {
            "description": "What the space identity can't reach; activation fails until it's empty.",
            "items": {
              "$ref": "#/components/schemas/UnreachableItem"
            },
            "type": "array"
          },
          "needs_admin": {
            "description": "Why activation needs a space admin with step-up; empty when an editor may.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "outside_reach": {
            "description": "The outside-reach report (§7.3), when the file parses.",
            "type": [
              "object",
              "null"
            ]
          },
          "path_changes": {
            "description": "How this version rewires the steps of the file's version before it, one sentence per\nstep whose arrows in changed, such as \"‘Pay’ now runs after ‘Check’ instead of\n‘Approve’.\"",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "paths": {
            "description": "How each step sits among the others, when the file parses (flow-paths-design §5).",
            "items": {
              "$ref": "#/components/schemas/StepPaths"
            },
            "type": "array"
          },
          "people_run_only": {
            "description": "A key can't start it: it asks people or emails them (§8.3).",
            "type": "boolean"
          },
          "valid": {
            "description": "No errors: an activation may proceed (subject to who activates and the plan cap).",
            "type": "boolean"
          },
          "version_id": {
            "type": "string"
          },
          "warnings": {
            "description": "What may not be meant but doesn't stop an activation.",
            "items": {
              "$ref": "#/components/schemas/CheckIssue"
            },
            "type": "array"
          }
        },
        "required": [
          "file_id",
          "version_id",
          "valid",
          "errors",
          "needs_admin",
          "people_run_only",
          "identity_cannot_reach"
        ],
        "type": "object"
      },
      "FlowCodeFile": {
        "description": "A runnable code file a quick form can target.",
        "properties": {
          "file_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "path": {
            "description": "The space path a code step's `code:` takes, `Finance/sync.py`.",
            "type": "string"
          }
        },
        "required": [
          "file_id",
          "name",
          "path"
        ],
        "type": "object"
      },
      "FlowCodeFileList": {
        "properties": {
          "items": {
            "description": "By path.",
            "items": {
              "$ref": "#/components/schemas/FlowCodeFile"
            },
            "type": "array"
          },
          "truncated": {
            "description": "More files exist than the list holds; type a path instead.",
            "type": "boolean"
          }
        },
        "required": [
          "items",
          "truncated"
        ],
        "type": "object"
      },
      "FlowItem": {
        "description": "A flow file of the space with its activation state and its triggers' status line\n(§9.2): never run content.",
        "properties": {
          "active_version_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "blocked_by_org_admin": {
            "type": "boolean"
          },
          "current_version_id": {
            "type": "string"
          },
          "file_id": {
            "type": "string"
          },
          "file_name": {
            "description": "The file name.",
            "type": "string"
          },
          "following": {
            "description": "The caller follows the flow's notices (§8.1).",
            "type": "boolean"
          },
          "last_run": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LastRun"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "description": "The active (or last active) version's `name`.",
            "type": [
              "string",
              "null"
            ]
          },
          "next_run_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "parent_id": {
            "type": "string"
          },
          "paused_reason": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PausedReason"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/FlowStatus"
          },
          "trigger_kinds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "file_id",
          "file_name",
          "parent_id",
          "status",
          "blocked_by_org_admin",
          "current_version_id",
          "trigger_kinds",
          "following"
        ],
        "type": "object"
      },
      "FlowList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/FlowItem"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "FlowRunAccepted": {
        "properties": {
          "existing": {
            "description": "A fire for a record and attempt that has its run already answers that run.",
            "type": "boolean"
          },
          "outcome": {
            "description": "`started`, `queued` or `skipped`.",
            "type": "string"
          },
          "reason": {
            "description": "Why it was skipped.",
            "type": [
              "string",
              "null"
            ]
          },
          "run_id": {
            "type": "string"
          }
        },
        "required": [
          "run_id",
          "outcome"
        ],
        "type": "object"
      },
      "FlowRunItem": {
        "description": "A run in the history: no content.",
        "properties": {
          "at": {
            "format": "date-time",
            "type": "string"
          },
          "credits_ucr": {
            "description": "What the run has cost so far; absent for a start that never made a run.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "failure_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "finished_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "run_id": {
            "type": "string"
          },
          "skip_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "started_by": {
            "description": "Who the run acts as, a participant key (`user:<id>`): the person who started a manual\nrun or a test, else the space identity. Absent for a start that never made a run.",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "`queued`, `running`, `waiting`, `succeeded`, `failed`, `skipped`, `rejected`,\n`cancelled` or `abandoned`.",
            "type": "string"
          },
          "test": {
            "type": "boolean"
          },
          "trigger_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "trigger_kind": {
            "description": "The trigger kind, or `test`.",
            "type": "string"
          }
        },
        "required": [
          "run_id",
          "at",
          "status",
          "test",
          "trigger_kind"
        ],
        "type": "object"
      },
      "FlowRunList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/FlowRunItem"
            },
            "type": "array"
          },
          "next_before": {
            "description": "Pass as `before` for the next page.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "FlowRunStatus": {
        "enum": [
          "queued",
          "running",
          "waiting",
          "succeeded",
          "failed",
          "cancelled",
          "abandoned"
        ],
        "type": "string"
      },
      "FlowRunView": {
        "description": "A run page (§10). `content_visible` is false for callers who may see only that it ran,\nits status and step outcomes.",
        "properties": {
          "acted_as_person": {
            "description": "It acted as the person in `started_by`, rather than as the space's identity.",
            "type": "boolean"
          },
          "can_run_again": {
            "description": "You may run it again: a record trigger started it, and you're a person.",
            "type": "boolean"
          },
          "content_visible": {
            "type": "boolean"
          },
          "conversation_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "credits_ucr": {
            "format": "int64",
            "type": "integer"
          },
          "erased": {
            "description": "Its content was removed on erasure (§10).",
            "type": "boolean"
          },
          "failure_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "finished_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "flow_id": {
            "type": "string"
          },
          "graph": {
            "description": "It advances by the graph of its steps: some run after others, on paths, or at the same\ntime.",
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "input": {
            "type": [
              "object",
              "null"
            ]
          },
          "reused_from": {
            "description": "\"Run from here\": the run whose steps before the chosen one this one reuses.",
            "type": [
              "string",
              "null"
            ]
          },
          "space_id": {
            "type": "string"
          },
          "started_by": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/FlowRunStatus"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/FlowStepView"
            },
            "type": "array"
          },
          "test": {
            "type": "boolean"
          },
          "trigger_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "trigger_kind": {
            "type": "string"
          },
          "version_id": {
            "type": "string"
          },
          "waiting_for": {
            "description": "Whom the run's questions wait on, and since when: ids only, so everyone who sees the run\nsees them.",
            "items": {
              "$ref": "#/components/schemas/RunWaitingAsk"
            },
            "type": "array"
          },
          "waiting_on": {
            "description": "The steps waiting for a person.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "workflow_id": {
            "deprecated": true,
            "description": "Legacy name of `flow_id`, sent and accepted until 2027-05-31.",
            "type": "string",
            "x-ivy-legacy-of": "flow_id"
          },
          "workspace_id": {
            "deprecated": true,
            "description": "Legacy name of `space_id`, sent and accepted until 2027-05-31.",
            "type": "string",
            "x-ivy-legacy-of": "space_id"
          }
        },
        "required": [
          "id",
          "workflow_id",
          "workspace_id",
          "version_id",
          "status",
          "test",
          "trigger_kind",
          "started_by",
          "created_at",
          "credits_ucr",
          "content_visible",
          "steps",
          "can_run_again",
          "flow_id",
          "space_id"
        ],
        "type": "object"
      },
      "FlowState": {
        "description": "A flow's activation state after a change.",
        "properties": {
          "activated_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "activated_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "active_version_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "blocked_by_org_admin": {
            "type": "boolean"
          },
          "file_id": {
            "type": "string"
          },
          "generation": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "outside_reach": {
            "description": "The active generation's outside-reach report (§7.3).",
            "type": [
              "object",
              "null"
            ]
          },
          "space_id": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/FlowStatus"
          },
          "triggers": {
            "items": {
              "$ref": "#/components/schemas/FlowTrigger"
            },
            "type": "array"
          },
          "workspace_id": {
            "deprecated": true,
            "description": "Legacy name of `space_id`, sent and accepted until 2027-05-31.",
            "type": "string",
            "x-ivy-legacy-of": "space_id"
          }
        },
        "required": [
          "file_id",
          "workspace_id",
          "status",
          "blocked_by_org_admin",
          "triggers",
          "space_id"
        ],
        "type": "object"
      },
      "FlowStateKey": {
        "properties": {
          "key": {
            "type": "string"
          },
          "run_id": {
            "description": "The run and step that wrote it last.",
            "type": "string"
          },
          "step_id": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "value": {
            "description": "Any JSON value."
          }
        },
        "required": [
          "key",
          "value",
          "run_id",
          "step_id",
          "updated_at"
        ],
        "type": "object"
      },
      "FlowStateList": {
        "description": "A flow's state (§5.8): what its steps' `set_state` wrote, kept across versions.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/FlowStateKey"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "FlowStatus": {
        "enum": [
          "inactive",
          "active"
        ],
        "type": "string"
      },
      "FlowStepView": {
        "properties": {
          "after": {
            "description": "The steps it runs after, resolved from the default order, `after` and `when`; `start`\nis the start of the run.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "attempt": {
            "format": "int32",
            "type": "integer"
          },
          "details": {
            "description": "The step's input, output, files and credits; only for callers who may read the run's\ncontent.",
            "type": [
              "object",
              "null"
            ]
          },
          "finished_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "item": {
            "description": "An item of a step that runs once per item: its index in the list; `step_id` is then\n`<step id>~<index>`.",
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "path": {
            "description": "The path an ask or a decision took.",
            "type": [
              "string",
              "null"
            ]
          },
          "reused": {
            "description": "Copied from the run this one was started from: it didn't run again.",
            "type": "boolean"
          },
          "reused_from": {
            "description": "The run whose step did the work, when `reused`.",
            "type": [
              "string",
              "null"
            ]
          },
          "reused_from_started_at": {
            "description": "When the run in `reused_from` started.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "skip_reason": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SkipReason"
              },
              {
                "type": "null"
              }
            ]
          },
          "started_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/StepStatus"
          },
          "step_id": {
            "type": "string"
          }
        },
        "required": [
          "step_id",
          "attempt",
          "status"
        ],
        "type": "object"
      },
      "FlowTemplate": {
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "`<package id>/<path in the package without .ivy-flow.yaml or .ivy-workflow.yaml>`.",
            "type": "string"
          },
          "name": {
            "description": "The file's `name`.",
            "type": "string"
          },
          "source": {
            "description": "The file's YAML, copied as it is.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "source"
        ],
        "type": "object"
      },
      "FlowTemplateList": {
        "properties": {
          "items": {
            "description": "By name.",
            "items": {
              "$ref": "#/components/schemas/FlowTemplate"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "FlowTrigger": {
        "description": "One trigger row of a flow (§12): never a secret's value.",
        "properties": {
          "generation": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "key": {
            "description": "The entry of the file's `on:` it stands for.",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/TriggerKind"
          },
          "last_run": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LastRun"
              },
              {
                "type": "null"
              }
            ]
          },
          "next_run_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "paused_reason": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PausedReason"
              },
              {
                "type": "null"
              }
            ]
          },
          "secrets": {
            "description": "A webhook trigger's live signing secrets: ids and dates.",
            "items": {
              "$ref": "#/components/schemas/TriggerSecret"
            },
            "type": "array"
          },
          "settings": {
            "$ref": "#/components/schemas/TriggerSettings"
          },
          "status": {
            "$ref": "#/components/schemas/TriggerStatus"
          },
          "url": {
            "description": "A webhook trigger's delivery URL.",
            "type": [
              "string",
              "null"
            ]
          },
          "version_id": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "key",
          "status",
          "version_id",
          "generation",
          "settings"
        ],
        "type": "object"
      },
      "FlowTriggerList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/FlowTrigger"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "Folder": {
        "properties": {
          "capabilities": {
            "$ref": "#/components/schemas/EntryCapabilities"
          },
          "connector": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EntryConnector"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "parent_id": {
            "type": "string"
          },
          "path": {
            "items": {
              "$ref": "#/components/schemas/PathSegment"
            },
            "type": "array"
          },
          "revision": {
            "format": "int64",
            "type": "integer"
          },
          "source": {
            "$ref": "#/components/schemas/EntrySource"
          },
          "space_id": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "workspace_id": {
            "deprecated": true,
            "description": "Legacy name of `space_id`, sent and accepted until 2027-05-31.",
            "type": "string",
            "x-ivy-legacy-of": "space_id"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "parent_id",
          "name",
          "path",
          "source",
          "capabilities",
          "revision",
          "created_by",
          "created_at",
          "updated_at",
          "space_id"
        ],
        "type": "object"
      },
      "GeneratedFile": {
        "properties": {
          "file_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "path": {
            "description": "The file's path in the space, such as `/Generated images/A lighthouse.png`.",
            "type": "string"
          }
        },
        "required": [
          "file_id",
          "name",
          "path"
        ],
        "type": "object"
      },
      "GeneratedImages": {
        "properties": {
          "images": {
            "description": "The new files, in the space's \"Generated images\" folder.",
            "items": {
              "$ref": "#/components/schemas/GeneratedFile"
            },
            "type": "array"
          },
          "model": {
            "description": "The image model that drew them, with \"(EU)\" for one served in the EU.",
            "type": "string"
          }
        },
        "required": [
          "model",
          "images"
        ],
        "type": "object"
      },
      "GithubApp": {
        "additionalProperties": false,
        "description": "A GitHub App installation, narrowed to the repositories and permissions its token gets.",
        "properties": {
          "app_id": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "installation_id": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "permissions": {
            "additionalProperties": {
              "$ref": "#/components/schemas/GithubPermissionLevel"
            },
            "description": "The permissions each installation token is narrowed to.",
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          },
          "repositories": {
            "description": "Repository names (without the owner); every repository the installation covers when\nempty.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "server": {
            "description": "A GitHub Enterprise Server host; github.com when absent.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "app_id",
          "installation_id",
          "permissions"
        ],
        "type": "object"
      },
      "GithubItemRef": {
        "properties": {
          "connection": {
            "type": "string"
          },
          "logins": {
            "description": "Assignees whose GitHub login no person is linked to: Ivy shows them as logins and keeps\nthem on GitHub when it writes the assignees.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "node_id": {
            "type": "string"
          },
          "number": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "project_item_id": {
            "description": "The project item's node id, when the issue is on the source's project.",
            "type": [
              "string",
              "null"
            ]
          },
          "repo": {
            "description": "`owner/name`.",
            "type": "string"
          },
          "source_id": {
            "description": "The source's id in the collection file.",
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "source_id",
          "connection",
          "repo",
          "number",
          "node_id",
          "url"
        ],
        "type": "object"
      },
      "GithubPermissionLevel": {
        "enum": [
          "read",
          "write"
        ],
        "type": "string"
      },
      "Health": {
        "properties": {
          "status": {
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "HelpReference": {
        "description": "A section of the product help, `/help/{page}#{section}`.",
        "properties": {
          "page": {
            "type": "string"
          },
          "section": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "page"
        ],
        "type": "object"
      },
      "ImageDimensions": {
        "description": "A PNG, JPEG, WebP or GIF image's size in pixels, as a browser shows it: turned by its EXIF\norientation. Absent for other files and for images stored before Ivy recorded it.",
        "properties": {
          "height": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "width": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "width",
          "height"
        ],
        "type": "object"
      },
      "ImageGenerationRequest": {
        "additionalProperties": false,
        "properties": {
          "count": {
            "description": "How many images, 1-4; one when absent.",
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "prompt": {
            "description": "What to draw: the subject, style, composition and any text the image shows; 1-4,000\ncharacters.",
            "type": "string"
          },
          "provider": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AgentProvider",
                "description": "Whose image model draws: `google` or `openai`. When absent, the first the organisation\nallows."
              },
              {
                "type": "null"
              }
            ]
          },
          "reference_images": {
            "description": "Up to 4 file ids of PNG, JPEG or WebP images in the space to base the images on: a photo\nto edit or a style to follow.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "size": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ImageShape",
                "description": "The image's shape; square when absent."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "prompt"
        ],
        "type": "object"
      },
      "ImageShape": {
        "enum": [
          "square",
          "landscape",
          "portrait"
        ],
        "type": "string"
      },
      "InvalidatedResource": {
        "description": "A resource collection the UI should refetch, named like the app's query resources. The\nstep-1 tools only read and invalidate nothing; the writing tools of build step 3 will.",
        "enum": [
          "workspaces",
          "members",
          "entries",
          "files",
          "trash",
          "storage",
          "conversations",
          "records"
        ],
        "type": "string"
      },
      "ItemErrors": {
        "enum": [
          "continue",
          "fail"
        ],
        "type": "string"
      },
      "ItemOutcome": {
        "enum": [
          "created",
          "updated",
          "unchanged",
          "deleted",
          "failed",
          "skipped"
        ],
        "type": "string"
      },
      "Job": {
        "description": "Background work a request started (purges).",
        "properties": {
          "id": {
            "type": "string"
          },
          "job_type": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/JobStatus"
          }
        },
        "required": [
          "id",
          "job_type",
          "status"
        ],
        "type": "object"
      },
      "JobStatus": {
        "enum": [
          "queued",
          "running",
          "succeeded",
          "failed",
          "cancelled",
          "dead"
        ],
        "type": "string"
      },
      "LastRun": {
        "properties": {
          "at": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/TriggerRunStatus"
          }
        },
        "required": [
          "at",
          "status"
        ],
        "type": "object"
      },
      "Locale": {
        "description": "The languages of the app and emails.",
        "enum": [
          "en",
          "de",
          "fr",
          "es",
          "it",
          "el",
          "hu"
        ],
        "type": "string"
      },
      "LocalisedText": {
        "additionalProperties": false,
        "description": "Text shown to people, in every locale Ivy offers.",
        "properties": {
          "de": {
            "type": "string"
          },
          "el": {
            "type": "string"
          },
          "en": {
            "type": "string"
          },
          "es": {
            "type": "string"
          },
          "fr": {
            "type": "string"
          },
          "hu": {
            "type": "string"
          },
          "it": {
            "type": "string"
          }
        },
        "required": [
          "en",
          "de",
          "fr",
          "es",
          "it"
        ],
        "type": "object"
      },
      "MessageBranch": {
        "properties": {
          "count": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "index": {
            "description": "1-based.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "index",
          "count"
        ],
        "type": "object"
      },
      "MessageContext": {
        "additionalProperties": false,
        "properties": {
          "organisation_id": {
            "description": "The organisation the user is looking at in the UI.",
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "description": "The user the user is looking at in the UI.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "MessageOrigin": {
        "properties": {
          "platform_message_id": {
            "description": "The Slack or Teams message a mirrored message was posted as.",
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "$ref": "#/components/schemas/MessageSource"
          }
        },
        "required": [
          "source"
        ],
        "type": "object"
      },
      "MessageQuote": {
        "description": "The message a reply quotes. Only `message_id` is stored; the rest is read from the quoted\nmessage each time the reply is read, so an edit shows and a deletion leaves no text.",
        "properties": {
          "author": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ActorRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "author_name": {
            "description": "A `platform_user` author's name on Slack or Teams.",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "deleted": {
            "description": "The quoted message was deleted, or is no longer on the conversation's active line:\nshown as \"Original message deleted\", without author or text.",
            "type": "boolean"
          },
          "excerpt": {
            "description": "The start of its text, mentions as `@Name`, up to 280 characters.",
            "type": [
              "string",
              "null"
            ]
          },
          "message_id": {
            "type": "string"
          }
        },
        "required": [
          "message_id"
        ],
        "type": "object"
      },
      "MessageSource": {
        "enum": [
          "web",
          "native",
          "api",
          "slack",
          "teams",
          "email"
        ],
        "type": "string"
      },
      "Mount": {
        "description": "A provider location mounted as a space folder.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "drive_id": {
            "type": "string"
          },
          "drive_name": {
            "type": "string"
          },
          "folder_id": {
            "description": "The space folder the drive appears as.",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "item_id": {
            "description": "A folder inside the drive; the drive's root when absent.",
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "$ref": "#/components/schemas/DriveKind"
          },
          "provider": {
            "$ref": "#/components/schemas/Provider"
          },
          "service_access": {
            "description": "The drive is still selected under Service access, so the space can use it.",
            "type": "boolean"
          },
          "space_id": {
            "type": "string"
          },
          "web_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "workspace_id": {
            "deprecated": true,
            "description": "Legacy name of `space_id`, sent and accepted until 2027-05-31.",
            "type": "string",
            "x-ivy-legacy-of": "space_id"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "folder_id",
          "provider",
          "drive_id",
          "drive_name",
          "kind",
          "service_access",
          "created_at",
          "space_id"
        ],
        "type": "object"
      },
      "MountList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Mount"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "MoveRecord": {
        "additionalProperties": false,
        "properties": {
          "after": {
            "description": "The card it goes after: the one above it.",
            "type": [
              "string",
              "null"
            ]
          },
          "before": {
            "description": "The card it goes before: the one below it. Without `before` and `after`, the top of the\ncolumn.",
            "type": [
              "string",
              "null"
            ]
          },
          "column": {
            "description": "The column's name.",
            "type": "string"
          },
          "view": {
            "description": "The board file's id.",
            "type": "string"
          }
        },
        "required": [
          "view",
          "column"
        ],
        "type": "object"
      },
      "NewCards": {
        "enum": [
          "bottom",
          "top"
        ],
        "type": "string"
      },
      "NotifyLevel": {
        "enum": [
          "all",
          "new_posts",
          "mentions",
          "none"
        ],
        "type": "string"
      },
      "OnConflict": {
        "enum": [
          "fail",
          "new_version",
          "rename"
        ],
        "type": "string"
      },
      "OpenWithChoice": {
        "description": "The app that opens files of an extension.",
        "properties": {
          "app_id": {
            "type": "string"
          },
          "extension": {
            "description": "Lowercase, without the dot.",
            "type": "string"
          },
          "source_space_id": {
            "description": "The space that declares the app, as in `SpaceApp`.",
            "type": "string"
          },
          "source_workspace_id": {
            "deprecated": true,
            "description": "Legacy name of `source_space_id`, sent and accepted until 2027-05-31.",
            "type": "string",
            "x-ivy-legacy-of": "source_space_id"
          }
        },
        "required": [
          "extension",
          "app_id",
          "source_workspace_id",
          "source_space_id"
        ],
        "type": "object"
      },
      "OwnAppApproval": {
        "properties": {
          "approved_at": {
            "format": "date-time",
            "type": "string"
          },
          "approved_by": {
            "type": "string"
          },
          "changed": {
            "description": "Its manifest or a file it is made of changed since; the approved snapshot still runs\nuntil someone approves the new one.",
            "type": "boolean"
          },
          "snapshot_hash": {
            "type": "string"
          }
        },
        "required": [
          "snapshot_hash",
          "approved_by",
          "approved_at",
          "changed"
        ],
        "type": "object"
      },
      "OwnAppProblem": {
        "enum": [
          "invalid",
          "duplicate_id",
          "id_taken"
        ],
        "type": "string"
      },
      "OwnSpaceApp": {
        "description": "An app of the space's own, declared in its files by a `*.ivy-app.toml` manifest. It runs only\nthe snapshot a person approved.",
        "properties": {
          "approval": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/OwnAppApproval",
                "description": "The snapshot that runs; absent until a person approves one."
              },
              {
                "type": "null"
              }
            ]
          },
          "default_file_missing": {
            "description": "Its default file's path in the space (the approved snapshot's, once approved) while the\nspace has no file there. The app still registers and opens the files it opens; only\nopening it by itself has nothing to open.",
            "type": [
              "string",
              "null"
            ]
          },
          "file_id": {
            "description": "The manifest file.",
            "type": "string"
          },
          "frontend": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AppFrontend"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "The id the manifest declares, else its file name's.",
            "type": "string"
          },
          "name": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LocalisedText",
                "description": "The manifest's `name`; absent while the manifest can't be read or parsed."
              },
              {
                "type": "null"
              }
            ]
          },
          "path": {
            "description": "The manifest's path from the top of the space, such as `crm/crm.ivy-app.toml`.",
            "type": "string"
          },
          "problem": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/OwnAppProblem",
                "description": "What keeps the manifest from registering an app; its check says more."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "file_id",
          "path"
        ],
        "type": "object"
      },
      "Participant": {
        "properties": {
          "added_by": {
            "description": "The person who invited them.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "joined_at": {
            "format": "date-time",
            "type": "string"
          },
          "key": {
            "description": "`user:<id>` or `agent:<id>`.",
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/ParticipantState"
          },
          "type": {
            "$ref": "#/components/schemas/ParticipantType"
          }
        },
        "required": [
          "key",
          "type",
          "id",
          "state",
          "joined_at"
        ],
        "type": "object"
      },
      "ParticipantList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Participant"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "ParticipantState": {
        "enum": [
          "active",
          "left",
          "removed",
          "revoked"
        ],
        "type": "string"
      },
      "ParticipantType": {
        "enum": [
          "user",
          "agent"
        ],
        "type": "string"
      },
      "PathSegment": {
        "properties": {
          "id": {
            "description": "`root` for the space root.",
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      },
      "PausedReason": {
        "enum": [
          "manual",
          "org_admin",
          "budget",
          "failures",
          "identity_disabled",
          "target_missing",
          "loop_suspected"
        ],
        "type": "string"
      },
      "PendingChange": {
        "properties": {
          "changes": {
            "description": "What applying it does that it may not do by itself.",
            "items": {
              "$ref": "#/components/schemas/Change"
            },
            "type": "array"
          },
          "needs_step_up": {
            "description": "Applying it lets more people write or changes what the collection mirrors, so it needs\nstep-up.",
            "type": "boolean"
          },
          "since": {
            "format": "date-time",
            "type": "string"
          },
          "version_id": {
            "type": "string"
          }
        },
        "required": [
          "version_id",
          "changes",
          "needs_step_up",
          "since"
        ],
        "type": "object"
      },
      "PendingConflictItem": {
        "properties": {
          "base_version_id": {
            "type": "string"
          },
          "current_version_id": {
            "type": "string"
          },
          "file_id": {
            "type": "string"
          },
          "path": {
            "type": "string"
          }
        },
        "required": [
          "path",
          "file_id",
          "base_version_id",
          "current_version_id"
        ],
        "type": "object"
      },
      "PendingDeleteItem": {
        "properties": {
          "file_id": {
            "type": "string"
          },
          "path": {
            "type": "string"
          }
        },
        "required": [
          "path",
          "file_id"
        ],
        "type": "object"
      },
      "PendingRemoteWrite": {
        "properties": {
          "at": {
            "format": "date-time",
            "type": "string"
          },
          "base_remote_updated_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "before": {
            "additionalProperties": {},
            "description": "Their values before the edit, to tell a conflicting change on the source.",
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          },
          "by": {
            "$ref": "#/components/schemas/ActorRef"
          },
          "fields": {
            "additionalProperties": {},
            "description": "The mapped fields as edited, by field key.",
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          },
          "write_id": {
            "type": "string"
          }
        },
        "required": [
          "write_id",
          "fields",
          "before",
          "by",
          "at"
        ],
        "type": "object"
      },
      "PinChannelFile": {
        "additionalProperties": false,
        "properties": {
          "file_id": {
            "type": "string"
          }
        },
        "required": [
          "file_id"
        ],
        "type": "object"
      },
      "Platform": {
        "enum": [
          "slack",
          "teams"
        ],
        "type": "string"
      },
      "ProcessReady": {
        "description": "When the supervisor counts a process as ready.",
        "oneOf": [
          {
            "description": "As soon as it runs.",
            "enum": [
              "started"
            ],
            "type": "string"
          },
          {
            "description": "Once it connects to the app socket and reports ready.",
            "enum": [
              "socket"
            ],
            "type": "string"
          },
          {
            "description": "Once it listens on this port.",
            "properties": {
              "port": {
                "description": "Once it listens on this port.",
                "format": "int32",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "port"
            ],
            "type": "object"
          }
        ]
      },
      "ProcessRestart": {
        "enum": [
          "never",
          "on-failure"
        ],
        "type": "string"
      },
      "Provider": {
        "enum": [
          "microsoft",
          "google",
          "fake"
        ],
        "type": "string"
      },
      "Question": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "description": "The answer's `id`; unique within the request (letters, digits, `_` and `-`).",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/QuestionKind"
          },
          "options": {
            "description": "`choice` only: 1 to 255 options.",
            "items": {
              "$ref": "#/components/schemas/DecisionOption"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "prompt": {
            "description": "The question, in plain words.",
            "type": "string"
          },
          "scale": {
            "description": "`score` only: 1 to 10 levels, from lowest to highest.",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "prompt"
        ],
        "type": "object"
      },
      "QuestionKind": {
        "enum": [
          "boolean",
          "choice",
          "score"
        ],
        "type": "string"
      },
      "QueueMessage": {
        "additionalProperties": false,
        "properties": {
          "agent_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "attachments": {
            "description": "Up to 10 ids of files in the chat's space.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "client_message_id": {
            "description": "Queuing the same id again returns the message already queued.",
            "type": [
              "string",
              "null"
            ]
          },
          "interface_locale": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Locale",
                "description": "The language the app is showing right now; see `SendMessage.interface_locale`."
              },
              {
                "type": "null"
              }
            ]
          },
          "model": {
            "type": [
              "string",
              "null"
            ]
          },
          "quote": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/QuoteInput",
                "description": "As in `SendMessage`."
              },
              {
                "type": "null"
              }
            ]
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "type": "object"
      },
      "QueuePauseReason": {
        "description": "Why a chat's queue stopped starting messages on its own.",
        "enum": [
          "failed",
          "cancelled",
          "stopped"
        ],
        "type": "string"
      },
      "QueueSource": {
        "description": "Where a queued message came from.",
        "enum": [
          "web",
          "api",
          "slack",
          "teams"
        ],
        "type": "string"
      },
      "QueueState": {
        "properties": {
          "items": {
            "description": "In the order they will start.",
            "items": {
              "$ref": "#/components/schemas/QueuedMessage"
            },
            "type": "array"
          },
          "paused": {
            "description": "Set after a reply failed or was stopped while messages waited; `resumeQueue` clears it.",
            "type": "boolean"
          },
          "paused_reason": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/QueuePauseReason"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "paused"
        ],
        "type": "object"
      },
      "QueuedMessage": {
        "description": "A message waiting for the chat's current reply to finish. It starts on its own, in queue\norder, as soon as the chat is free.",
        "properties": {
          "agent_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "attachments": {
            "items": {
              "$ref": "#/components/schemas/ChatAttachment"
            },
            "type": "array"
          },
          "author_id": {
            "type": "string"
          },
          "conversation_id": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "follow_up_of": {
            "description": "Set on the turn of a further mentioned agent for a message already posted: that\nmessage's id. Only its turn waits, not a new message.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "mentions": {
            "description": "Participant keys the message mentions; the agents among them answer in this order.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "model": {
            "type": [
              "string",
              "null"
            ]
          },
          "position": {
            "format": "int64",
            "type": "integer"
          },
          "quote": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MessageQuote",
                "description": "The message it will quote once posted (its id)."
              },
              {
                "type": "null"
              }
            ]
          },
          "resumes_ask_id": {
            "description": "Set on the turn that resumes once an agent's ask was answered, declined or expired: the\nask's id. It runs ahead of every waiting message (§9).",
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "$ref": "#/components/schemas/QueueSource"
          },
          "text": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "description": "Pass it back to `updateQueuedMessage`; every edit increments it.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "conversation_id",
          "author_id",
          "text",
          "source",
          "position",
          "version",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "QuoteInput": {
        "additionalProperties": false,
        "description": "The message to quote: an earlier message of the same conversation, on its active line.",
        "properties": {
          "message_id": {
            "type": "string"
          }
        },
        "required": [
          "message_id"
        ],
        "type": "object"
      },
      "RateMessage": {
        "additionalProperties": false,
        "properties": {
          "rating": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Feedback",
                "description": "`null` clears the caller's rating."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "ReactionSummary": {
        "properties": {
          "emoji": {
            "type": "string"
          },
          "participants": {
            "description": "Participant keys, in the order they reacted.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "emoji",
          "participants"
        ],
        "type": "object"
      },
      "Readiness": {
        "properties": {
          "events": {
            "$ref": "#/components/schemas/CheckStatus",
            "description": "The NATS connection that queues assistant runs and relays their events."
          },
          "status": {
            "$ref": "#/components/schemas/CheckStatus",
            "description": "`ok` when every configured dependency is reachable."
          },
          "store": {
            "$ref": "#/components/schemas/CheckStatus",
            "description": "The database (ScyllaDB, or the in-memory store)."
          }
        },
        "required": [
          "status",
          "store",
          "events"
        ],
        "type": "object"
      },
      "RecentAdminJoin": {
        "description": "An organisation admin who joined to see the space's content (decision D5), shown to\nmembers for 30 days.",
        "properties": {
          "display_name": {
            "type": "string"
          },
          "joined_at": {
            "format": "date-time",
            "type": "string"
          },
          "space_role": {
            "$ref": "#/components/schemas/SpaceRole"
          },
          "user_id": {
            "type": "string"
          },
          "workspace_role": {
            "$ref": "#/components/schemas/SpaceRole",
            "deprecated": true,
            "description": "Legacy name of `space_role`, sent and accepted until 2027-05-31.",
            "x-ivy-legacy-of": "space_role"
          }
        },
        "required": [
          "user_id",
          "display_name",
          "joined_at",
          "workspace_role",
          "space_role"
        ],
        "type": "object"
      },
      "RecordBatch": {
        "additionalProperties": false,
        "properties": {
          "create": {
            "items": {
              "$ref": "#/components/schemas/CreateRecord"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "delete": {
            "items": {
              "$ref": "#/components/schemas/BatchDelete"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "on_item_error": {
            "$ref": "#/components/schemas/ItemErrors"
          },
          "sync": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BatchSync",
                "description": "With `upsert` only."
              },
              {
                "type": "null"
              }
            ]
          },
          "upsert": {
            "description": "Creates each record whose key is new and changes the given fields of the others; needs\nthe collection's `key`.",
            "items": {
              "$ref": "#/components/schemas/BatchUpsert"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "RecordBatchResult": {
        "properties": {
          "created": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "deleted": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "deleted_missing": {
            "description": "With `sync.delete_missing`: how many records it deleted, or left out when an item failed\nor the batch named no record, and nothing was deleted.",
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "failed": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "items": {
            "description": "One per item, in order.",
            "items": {
              "$ref": "#/components/schemas/BatchItem"
            },
            "type": "array"
          },
          "unchanged": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "updated": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "items",
          "created",
          "updated",
          "unchanged",
          "deleted",
          "failed"
        ],
        "type": "object"
      },
      "RecordComment": {
        "properties": {
          "author": {
            "$ref": "#/components/schemas/ActorRef"
          },
          "body": {
            "description": "Markdown.",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "failure": {
            "description": "Why GitHub refused the comment for good; it's never sent again.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "pending": {
            "description": "A mirrored record's comment waits for GitHub before it shows as posted.",
            "type": "boolean"
          },
          "record_id": {
            "type": "string"
          },
          "remote_url": {
            "description": "Where GitHub shows the comment of a mirrored record, once it took it.",
            "type": [
              "string",
              "null"
            ]
          },
          "waiting": {
            "description": "Why the comment waits for a space admin to fix the source's access.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "record_id",
          "body",
          "author",
          "created_at"
        ],
        "type": "object"
      },
      "RecordCommentList": {
        "properties": {
          "items": {
            "description": "Oldest first.",
            "items": {
              "$ref": "#/components/schemas/RecordComment"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "RecordCounts": {
        "properties": {
          "by": {
            "additionalProperties": {
              "format": "int64",
              "minimum": 0,
              "type": "integer"
            },
            "description": "With `count_by`: records by the field's option key, user id or `true`/`false`; a list's\nrecord counts once for each of its values.",
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          },
          "complete": {
            "description": "False when counting stopped before it saw every match: after 60,000 index rows when the\nconditions are one indexed condition or none, else after 5,000. The counts are of those.",
            "type": "boolean"
          },
          "total": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "total",
          "complete"
        ],
        "type": "object"
      },
      "RecordOrigin": {
        "description": "What a record was made from beside a write of its own (§3.2).",
        "oneOf": [
          {
            "description": "An option chosen on a flow's ask, for one of its items.",
            "properties": {
              "ask_id": {
                "type": "string"
              },
              "index": {
                "format": "int32",
                "minimum": 0,
                "type": "integer"
              },
              "kind": {
                "enum": [
                  "ask"
                ],
                "type": "string"
              },
              "run_id": {
                "type": "string"
              }
            },
            "required": [
              "run_id",
              "ask_id",
              "index",
              "kind"
            ],
            "type": "object"
          }
        ]
      },
      "RecordPage": {
        "properties": {
          "counts": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RecordCounts"
              },
              {
                "type": "null"
              }
            ]
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/RecordView"
            },
            "type": "array"
          },
          "next_cursor": {
            "description": "More may match: a page can hold fewer than `limit` records, even none, while this is set.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "RecordPlace": {
        "additionalProperties": false,
        "properties": {
          "column": {
            "description": "The column's name; the board's first column when left out.",
            "type": [
              "string",
              "null"
            ]
          },
          "view": {
            "description": "The board file's id.",
            "type": "string"
          }
        },
        "required": [
          "view"
        ],
        "type": "object"
      },
      "RecordProblem": {
        "properties": {
          "code": {
            "description": "`value_invalid`: the value doesn't fit the field as the collection declares it now;\n`required_missing`: a required field has no value.",
            "type": "string"
          },
          "field": {
            "type": "string"
          }
        },
        "required": [
          "field",
          "code"
        ],
        "type": "object"
      },
      "RecordQuery": {
        "additionalProperties": false,
        "description": "One query for the API, views, flows, agents, apps and dashboards.",
        "properties": {
          "count": {
            "description": "Count the records that match, across every page.",
            "type": "boolean"
          },
          "count_by": {
            "description": "Count them by the value of an indexed `enum`, `person` or `boolean` field too.",
            "type": [
              "string",
              "null"
            ]
          },
          "cursor": {
            "description": "A previous page's `next_cursor`, with the same filter and sort.",
            "type": [
              "string",
              "null"
            ]
          },
          "filter": {
            "description": "`{\"all\": [...]}`: conditions on indexed fields that all hold, each `{field, op, value}`\nor `{\"any\": [...]}` of such conditions; at most 10. `op` is `eq`, `ne`, `gt`, `gte`,\n`lt`, `lte`, `contains`, `in`, `is_empty` or `not_empty`.",
            "type": [
              "object",
              "null"
            ]
          },
          "limit": {
            "description": "1 to 500, 100 when left out.",
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "q": {
            "description": "Only records whose title starts with this, ignoring case.",
            "type": [
              "string",
              "null"
            ]
          },
          "sort": {
            "description": "Up to 2; ties go by record id. Oldest first when left out.",
            "items": {
              "$ref": "#/components/schemas/SortKey"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "RecordSchema": {
        "properties": {
          "schema": {
            "description": "The JSON Schema 2020-12 of a record's `fields`, with Ivy's field types in `x-ivy-type`.",
            "type": "object"
          }
        },
        "required": [
          "schema"
        ],
        "type": "object"
      },
      "RecordSource": {
        "oneOf": [
          {
            "description": "Written in Ivy.",
            "properties": {
              "provider": {
                "enum": [
                  "ivy"
                ],
                "type": "string"
              }
            },
            "required": [
              "provider"
            ],
            "type": "object"
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/GithubItemRef",
                "description": "A GitHub issue one of the collection's sources mirrors (§11)."
              },
              {
                "properties": {
                  "provider": {
                    "enum": [
                      "github"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "provider"
                ],
                "type": "object"
              }
            ],
            "description": "A GitHub issue one of the collection's sources mirrors (§11)."
          }
        ]
      },
      "RecordSourceList": {
        "properties": {
          "items": {
            "description": "In the order the collection file declares them.",
            "items": {
              "$ref": "#/components/schemas/RecordSourceView"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "RecordSourceView": {
        "properties": {
          "access_error": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SyncError",
                "description": "GitHub refuses Ivy's access until an admin fixes the connection; edits and comments\nwait meanwhile."
              },
              {
                "type": "null"
              }
            ]
          },
          "applied": {
            "description": "A space admin applied it; until then it mirrors nothing.",
            "type": "boolean"
          },
          "connection": {
            "type": "string"
          },
          "full": {
            "description": "It mirrors `max_items` records and adds no more.",
            "type": "boolean"
          },
          "id": {
            "description": "The source's id in the collection file.",
            "type": "string"
          },
          "item_count": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "last_error": {
            "description": "Why the last sync stopped, such as `mirror_full`, `github_unavailable` or\n`project_missing`.",
            "type": [
              "string",
              "null"
            ]
          },
          "last_synced_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "max_items": {
            "description": "The most records it mirrors.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "paused": {
            "description": "Why it waits for a space admin to confirm it again, such as `reach_changed`.",
            "type": [
              "string",
              "null"
            ]
          },
          "people": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "GitHub login → the user id of the person it stands for.",
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          },
          "provider": {
            "description": "`github`.",
            "type": "string"
          },
          "repositories": {
            "description": "As the file declares them.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "provider",
          "connection",
          "repositories",
          "max_items",
          "applied",
          "item_count",
          "full",
          "people"
        ],
        "type": "object"
      },
      "RecordSync": {
        "description": "A mirrored record's standing with its source (tasks-design.md §4.4).",
        "properties": {
          "conflict": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SyncConflict",
                "description": "The source changed an edited field meanwhile and its value was kept."
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SyncError",
                "description": "Why the last edit or comment didn't reach the source."
              },
              {
                "type": "null"
              }
            ]
          },
          "pending": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PendingRemoteWrite",
                "description": "An Ivy edit of mapped fields the source hasn't confirmed yet; the record shows it\nmeanwhile and goes back to the source's values if it's refused."
              },
              {
                "type": "null"
              }
            ]
          },
          "remote_updated_at": {
            "description": "The source's `updated_at` of the item as Ivy last applied it.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "RecordView": {
        "properties": {
          "collection": {
            "description": "The collection's name.",
            "type": "string"
          },
          "collection_id": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "$ref": "#/components/schemas/ActorRef"
          },
          "fields": {
            "description": "Values by field key, as the collection declares its fields now; a field without a value\nis left out.",
            "type": "object"
          },
          "id": {
            "type": "string"
          },
          "origin": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RecordOrigin"
              },
              {
                "type": "null"
              }
            ]
          },
          "problems": {
            "description": "Values that no longer fit the collection's declaration; they can still be changed.",
            "items": {
              "$ref": "#/components/schemas/RecordProblem"
            },
            "type": "array"
          },
          "ranks": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Its place on each board it's on, by the board file's id: ranks sort as bytes within a\ncolumn, and cards without one follow, oldest first.",
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          },
          "revision": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "schema": {
            "description": "The hash of the declaration the last write was checked against.",
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/RecordSource"
          },
          "sync": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RecordSync",
                "description": "A mirrored record's standing with its source: an edit GitHub hasn't confirmed yet (the\nfields show it meanwhile), a conflict GitHub's value won, or why the last edit or\ncomment didn't reach it."
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "updated_by": {
            "$ref": "#/components/schemas/ActorRef"
          }
        },
        "required": [
          "id",
          "collection",
          "collection_id",
          "fields",
          "revision",
          "schema",
          "source",
          "created_by",
          "created_at",
          "updated_by",
          "updated_at"
        ],
        "type": "object"
      },
      "RefreshedShareLink": {
        "properties": {
          "copied": {
            "description": "Paths of the files copied again as new versions, or copied for the first time.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "share_link": {
            "$ref": "#/components/schemas/ShareLink"
          },
          "skipped": {
            "description": "Paths of the files a visitor changed since the last copy, left as they are.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "share_link",
          "copied",
          "skipped"
        ],
        "type": "object"
      },
      "RegenerateMessage": {
        "additionalProperties": false,
        "properties": {
          "model": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "ReorderQueue": {
        "additionalProperties": false,
        "properties": {
          "ids": {
            "description": "Every queued message's id, in the new order.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "ids"
        ],
        "type": "object"
      },
      "ReplyPreview": {
        "description": "A message in short form, in a channel's feed: a thread's first message, or a reply under it.",
        "properties": {
          "author": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ActorRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "author_name": {
            "description": "A `platform_user` author's name on Slack or Teams.",
            "type": [
              "string",
              "null"
            ]
          },
          "author_platform": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Platform",
                "description": "Where a `platform_user` author wrote it."
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "excerpt": {
            "description": "Its text as one line of plain text, mentions as `@Name`, up to 280 characters.",
            "type": "string"
          },
          "mentions": {
            "description": "Participant keys (`user:<id>`, `agent:<id>`) the message mentions, checked by the server.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "message_id": {
            "type": "string"
          },
          "text": {
            "description": "Its Markdown as written, links kept, up to 4,000 characters cut at a line break; empty\nfor a message of files alone.",
            "type": "string"
          },
          "text_cut": {
            "description": "Whether `text` was cut; the thread has the whole message.",
            "type": "boolean"
          }
        },
        "required": [
          "message_id",
          "created_at",
          "excerpt"
        ],
        "type": "object"
      },
      "RestoredEntry": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Entry"
          },
          {
            "properties": {
              "renamed": {
                "description": "The name clashed and was changed (`name (restored).ext`).",
                "type": "boolean"
              },
              "restored_to_parent_id": {
                "description": "The original parent, or `root` when that is gone.",
                "type": "string"
              }
            },
            "required": [
              "restored_to_parent_id",
              "renamed"
            ],
            "type": "object"
          }
        ]
      },
      "RunAccepted": {
        "properties": {
          "run_id": {
            "type": "string"
          },
          "timeout_seconds": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "run_id",
          "timeout_seconds"
        ],
        "type": "object"
      },
      "RunEventRecord": {
        "description": "One entry of a run's event stream: statuses and ids, never content.",
        "properties": {
          "at": {
            "format": "date-time",
            "type": "string"
          },
          "body": {
            "type": "object"
          },
          "kind": {
            "type": "string"
          },
          "seq": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "seq",
          "kind",
          "at",
          "body"
        ],
        "type": "object"
      },
      "RunFromStep": {
        "properties": {
          "step_id": {
            "description": "The step the new run starts at; the steps it runs after are reused.",
            "type": "string"
          }
        },
        "required": [
          "step_id"
        ],
        "type": "object"
      },
      "RunHandler": {
        "additionalProperties": false,
        "description": "Files an app runs, by extension: the server picks a run's runtime by extension.",
        "properties": {
          "extensions": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "runner": {
            "$ref": "#/components/schemas/Runner"
          }
        },
        "required": [
          "extensions",
          "runner"
        ],
        "type": "object"
      },
      "RunMessages": {
        "additionalProperties": false,
        "description": "One channel a run reads (§5.2).",
        "properties": {
          "channel": {
            "description": "A channel name or id.",
            "type": "string"
          },
          "since": {
            "description": "How far back, such as `7d` or `12h`; a day by default.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "channel"
        ],
        "type": "object"
      },
      "RunOutputFile": {
        "properties": {
          "file_id": {
            "type": "string"
          },
          "media_type": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "size": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "version_id": {
            "type": "string"
          }
        },
        "required": [
          "path",
          "file_id",
          "version_id",
          "media_type",
          "size"
        ],
        "type": "object"
      },
      "RunSource": {
        "enum": [
          "direct",
          "agent_turn",
          "workflow"
        ],
        "type": "string"
      },
      "RunStatus": {
        "enum": [
          "queued",
          "starting",
          "running",
          "collecting",
          "succeeded",
          "failed",
          "timeout",
          "oom",
          "cancelled"
        ],
        "type": "string"
      },
      "RunWaitingAsk": {
        "properties": {
          "ask_id": {
            "type": "string"
          },
          "people": {
            "description": "Who may answer it, or for a draft the person who sends it.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "reminded_at": {
            "description": "When a space admin last reminded them; reminders go at most once an hour.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "since": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/AskStatus",
            "description": "`draft` waits for the person who started the run to send it; `open` for those asked."
          },
          "step_id": {
            "type": "string"
          }
        },
        "required": [
          "step_id",
          "ask_id",
          "status",
          "people",
          "since"
        ],
        "type": "object"
      },
      "Runner": {
        "description": "The web app's own code runners.",
        "enum": [
          "python",
          "javascript",
          "typescript",
          "sql",
          "r"
        ],
        "type": "string"
      },
      "SandboxChange": {
        "enum": [
          "created",
          "modified",
          "moved"
        ],
        "type": "string"
      },
      "SandboxInfo": {
        "description": "The conversation's sandbox and the changes waiting for the person's confirmation.",
        "properties": {
          "expires_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "last_active_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "pending": {
            "items": {
              "$ref": "#/components/schemas/ChangeSet"
            },
            "type": "array"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "started_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "$ref": "#/components/schemas/SandboxState"
          }
        },
        "required": [
          "state",
          "pending"
        ],
        "type": "object"
      },
      "SandboxSavedFile": {
        "properties": {
          "change": {
            "$ref": "#/components/schemas/SandboxChange"
          },
          "check": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/FileCheck",
                "description": "The problems of a file of a kind Ivy checks (a flow, `connections.ivy.yaml`, an app\nmanifest), as saved."
              },
              {
                "type": "null"
              }
            ]
          },
          "file_id": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "version_id": {
            "type": "string"
          }
        },
        "required": [
          "path",
          "file_id",
          "version_id",
          "change"
        ],
        "type": "object"
      },
      "SandboxSize": {
        "description": "A sandbox size: the vCPUs it is billed for, its memory and its `/workspace` space.",
        "properties": {
          "memory_mib": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "name": {
            "$ref": "#/components/schemas/ComputeTier"
          },
          "space_mib": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "vcpu": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "workspace_mib": {
            "deprecated": true,
            "description": "Legacy name of `space_mib`, sent and accepted until 2027-05-31.",
            "format": "int32",
            "minimum": 0,
            "type": "integer",
            "x-ivy-legacy-of": "space_mib"
          }
        },
        "required": [
          "name",
          "vcpu",
          "memory_mib",
          "workspace_mib",
          "space_mib"
        ],
        "type": "object"
      },
      "SandboxState": {
        "enum": [
          "starting",
          "ready",
          "stopping",
          "stopped",
          "unavailable"
        ],
        "type": "string"
      },
      "ScanStatus": {
        "enum": [
          "scanning",
          "clean",
          "infected",
          "failed"
        ],
        "type": "string"
      },
      "SearchHighlight": {
        "description": "Highlight ranges count UTF-16 code units, as JavaScript strings do.",
        "properties": {
          "end": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "start": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "start",
          "end"
        ],
        "type": "object"
      },
      "SearchKind": {
        "enum": [
          "file",
          "folder",
          "file_content",
          "conversation",
          "message"
        ],
        "type": "string"
      },
      "SearchResult": {
        "properties": {
          "author": {
            "type": [
              "string",
              "null"
            ]
          },
          "conversation_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The file's, folder's, conversation's or message's id.",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/SearchKind"
          },
          "path": {
            "description": "Where it is: the space and folders for a file or folder.",
            "type": [
              "string",
              "null"
            ]
          },
          "snippet": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SearchSnippet"
              },
              {
                "type": "null"
              }
            ]
          },
          "space_id": {
            "type": "string"
          },
          "title": {
            "description": "The file or folder, the conversation's title, or the conversation a message is in.",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "description": "The file version a `file_content` result's text was read from.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "workspace_id": {
            "deprecated": true,
            "description": "Legacy name of `space_id`, sent and accepted until 2027-05-31.",
            "type": "string",
            "x-ivy-legacy-of": "space_id"
          }
        },
        "required": [
          "kind",
          "id",
          "workspace_id",
          "title",
          "updated_at",
          "space_id"
        ],
        "type": "object"
      },
      "SearchResults": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SearchResult"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "SearchSnippet": {
        "properties": {
          "highlights": {
            "items": {
              "$ref": "#/components/schemas/SearchHighlight"
            },
            "type": "array"
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "text",
          "highlights"
        ],
        "type": "object"
      },
      "SearchSort": {
        "enum": [
          "relevance",
          "recent"
        ],
        "type": "string"
      },
      "SecretKind": {
        "description": "How Ivy gets the secret: a Google or Microsoft sign-in in Ivy's own UI, never a page's.",
        "enum": [
          "google_oauth",
          "microsoft_oauth"
        ],
        "type": "string"
      },
      "SecretOwner": {
        "description": "Whose secret it is: each person who uses the app keeps their own.",
        "enum": [
          "person"
        ],
        "type": "string"
      },
      "SelectBranch": {
        "additionalProperties": false,
        "properties": {
          "index": {
            "description": "1-based, up to `branch.count`.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "index"
        ],
        "type": "object"
      },
      "SendMessage": {
        "additionalProperties": false,
        "properties": {
          "agent_id": {
            "description": "A `WorkspaceAgent.id`. The first message of a chat chooses its agent (the built-in\nassistant when absent); later messages may repeat it or leave it out.",
            "type": [
              "string",
              "null"
            ]
          },
          "attachments": {
            "description": "Up to 10 ids of files in the chat's space for the assistant to read.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "client_message_id": {
            "description": "A client-generated id (1-128 of `A-Z a-z 0-9 _ -`). Sending the same id again does not\npost the message twice: the response follows the run the first request started,\nresuming after `Last-Event-ID`.",
            "type": [
              "string",
              "null"
            ]
          },
          "context": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MessageContext"
              },
              {
                "type": "null"
              }
            ]
          },
          "interface_locale": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Locale",
                "description": "The language the app is showing right now, which may differ from the saved profile.\nIvy's help pages come back to the assistant in it; the profile's language, then the\norganisation's, when absent."
              },
              {
                "type": "null"
              }
            ]
          },
          "model": {
            "description": "One of the ids from `GET /v1/agent/models`, or of the chat's agent's models; the\ndefault model when absent.",
            "type": [
              "string",
              "null"
            ]
          },
          "quote": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/QuoteInput",
                "description": "Reply to an earlier message of this conversation with a quote of it."
              },
              {
                "type": "null"
              }
            ]
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "type": "object"
      },
      "Severity": {
        "enum": [
          "error",
          "warning"
        ],
        "type": "string"
      },
      "ShareAccess": {
        "enum": [
          "view",
          "download"
        ],
        "type": "string"
      },
      "ShareAudience": {
        "enum": [
          "organisation",
          "anyone"
        ],
        "type": "string"
      },
      "ShareCreatorType": {
        "enum": [
          "user",
          "service_identity"
        ],
        "type": "string"
      },
      "ShareEntryKind": {
        "enum": [
          "file",
          "folder",
          "app"
        ],
        "type": "string"
      },
      "ShareLink": {
        "properties": {
          "access": {
            "$ref": "#/components/schemas/ShareAccess"
          },
          "app": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ShareLinkApp",
                "description": "App links: their share space."
              },
              {
                "type": "null"
              }
            ]
          },
          "audience": {
            "$ref": "#/components/schemas/ShareAudience"
          },
          "can_revoke": {
            "description": "Whether the caller may revoke it: its creator, or a space admin.",
            "type": "boolean"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "$ref": "#/components/schemas/ShareLinkCreator"
          },
          "download_count": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "entry_id": {
            "type": "string"
          },
          "entry_kind": {
            "$ref": "#/components/schemas/ShareEntryKind"
          },
          "entry_name": {
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "last_opened_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "open_count": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "password_protected": {
            "type": "boolean"
          },
          "paused_reason": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ShareLinkPausedReason"
              },
              {
                "type": "null"
              }
            ]
          },
          "revoked_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ShareRole",
                "description": "App links: the link identity's role, as the organisation's `app_links` setting caps the\ncreator's choice."
              },
              {
                "type": "null"
              }
            ]
          },
          "space_id": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/ShareLinkState"
          },
          "version": {
            "description": "The pinned version number; `null` follows the newest clean version.",
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "workspace_id": {
            "deprecated": true,
            "description": "Legacy name of `space_id`, sent and accepted until 2027-05-31.",
            "type": "string",
            "x-ivy-legacy-of": "space_id"
          }
        },
        "required": [
          "id",
          "workspace_id",
          "entry_id",
          "entry_kind",
          "entry_name",
          "audience",
          "access",
          "password_protected",
          "state",
          "created_by",
          "created_at",
          "open_count",
          "download_count",
          "can_revoke",
          "space_id"
        ],
        "type": "object"
      },
      "ShareLinkApp": {
        "properties": {
          "budget_credits": {
            "description": "The link identity's credits a billing period; the link is paused when they run out.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "chosen_role": {
            "$ref": "#/components/schemas/ShareRole",
            "description": "The role the creator chose; `role` is what the organisation's cap leaves of it."
          },
          "last_copy_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "left_out": {
            "description": "Declared entries the share space has no copy of, as paths in the space: on\nconnected drives, or past 100 files or 25 MiB.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "refresh": {
            "$ref": "#/components/schemas/ShareRefresh"
          },
          "share_space_id": {
            "type": "string"
          },
          "share_space_name": {
            "type": "string"
          },
          "share_workspace_id": {
            "deprecated": true,
            "description": "Legacy name of `share_space_id`, sent and accepted until 2027-05-31.",
            "type": "string",
            "x-ivy-legacy-of": "share_space_id"
          },
          "share_workspace_name": {
            "deprecated": true,
            "description": "Legacy name of `share_space_name`, sent and accepted until 2027-05-31.",
            "type": "string",
            "x-ivy-legacy-of": "share_space_name"
          }
        },
        "required": [
          "share_workspace_id",
          "share_workspace_name",
          "chosen_role",
          "budget_credits",
          "refresh",
          "left_out",
          "share_space_id",
          "share_space_name"
        ],
        "type": "object"
      },
      "ShareLinkCreator": {
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "$ref": "#/components/schemas/ShareCreatorType"
          }
        },
        "required": [
          "type",
          "id"
        ],
        "type": "object"
      },
      "ShareLinkList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ShareLink"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "ShareLinkPausedReason": {
        "enum": [
          "creator_lost_access",
          "entry_trashed",
          "entry_deleted",
          "external_links_off",
          "app_links_off",
          "budget_exhausted"
        ],
        "type": "string"
      },
      "ShareLinkState": {
        "enum": [
          "active",
          "expired",
          "revoked",
          "paused"
        ],
        "type": "string"
      },
      "ShareNotify": {
        "additionalProperties": false,
        "properties": {
          "emails": {
            "description": "1-10 addresses. Organisation links go only to people of the organisation.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "message": {
            "description": "A note for the recipients, up to 500 characters.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "emails"
        ],
        "type": "object"
      },
      "ShareRefresh": {
        "enum": [
          "follow",
          "manual"
        ],
        "type": "string"
      },
      "ShareRole": {
        "description": "What every visitor of an app link may do, as its link identity.",
        "enum": [
          "viewer",
          "editor"
        ],
        "type": "string"
      },
      "SimpleSchedule": {
        "description": "The simple form of a schedule, converted to cron on the server. `weekdays` are ISO (1 =\nMonday … 7 = Sunday); `time` is `HH:MM` in the space's time zone.",
        "oneOf": [
          {
            "properties": {
              "frequency": {
                "enum": [
                  "hourly"
                ],
                "type": "string"
              },
              "minute": {
                "format": "int32",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "minute",
              "frequency"
            ],
            "type": "object"
          },
          {
            "properties": {
              "frequency": {
                "enum": [
                  "daily"
                ],
                "type": "string"
              },
              "time": {
                "type": "string"
              }
            },
            "required": [
              "time",
              "frequency"
            ],
            "type": "object"
          },
          {
            "properties": {
              "frequency": {
                "enum": [
                  "weekdays"
                ],
                "type": "string"
              },
              "time": {
                "type": "string"
              }
            },
            "required": [
              "time",
              "frequency"
            ],
            "type": "object"
          },
          {
            "properties": {
              "frequency": {
                "enum": [
                  "weekly"
                ],
                "type": "string"
              },
              "time": {
                "type": "string"
              },
              "weekdays": {
                "items": {
                  "format": "int32",
                  "minimum": 0,
                  "type": "integer"
                },
                "type": "array"
              }
            },
            "required": [
              "weekdays",
              "time",
              "frequency"
            ],
            "type": "object"
          },
          {
            "properties": {
              "day": {
                "format": "int32",
                "minimum": 0,
                "type": "integer"
              },
              "frequency": {
                "enum": [
                  "monthly"
                ],
                "type": "string"
              },
              "time": {
                "type": "string"
              }
            },
            "required": [
              "day",
              "time",
              "frequency"
            ],
            "type": "object"
          }
        ]
      },
      "SkillNeeds": {
        "additionalProperties": false,
        "description": "What a turn must offer for its agent to be given the skill.",
        "properties": {
          "apps": {
            "description": "App ids the space must have.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "tools": {
            "description": "Tool names the agent must be offered, such as `bash` or `<app>__<tool>`, as its runtime\nnames them; case doesn't matter.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "SkillScope": {
        "additionalProperties": false,
        "description": "What a skill is about; empty for the whole space.",
        "properties": {
          "apps": {
            "description": "App ids.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "extensions": {
            "description": "File extensions without the leading dot, as apps' `opens` gives them.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "SkipReason": {
        "description": "Why a step ended without acting.",
        "enum": [
          "condition",
          "not_on_path",
          "run_failed",
          "cancelled"
        ],
        "type": "string"
      },
      "SortDir": {
        "enum": [
          "asc",
          "desc"
        ],
        "type": "string"
      },
      "SortKey": {
        "additionalProperties": false,
        "properties": {
          "dir": {
            "$ref": "#/components/schemas/SortDir"
          },
          "field": {
            "description": "An indexed field that holds one value, the title field, `created_at` or `updated_at`.",
            "type": "string"
          }
        },
        "required": [
          "field"
        ],
        "type": "object"
      },
      "SortOrder": {
        "enum": [
          "asc",
          "desc"
        ],
        "type": "string"
      },
      "Space": {
        "properties": {
          "auto_join": {
            "description": "New people in the organisation join it as editors.",
            "type": "boolean"
          },
          "colour": {
            "description": "`#rrggbb` or a colour token name.",
            "type": "string"
          },
          "content_access": {
            "description": "False for organisation admins who haven't joined (decision D5): they see the space,\nits members and settings, but not its files or chats.",
            "type": "boolean"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "description": {
            "description": "At most 500 characters.",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "is_default": {
            "description": "The organisation's \"General\" space; it can't be archived.",
            "type": "boolean"
          },
          "managed_by_organisation": {
            "description": "An import space other spaces use: only organisation owners and admins change its\nfiles and agents, whatever the caller's role in it.",
            "type": "boolean"
          },
          "member_count": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "my_role": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SpaceRole",
                "description": "The caller's role; null when they aren't a member."
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "description": "Unique per organisation, case-insensitively. At most 80 characters.",
            "type": "string"
          },
          "organisation_id": {
            "type": "string"
          },
          "recent_admin_joins": {
            "items": {
              "$ref": "#/components/schemas/RecentAdminJoin"
            },
            "type": "array"
          },
          "revision": {
            "format": "int64",
            "type": "integer"
          },
          "share": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SpaceShare",
                "description": "A share space an app link created: Ivy manages it, and archives it with the link."
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/SpaceStatus"
          },
          "time_zone": {
            "description": "IANA name its schedule triggers fire in; `Europe/Berlin` until an admin sets one.",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organisation_id",
          "name",
          "description",
          "colour",
          "is_default",
          "status",
          "auto_join",
          "member_count",
          "my_role",
          "content_access",
          "managed_by_organisation",
          "recent_admin_joins",
          "time_zone",
          "revision",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "SpaceAgent": {
        "description": "An agent of the space, with its envelope.",
        "properties": {
          "active": {
            "type": "boolean"
          },
          "allowed_models": {
            "description": "The models the envelope allows.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "credential": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AgentCredential",
                "description": "The organisation credential its admin configuration runs it on, billed by the provider;\nabsent when it runs on Ivy's account, in credits."
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "$ref": "#/components/schemas/LocalisedText"
          },
          "id": {
            "description": "Pass it as `SendMessage.agent_id`.",
            "type": "string"
          },
          "may_start_conversations": {
            "description": "Whether it may ask people, request approvals and post results outside its conversation.",
            "type": "boolean"
          },
          "models": {
            "description": "The model variants a chat can use now: the allowed models' variants the installation\nserves and the organisation permits; empty when it is unavailable.",
            "items": {
              "$ref": "#/components/schemas/AgentModel"
            },
            "type": "array"
          },
          "name": {
            "$ref": "#/components/schemas/LocalisedText"
          },
          "offered_models": {
            "description": "The models a space admin can allow.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "provider": {
            "$ref": "#/components/schemas/AgentProvider"
          },
          "runtime": {
            "$ref": "#/components/schemas/AgentRuntime"
          },
          "source": {
            "$ref": "#/components/schemas/SpaceRef",
            "description": "The import space it comes from (this space, for an import space's own)."
          },
          "unavailable_reason": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AgentUnavailableReason"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "runtime",
          "provider",
          "source",
          "active",
          "allowed_models",
          "offered_models",
          "models",
          "may_start_conversations"
        ],
        "type": "object"
      },
      "SpaceAgentList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SpaceAgent"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "SpaceApp": {
        "description": "An app the space's members open files with: one of an always-on space's, or of a\nversion the space imports.",
        "properties": {
          "access": {
            "$ref": "#/components/schemas/AppAccess",
            "description": "Who may start it: `write` apps editors and admins, `read` apps any member."
          },
          "collections": {
            "description": "The space's collections it reads or writes, through `window.ivy.records` too.",
            "items": {
              "$ref": "#/components/schemas/AppCollection"
            },
            "type": "array"
          },
          "description": {
            "$ref": "#/components/schemas/LocalisedText"
          },
          "fallback": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AppFallback"
              },
              {
                "type": "null"
              }
            ]
          },
          "frontend": {
            "$ref": "#/components/schemas/AppFrontend"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "$ref": "#/components/schemas/LocalisedText"
          },
          "open": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AppOpenFile",
                "description": "The file a page app opens when it is opened by itself, from the Apps tab or by the\nassistant; absent when the manifest names none or the space no longer has it."
              },
              {
                "type": "null"
              }
            ]
          },
          "opens": {
            "items": {
              "$ref": "#/components/schemas/FileHandler"
            },
            "type": "array"
          },
          "runnable": {
            "description": "It declares processes, so it can be started (`POST …/apps/{app_id}/instances`).",
            "type": "boolean"
          },
          "runs": {
            "items": {
              "$ref": "#/components/schemas/RunHandler"
            },
            "type": "array"
          },
          "services": {
            "description": "The services its processes offer Ivy's own clients, such as `speech-to-text` for\ndictation (`POST …/instances/{instance_id}/service-tickets`).",
            "items": {
              "$ref": "#/components/schemas/AppServiceKind"
            },
            "type": "array"
          },
          "shareable": {
            "description": "It declares `shareable = true`, so editors may share it with an app link.",
            "type": "boolean"
          },
          "source_space_id": {
            "description": "The space that declares the app, such as `ivy-core`.",
            "type": "string"
          },
          "source_workspace_id": {
            "deprecated": true,
            "description": "Legacy name of `source_space_id`, sent and accepted until 2027-05-31.",
            "type": "string",
            "x-ivy-legacy-of": "source_space_id"
          },
          "version_id": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "frontend",
          "opens",
          "runnable",
          "access",
          "shareable",
          "source_workspace_id",
          "version_id",
          "source_space_id"
        ],
        "type": "object"
      },
      "SpaceAppList": {
        "properties": {
          "choices": {
            "description": "The caller's own \"open with\" choices.",
            "items": {
              "$ref": "#/components/schemas/OpenWithChoice"
            },
            "type": "array"
          },
          "defaults": {
            "description": "The space's defaults, set by its admins, for people without a choice of their own.",
            "items": {
              "$ref": "#/components/schemas/OpenWithChoice"
            },
            "type": "array"
          },
          "items": {
            "description": "The always-on spaces' apps first, then the imported versions', each by space id, then\nthe space's own approved apps, each with its approved snapshot's hash as `version_id`.\nWhere two claim the same extension or MIME type, the first opens it.",
            "items": {
              "$ref": "#/components/schemas/SpaceApp"
            },
            "type": "array"
          },
          "own": {
            "description": "The app manifests of the space's own files, by path; one whose id an app of `items` has\nsays `id_taken`.",
            "items": {
              "$ref": "#/components/schemas/OwnSpaceApp"
            },
            "type": "array"
          }
        },
        "required": [
          "items",
          "choices",
          "defaults"
        ],
        "type": "object"
      },
      "SpaceEvent": {
        "description": "The `data` of one space SSE event; the SSE `event` name (`entries`, `file`, `scan`,\n`members`, `workspace`, `trash`, `revoked`, `records`) selects which fields are set.\nThese are hints to refetch, not data.",
        "properties": {
          "collection_id": {
            "description": "With `records`: the collection whose records changed.",
            "type": [
              "string",
              "null"
            ]
          },
          "file_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "parent_ids": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "revision": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "scan_status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ScanStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "version_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "SpaceList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Space"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "SpaceRef": {
        "description": "A space of the organisation, by id and name.",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      },
      "SpaceRole": {
        "enum": [
          "viewer",
          "editor",
          "admin"
        ],
        "type": "string"
      },
      "SpaceShare": {
        "description": "Where a share space came from: the app link that created it.",
        "properties": {
          "app_id": {
            "type": "string"
          },
          "app_name": {
            "type": "string"
          },
          "link_id": {
            "type": "string"
          },
          "parent_space_id": {
            "type": "string"
          },
          "parent_space_name": {
            "type": "string"
          },
          "parent_workspace_id": {
            "deprecated": true,
            "description": "Legacy name of `parent_space_id`, sent and accepted until 2027-05-31.",
            "type": "string",
            "x-ivy-legacy-of": "parent_space_id"
          },
          "parent_workspace_name": {
            "deprecated": true,
            "description": "Legacy name of `parent_space_name`, sent and accepted until 2027-05-31.",
            "type": "string",
            "x-ivy-legacy-of": "parent_space_name"
          },
          "service_identity_id": {
            "description": "The link identity every visitor acts as.",
            "type": "string"
          }
        },
        "required": [
          "parent_workspace_id",
          "parent_workspace_name",
          "app_id",
          "app_name",
          "link_id",
          "service_identity_id",
          "parent_space_id",
          "parent_space_name"
        ],
        "type": "object"
      },
      "SpaceSkill": {
        "description": "Written know-how the space's agents read when it applies: one of an always-on space's\nskills, or of a version the space imports.",
        "properties": {
          "agents": {
            "description": "The agent ids it is for (`ivy` is the built-in assistant); empty for every agent.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "applies": {
            "$ref": "#/components/schemas/SkillScope",
            "description": "The apps or file types it is about; empty for the whole space."
          },
          "description": {
            "$ref": "#/components/schemas/LocalisedText"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "$ref": "#/components/schemas/LocalisedText"
          },
          "needs": {
            "$ref": "#/components/schemas/SkillNeeds",
            "description": "What a chat must offer for its agent to be given the skill."
          },
          "source_space_id": {
            "description": "The space that declares the skill, such as `ivy-core`.",
            "type": "string"
          },
          "source_workspace_id": {
            "deprecated": true,
            "description": "Legacy name of `source_space_id`, sent and accepted until 2027-05-31.",
            "type": "string",
            "x-ivy-legacy-of": "source_space_id"
          },
          "version_id": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "agents",
          "applies",
          "needs",
          "source_workspace_id",
          "version_id",
          "source_space_id"
        ],
        "type": "object"
      },
      "SpaceSkillList": {
        "properties": {
          "items": {
            "description": "The always-on spaces' skills first, then the imported versions', each by space id. Of\ntwo skills with one id, the first.",
            "items": {
              "$ref": "#/components/schemas/SpaceSkill"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "SpaceStatus": {
        "enum": [
          "active",
          "archived"
        ],
        "type": "string"
      },
      "StartAppInstance": {
        "additionalProperties": false,
        "properties": {
          "conversation_id": {
            "description": "The conversation whose sandbox session runs the app; its session starts if none runs.\nWithout one, the space runs the app for its members in a sandbox of its own, as the\nspace identity.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "StartFlowRun": {
        "properties": {
          "inputs": {
            "description": "The manual trigger's inputs by name.",
            "type": "object"
          }
        },
        "type": "object"
      },
      "StartRun": {
        "additionalProperties": false,
        "description": "Starts a run of the file as the signed-in person.",
        "properties": {
          "client_run_id": {
            "description": "The client's id for this run: repeating it returns the same run.",
            "type": "string"
          },
          "connections": {
            "description": "Connections declared with `direct_runs: true` the run may call through the gateway;\na person's runs only, never a key's.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "egress": {
            "description": "Hosts of the space allow-list the run may reach; without them it has no network.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "environment": {
            "description": "The sandbox environment that runs the file; by default the first built-in environment\nwhose run rules match it.",
            "type": [
              "string",
              "null"
            ]
          },
          "files": {
            "description": "Files, folders (`Inbox/`, `Inbox/**` with subfolders) and globs (`Finance/*.csv`) you\ncan read, staged read-only under `$IVY_IN/files/` at their current clean versions.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "input": {
            "description": "A JSON value staged read-only as `$IVY_IN/input.json` (workflows-design.md §5.2.1).",
            "type": [
              "object",
              "null"
            ]
          },
          "input_file_ids": {
            "description": "Space files copied into the sandbox read-only, beside the code file.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "messages": {
            "description": "Channels of the space you can read, staged as `$IVY_IN/messages/<channel>.json`.",
            "items": {
              "$ref": "#/components/schemas/RunMessages"
            },
            "type": "array"
          },
          "output_folder_id": {
            "description": "Where new output files go; defaults to the code file's folder.",
            "type": [
              "string",
              "null"
            ]
          },
          "save_to": {
            "description": "A folder path or id to save new output files in; the code file's folder by default.",
            "type": [
              "string",
              "null"
            ]
          },
          "tier": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ComputeTier",
                "description": "A size the installation offers (`GET …/code-execution` lists them); defaults to the\nsmallest. Free runs on `s` only."
              },
              {
                "type": "null"
              }
            ]
          },
          "timeout_seconds": {
            "description": "10 s up to the installation's maximum (15 min by default); shortened to what the\nremaining credits cover.",
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "version_id": {
            "description": "Defaults to the version currently served.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "client_run_id"
        ],
        "type": "object"
      },
      "StepArrow": {
        "description": "An arrow into a step: taken on any of `paths`, or, without them, whenever `step_id` carries\non.",
        "properties": {
          "paths": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "step_id": {
            "type": "string"
          }
        },
        "required": [
          "step_id",
          "paths"
        ],
        "type": "object"
      },
      "StepPaths": {
        "description": "A step's place in the flow, for the editor.",
        "properties": {
          "after": {
            "description": "What it runs after, resolved: `start` is the start of the run.",
            "items": {
              "$ref": "#/components/schemas/StepArrow"
            },
            "type": "array"
          },
          "at_the_same_time": {
            "description": "The steps that may be at work at the same time as it.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "certain": {
            "description": "It runs in every run that ends.",
            "type": "boolean"
          },
          "step_id": {
            "type": "string"
          }
        },
        "required": [
          "step_id",
          "after",
          "certain",
          "at_the_same_time"
        ],
        "type": "object"
      },
      "StepStatus": {
        "enum": [
          "queued",
          "running",
          "waiting",
          "succeeded",
          "failed",
          "skipped",
          "cancelled",
          "outcome_unknown",
          "not_on_path"
        ],
        "type": "string"
      },
      "StreamKind": {
        "enum": [
          "message_posted",
          "message_edited",
          "message_deleted",
          "reaction",
          "queue",
          "participants",
          "conversation",
          "run_started",
          "run_finished",
          "resync"
        ],
        "type": "string"
      },
      "SyncConflict": {
        "properties": {
          "at": {
            "format": "date-time",
            "type": "string"
          },
          "by": {
            "$ref": "#/components/schemas/ActorRef"
          },
          "fields": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "fields",
          "by",
          "at"
        ],
        "type": "object"
      },
      "SyncError": {
        "properties": {
          "at": {
            "format": "date-time",
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "at"
        ],
        "type": "object"
      },
      "SystemNotice": {
        "description": "A `system` message's content; the client words it in the reader's language.",
        "properties": {
          "actor": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ActorRef",
                "description": "Who did it."
              },
              {
                "type": "null"
              }
            ]
          },
          "channel_id": {
            "description": "`shared`: the channel it moved into.",
            "type": [
              "string",
              "null"
            ]
          },
          "conversation_id": {
            "description": "`started_from`: the conversation it links back to.",
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "$ref": "#/components/schemas/SystemNoticeKind"
          },
          "participants": {
            "description": "The participant keys it concerns.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "title": {
            "description": "`renamed`: the new title.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "kind"
        ],
        "type": "object"
      },
      "SystemNoticeKind": {
        "enum": [
          "invited",
          "joined",
          "left",
          "removed",
          "renamed",
          "shared",
          "started_from",
          "agent_disabled",
          "agent_removed"
        ],
        "type": "string"
      },
      "ToolCallStatus": {
        "enum": [
          "ok",
          "error"
        ],
        "type": "string"
      },
      "ToolView": {
        "description": "The view an app tool's result names (`_meta.ui.resourceUri`, the MCP Apps extension).",
        "oneOf": [
          {
            "description": "A `[[ui]]` resource of the tool's own app: its page, from `getAppPage` with `ui`,\n`source_workspace_id` and `version_id`, runs under the call as a page app.",
            "properties": {
              "app_id": {
                "type": "string"
              },
              "instance_id": {
                "description": "The app instance the call ran on, which the page's own tool calls go to.",
                "type": "string"
              },
              "kind": {
                "enum": [
                  "page"
                ],
                "type": "string"
              },
              "result": {
                "description": "The tool's result as the page receives it.",
                "type": "object"
              },
              "source_space_id": {
                "type": "string"
              },
              "source_workspace_id": {
                "deprecated": true,
                "description": "Legacy name of `source_space_id`, sent and accepted until 2027-05-31.",
                "type": "string",
                "x-ivy-legacy-of": "source_space_id"
              },
              "ui": {
                "description": "The `[[ui]]` entry's name, the `<name>` of `ui://<app>/<name>`.",
                "type": "string"
              },
              "version_id": {
                "type": "string"
              }
            },
            "required": [
              "app_id",
              "ui",
              "source_workspace_id",
              "version_id",
              "instance_id",
              "result",
              "kind",
              "source_space_id"
            ],
            "type": "object"
          },
          {
            "description": "A resource the tool's app doesn't declare: not shown.",
            "properties": {
              "kind": {
                "enum": [
                  "ignored"
                ],
                "type": "string"
              },
              "uri": {
                "type": "string"
              }
            },
            "required": [
              "uri",
              "kind"
            ],
            "type": "object"
          },
          {
            "description": "What a file edit changed, as a unified diff.",
            "properties": {
              "created": {
                "type": "boolean"
              },
              "hunks": {
                "items": {
                  "$ref": "#/components/schemas/DiffHunk"
                },
                "type": "array"
              },
              "kind": {
                "enum": [
                  "diff"
                ],
                "type": "string"
              },
              "omitted_lines": {
                "description": "Diff lines left out past the view's limit.",
                "format": "int32",
                "minimum": 0,
                "type": "integer"
              },
              "path": {
                "description": "The file as the agent named it.",
                "type": "string"
              }
            },
            "required": [
              "path",
              "created",
              "hunks",
              "omitted_lines",
              "kind"
            ],
            "type": "object"
          }
        ]
      },
      "TrashItem": {
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/EntryKind"
          },
          "name": {
            "type": "string"
          },
          "original_parent_id": {
            "type": "string"
          },
          "original_path": {
            "items": {
              "$ref": "#/components/schemas/PathSegment"
            },
            "type": "array"
          },
          "purge_after": {
            "description": "When the daily purge deletes it permanently.",
            "format": "date-time",
            "type": "string"
          },
          "trashed_at": {
            "format": "date-time",
            "type": "string"
          },
          "trashed_by": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "name",
          "original_parent_id",
          "original_path",
          "trashed_by",
          "trashed_at",
          "purge_after"
        ],
        "type": "object"
      },
      "TrashList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TrashItem"
            },
            "type": "array"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "TriggerKind": {
        "enum": [
          "manual",
          "schedule",
          "webhook",
          "file",
          "channel",
          "email",
          "record"
        ],
        "type": "string"
      },
      "TriggerRunStatus": {
        "enum": [
          "queued",
          "running",
          "succeeded",
          "failed",
          "skipped",
          "rejected"
        ],
        "type": "string"
      },
      "TriggerSecret": {
        "description": "A secret's id and dates; its value is shown once, when created.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "rotated_from": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "created_at"
        ],
        "type": "object"
      },
      "TriggerSettings": {
        "description": "The kind's settings as the flow file declares them; secrets never live here.",
        "oneOf": [
          {
            "properties": {
              "kind": {
                "enum": [
                  "manual"
                ],
                "type": "string"
              }
            },
            "required": [
              "kind"
            ],
            "type": "object"
          },
          {
            "description": "`cron` is always stored; `simple` is the form it came from.",
            "properties": {
              "cron": {
                "type": "string"
              },
              "kind": {
                "enum": [
                  "schedule"
                ],
                "type": "string"
              },
              "simple": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/SimpleSchedule"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "cron",
              "kind"
            ],
            "type": "object"
          },
          {
            "properties": {
              "kind": {
                "enum": [
                  "webhook"
                ],
                "type": "string"
              }
            },
            "required": [
              "kind"
            ],
            "type": "object"
          },
          {
            "properties": {
              "events": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "folder_id": {
                "type": "string"
              },
              "kind": {
                "enum": [
                  "file"
                ],
                "type": "string"
              },
              "match": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "recursive": {
                "type": "boolean"
              }
            },
            "required": [
              "folder_id",
              "kind"
            ],
            "type": "object"
          },
          {
            "properties": {
              "channel_id": {
                "type": "string"
              },
              "kind": {
                "enum": [
                  "channel"
                ],
                "type": "string"
              },
              "match": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "mention": {
                "type": "boolean"
              }
            },
            "required": [
              "channel_id",
              "kind"
            ],
            "type": "object"
          },
          {
            "properties": {
              "address": {
                "description": "The local part the file declares.",
                "type": "string"
              },
              "inbound_address": {
                "description": "`<address>.<space handle>@<inbound domain>`, set on activation and kept while\nthe local part stays, so renaming the space doesn't move it.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "kind": {
                "enum": [
                  "email"
                ],
                "type": "string"
              },
              "senders": {
                "description": "The file's allow-list; empty means the organisation's verified domains.",
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "required": [
              "address",
              "kind"
            ],
            "type": "object"
          },
          {
            "description": "A collection, and a board file, resolved to ids on activation; a board's `column`\nresolved to its field and values then.",
            "properties": {
              "collection": {
                "type": "string"
              },
              "collection_id": {
                "type": "string"
              },
              "column": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "field": {
                "description": "With `entered`: the indexed `enum` field.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "fields": {
                "description": "With `updated`: only a change of one of these starts a run.",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "kind": {
                "enum": [
                  "record"
                ],
                "type": "string"
              },
              "values": {
                "description": "With `entered`: the option keys whose taking starts a run.",
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "view_id": {
                "description": "The board file's id: only records on the board count.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "when": {
                "description": "`created`, `updated`, `entered` or `do`.",
                "type": "string"
              }
            },
            "required": [
              "collection_id",
              "collection",
              "when",
              "kind"
            ],
            "type": "object"
          }
        ]
      },
      "TriggerStatus": {
        "enum": [
          "active",
          "paused"
        ],
        "type": "string"
      },
      "UnavailableReason": {
        "description": "Why code execution that is switched on can't run now.",
        "enum": [
          "not_gvisor",
          "root_writable",
          "service_account_token",
          "network_not_isolated",
          "swap",
          "cluster_not_ready",
          "probe_failed",
          "not_reporting",
          "no_worker",
          "not_in_plan"
        ],
        "type": "string"
      },
      "UnreachableItem": {
        "description": "Something an automated trigger's version declares that the space identity can't reach\n(§7.2 `identity_cannot_reach`).",
        "properties": {
          "access": {
            "description": "`read`, `post`, `ask`, `notify` or `write`.",
            "type": "string"
          },
          "kind": {
            "description": "`channel`, `identity` or `space`.",
            "type": "string"
          },
          "reference": {
            "description": "The reference as the file writes it.",
            "type": "string"
          },
          "step": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "kind",
          "reference",
          "access"
        ],
        "type": "object"
      },
      "UpdateChannel": {
        "additionalProperties": false,
        "description": "Fields left out are unchanged. `name`, `purpose`, `default_agent` and `archived` are for\nspace admins and the channel's creator; `notify` is each member's own.",
        "properties": {
          "archived": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "default_agent": {
            "description": "`null` removes the default agent.",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "notify": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NotifyLevel"
              },
              {
                "type": "null"
              }
            ]
          },
          "purpose": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "UpdateChatMessage": {
        "additionalProperties": false,
        "properties": {
          "quote": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/QuoteInput",
                "description": "The message it quotes; `null` removes the quote, left out keeps it."
              },
              {
                "type": "null"
              }
            ]
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "type": "object"
      },
      "UpdateConversation": {
        "additionalProperties": false,
        "properties": {
          "assignee": {
            "description": "An active participant's key; an empty string clears it. Assigning an agent mentions it\nwith `instruction`, and its turn acts for the caller.",
            "type": [
              "string",
              "null"
            ]
          },
          "channel_id": {
            "description": "Moves a private conversation into this channel of the space, never back (needs the\ninviting right). Not a channel bound to Slack or Teams; an invited channel only when\nevery person taking part is its member.",
            "type": [
              "string",
              "null"
            ]
          },
          "instruction": {
            "description": "With an agent `assignee`: what the agent should do (1-20000 characters).",
            "type": [
              "string",
              "null"
            ]
          },
          "last_read": {
            "description": "The caller's read position: the index of the last message they read (0-based, at most\nthe last message's).",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "notify": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NotifyLevel",
                "description": "The caller's own notification level here."
              },
              {
                "type": "null"
              }
            ]
          },
          "pinned": {
            "description": "For the caller alone once conversations with people are on.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ConversationStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "title": {
            "description": "1-200 characters.",
            "type": [
              "string",
              "null"
            ]
          },
          "visibility": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ConversationVisibility",
                "description": "Deprecated: `workspace` moves a private conversation into the space's default\nchannel, as `channel_id` naming it does."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "UpdateEntry": {
        "additionalProperties": false,
        "description": "Rename (`name`), move (`parent_id`) or both.",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "parent_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "UpdateQueuedMessage": {
        "additionalProperties": false,
        "properties": {
          "attachments": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "text": {
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "description": "The `version` the edit was made on.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "version"
        ],
        "type": "object"
      },
      "UpdateRecord": {
        "additionalProperties": false,
        "properties": {
          "fields": {
            "description": "Values by field key; fields left out are unchanged, and `null` clears one.",
            "type": "object"
          }
        },
        "required": [
          "fields"
        ],
        "type": "object"
      },
      "UpdateShareLink": {
        "additionalProperties": false,
        "properties": {
          "budget_credits": {
            "description": "App links only: 1 to the organisation's `max_app_link_budget_credits`.",
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "role": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ShareRole",
                "description": "App links only. The organisation's `app_links` setting may cap it."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "UpsertRecord": {
        "additionalProperties": false,
        "properties": {
          "fields": {
            "description": "Values by field key. A new record gets the `default` of fields left out; an existing one\nkeeps them, and `null` clears one.",
            "type": "object"
          }
        },
        "required": [
          "fields"
        ],
        "type": "object"
      },
      "UpsertedRecord": {
        "properties": {
          "outcome": {
            "$ref": "#/components/schemas/ItemOutcome",
            "description": "`created`, `updated` or `unchanged`."
          },
          "record": {
            "$ref": "#/components/schemas/RecordView"
          }
        },
        "required": [
          "outcome",
          "record"
        ],
        "type": "object"
      },
      "ViewColumn": {
        "properties": {
          "name": {
            "type": "string"
          },
          "values": {
            "description": "The values of `group_by` whose records the column holds; a card moved into it gets the\nfirst.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "name",
          "values"
        ],
        "type": "object"
      },
      "ViewColumnRecords": {
        "properties": {
          "items": {
            "description": "In the board's order: by rank, then the cards without one, oldest first.",
            "items": {
              "$ref": "#/components/schemas/RecordView"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "items"
        ],
        "type": "object"
      },
      "ViewDetail": {
        "properties": {
          "card_fields": {
            "description": "What each card shows under its title, in order.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "collection": {
            "description": "The collection's name.",
            "type": "string"
          },
          "columns": {
            "items": {
              "$ref": "#/components/schemas/ViewColumn"
            },
            "type": "array"
          },
          "file_id": {
            "type": "string"
          },
          "filter": {
            "description": "The conditions every record on the board meets, as a record query's `filter`.",
            "type": [
              "object",
              "null"
            ]
          },
          "group_by": {
            "description": "The field whose value puts a record in a column.",
            "type": "string"
          },
          "new": {
            "$ref": "#/components/schemas/NewCards",
            "description": "Where new cards go in their column."
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "file_id",
          "title",
          "collection",
          "group_by",
          "columns",
          "card_fields",
          "new"
        ],
        "type": "object"
      },
      "ViewRecords": {
        "properties": {
          "columns": {
            "items": {
              "$ref": "#/components/schemas/ViewColumnRecords"
            },
            "type": "array"
          },
          "truncated": {
            "description": "The board holds more records than one read returns; the columns show the first.",
            "type": "boolean"
          }
        },
        "required": [
          "columns",
          "truncated"
        ],
        "type": "object"
      },
      "ViewSummary": {
        "properties": {
          "file_id": {
            "description": "The board file's id.",
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "file_id",
          "title"
        ],
        "type": "object"
      },
      "WebSource": {
        "properties": {
          "title": {
            "description": "Empty when the page has none.",
            "type": "string"
          },
          "url": {
            "description": "A fetched page's final URL, after redirects.",
            "type": "string"
          }
        },
        "required": [
          "url",
          "title"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "api_key": {
        "bearerFormat": "ivy_sk_<key id>_<secret><checksum>",
        "description": "A service identity's API key: `ivy_sk_` and 12 base62 characters of key id, `_`, then 43 base62 characters of secret and a 6-character base62 CRC-32 checksum (regex `\\bivy_sk_[0-9A-Za-z]{12}_[0-9A-Za-z]{49}\\b`). Only operations marked with `x-ivy-api-key-scope` accept it, and only with that scope (`write` includes `read`). Requests per key are limited per minute (`429 rate_limited` with `Retry-After`).",
        "scheme": "bearer",
        "type": "http"
      },
      "bearer": {
        "description": "An issuer access token (JWT), or the native apps' session token from `POST /v1/auth/native/token`.",
        "scheme": "bearer",
        "type": "http"
      },
      "session_cookie": {
        "description": "Opaque session token, one cookie per organisation signed in on the device, named `__Host-ivy_session_<organisation_id>` (`ivy_session_<organisation_id>` locally without TLS; the legacy `__Host-ivy_session` is still read). A request uses the session of the path's `{organisation_id}`, else of the `Ivy-Organisation` header, else of the active organisation (`__Host-ivy_org`), else the legacy cookie, else the only one.",
        "in": "cookie",
        "name": "__Host-ivy_session",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "description": "Organisations, users, login, spaces with their files, and the agentic assistant. Errors use `ErrorBody`.",
    "license": {
      "name": "Proprietary"
    },
    "title": "Ivy API",
    "version": "14.21.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/healthz": {
      "get": {
        "operationId": "healthz",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            },
            "description": "The service is up"
          }
        },
        "security": [
          {}
        ],
        "summary": "Liveness probe.",
        "tags": [
          "meta"
        ]
      }
    },
    "/readyz": {
      "get": {
        "operationId": "readyz",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Readiness"
                }
              }
            },
            "description": "Ready to serve traffic"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Readiness"
                }
              }
            },
            "description": "A dependency is unreachable"
          }
        },
        "security": [
          {}
        ],
        "summary": "Readiness probe: the database answers a cheap query and, when `NATS_URL` is set, NATS is\nconnected.",
        "tags": [
          "meta"
        ]
      }
    },
    "/v1/api-key": {
      "get": {
        "description": "Answers with the key's id, scopes and expiry, and the service identity and organisation it\nacts for. Needs no scope, so an integration can check its key before it starts.",
        "operationId": "getApiKey",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyInfo"
                }
              }
            },
            "description": "The calling key: its id, scopes and expiry, and the service identity and organisation it acts for"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`: the key is malformed, unknown, revoked or expired, or its service identity is disabled"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`api_key_required`: the caller is signed in as a person, not with an API key"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the key's requests per minute are used up (`Retry-After`)"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Describes the calling API key.",
        "tags": [
          "api-keys"
        ],
        "x-ivy-api-key-scope": "any"
      }
    },
    "/v1/organisations/{organisation_id}/agent/models": {
      "get": {
        "operationId": "listAgentModels",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentModelList"
                }
              }
            },
            "description": "The models"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such organisation (or not yours)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The model variants the assistant can use in the organisation: the installation's Claude\nvariants, only the EU ones while the organisation has EU-only processing on\n(`getAiSettings`). Other providers' models run in space agents (`listSpaceAgents`).\nListed even when the assistant is not configured, so the UI can render its picker.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      }
    },
    "/v1/organisations/{organisation_id}/ai-settings": {
      "get": {
        "operationId": "getAiSettings",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiSettings"
                }
              }
            },
            "description": "The organisation's AI settings"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: changing them is for organisation owners and admins; `step_up_required`; `invalid_origin`; `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such organisation"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, also when turning EU-only processing on where the installation offers no EU model variants (`eu_available`); `unsupported` in the Local organisation"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Whether the organisation's AI processing stays in the EU. Every member reads them.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      }
    },
    "/v1/organisations/{organisation_id}/code-execution": {
      "get": {
        "operationId": "getCodeExecution",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeExecutionInfo"
                }
              }
            },
            "description": "Availability and limits"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such organisation (or not yours)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Code execution on this installation for the organisation: unavailable without gVisor, never\nunsandboxed.",
        "tags": [
          "code-runs"
        ],
        "x-ivy-api-key-scope": "code_runs:read"
      }
    },
    "/v1/organisations/{organisation_id}/search": {
      "get": {
        "operationId": "search",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-200 characters. Words match the start of words, with accents ignored and typos forgiven\nwhen exact words find little; `\"…\"` matches a phrase and `-word` excludes one.",
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Comma-separated: `file`, `folder`, `file_content`, `conversation`, `message`. All by default.",
            "in": "query",
            "name": "kinds",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "space_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "A user id: files they uploaded, messages they wrote.",
            "in": "query",
            "name": "author",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SearchSort"
            }
          },
          {
            "description": "Ranks results from this space first on a tie: the one on screen.",
            "in": "query",
            "name": "near_space_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Opaque cursor from a previous page's `next_cursor`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-50, default 20.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "deprecated": true,
            "description": "Legacy name of `space_id`, sent and accepted until 2027-05-31.",
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "type": "string"
            },
            "x-ivy-legacy-of": "space_id"
          },
          {
            "deprecated": true,
            "description": "Legacy name of `near_space_id`, sent and accepted until 2027-05-31.",
            "in": "query",
            "name": "near_workspace_id",
            "required": false,
            "schema": {
              "type": "string"
            },
            "x-ivy-legacy-of": "near_space_id"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResults"
                }
              }
            },
            "description": "Files, folders, conversations and messages the caller may open, best first. An API key finds files with `files:read` and conversations and messages with `conversations:read`."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`insufficient_scope`: an API key without `files:read` or `conversations:read`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such organisation or space, or the caller can't see it"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`search_unavailable`: the index isn't reachable; names can still be searched with `searchEntries`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Searches every space the caller may read.",
        "tags": [
          "search"
        ],
        "x-ivy-api-key-scope": "any"
      }
    },
    "/v1/organisations/{organisation_id}/spaces": {
      "get": {
        "operationId": "listSpaces",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Include archived spaces. Defaults to `false`.",
            "in": "query",
            "name": "include_archived",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Opaque cursor from a previous page's `next_cursor`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-100, default 25.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceList"
                }
              }
            },
            "description": "Every space for organisation owners and admins, otherwise the caller's"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such organisation (or not yours)"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The organisation's spaces: all of them for organisation owners and admins, otherwise the caller's.",
        "tags": [
          "spaces"
        ],
        "x-ivy-api-key-scope": "workspaces:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}": {
      "get": {
        "operationId": "getSpace",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Space"
                }
              }
            },
            "description": "The space"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or the caller can't see it"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "One space.",
        "tags": [
          "spaces"
        ],
        "x-ivy-api-key-scope": "workspaces:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/agents": {
      "get": {
        "operationId": "listSpaceAgents",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceAgentList"
                }
              }
            },
            "description": "The space's agents with their envelopes, and why any can't run now"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or the caller can't see it"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The space's agents, active or not. Pass an active agent's `id` as\n`SendMessage.agent_id` in a chat's first message.",
        "tags": [
          "space-packages"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/app-instances": {
      "get": {
        "operationId": "listSpaceAppInstances",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppInstanceList"
                }
              }
            },
            "description": "The space's own running instances, by app"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space (or the caller isn't a member)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The apps the space runs for its members, each in a sandbox of its own; not those\nrunning in conversations' sessions.",
        "tags": [
          "apps"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/apps": {
      "get": {
        "operationId": "listSpaceApps",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceAppList"
                }
              }
            },
            "description": "The apps and the open-with choices, with an `ETag` over the versions and choices they come from"
          },
          "304": {
            "description": "`If-None-Match` matches"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or the caller can't see it"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The apps the space's members open files with: the always-on spaces' apps, then the\napps of every version the space imports, each from the version that declares it.",
        "tags": [
          "space-packages"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/apps/{app_id}/approval": {
      "get": {
        "operationId": "getAppApproval",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppApprovalReview"
                }
              }
            },
            "description": "The app as its files are now, the approved snapshot and the changes between them"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space (or the caller can't see it), or the space's own files declare no app of this id and none is approved"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "What a person reviews before approving one of the space's own apps: its snapshot as the\nfiles make it now (`problem` says why there is none), the snapshot approved before, the\nfiles changed between them with diffs of the text ones, what makes it a space admin's to\napprove, and whether the caller may approve or revoke it.",
        "tags": [
          "apps"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/apps/{app_id}/asset": {
      "get": {
        "operationId": "getAppAsset",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The file's path from the app's `root`, such as `cmaps/UniJIS-UCS2-H.bcmap`.",
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "As for the app's page: `SpaceApp.source_space_id`.",
            "in": "query",
            "name": "source_space_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`AppPage.version_id`, the version or snapshot the page came from: that one's file only,\nelse `404`, and then the answer never changes.",
            "in": "query",
            "name": "version_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "deprecated": true,
            "description": "Legacy name of `source_space_id`, sent and accepted until 2027-05-31.",
            "in": "query",
            "name": "source_workspace_id",
            "required": false,
            "schema": {
              "type": "string"
            },
            "x-ivy-legacy-of": "source_space_id"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The file, with a `Content-Type` from its extension and `ETag: \"{version_id}\"`; immutable when the request names `version_id`"
          },
          "304": {
            "description": "`If-None-Match` matches"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space (or the caller can't see it), no page app of this id, or no file of the app at `path` under its `root`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`app_too_large`: the file is larger than an app's files may be"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "A file of one of the space's page apps, by its path from the app's `root`, from the version\nor approved snapshot its page comes from (`getAppPage`): what the page asks for with\n`window.ivy.asset`. Only files the app owns under its root are served, never its default\nfile.",
        "tags": [
          "space-packages"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/apps/{app_id}/instances": {
      "post": {
        "description": "With a `conversation_id`, it runs in the sandbox session of the conversation, which starts\nif none runs: the session's job stages the app read-only at `/app/{app_id}` and runs its\nprocesses beside the agent's shell, as the person the session acts for. A session runs at\nmost 3 apps.\n\nWithout one, the space runs it for its members in a sandbox of its own, as the\nspace identity, which it bills; one instance per app. It takes one of the\norganisation's app slots (Free 0, Business 5) and stops after 15 minutes without activity.\n\n`write` apps are for the space's editors and admins; `read` apps for any member, and\nwhat they change in the space's files is never saved.",
        "operationId": "startAppInstance",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartAppInstance"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppInstance"
                }
              }
            },
            "description": "The app already runs there (the conversation's session, or the space's own sandbox): its instance"
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppInstance"
                }
              }
            },
            "description": "The instance, `starting` until its job has staged the app and started its processes"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Viewers can't start a `write` app; `workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, conversation or app (or the caller can't see it)"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`app_not_approved`: one of the space's own apps no person approved yet (or an imported space's app); `app_runtime_unavailable`: no sandbox environment the installation has on is the app's `environment` (a session's runs apps of the session environment, of the environments it `provides` and `shell`; the space's own any built-in environment); `too_many_apps`: the session already runs 3; `app_start_conflict`: concurrent starts kept winning, try again; `file_scanning`, `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`app_not_runnable`: the app declares no processes; `invalid_app`, `app_too_large`, `validation_failed`, `invalid_body`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`sandbox_busy`: the organisation's sandbox sessions, or for a space's instance its app slots, are all in use; for app slots `details.holders` names the instances holding them that the caller can see (`instance_id`, `workspace_id`, `app_id`) and `details.other_holders` counts the rest"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`sandbox_unavailable`: code execution is off or no sandbox worker runs; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Starts the app, or answers the instance of it already running there.",
        "tags": [
          "apps"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/apps/{app_id}/instances/{instance_id}": {
      "get": {
        "operationId": "getAppInstance",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppInstance"
                }
              }
            },
            "description": "The instance, with what its processes last reported"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such instance of this app (or the caller can't see its conversation or space)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "One instance of the app: its state, why it stopped, and what its processes last reported.",
        "tags": [
          "apps"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      },
      "delete": {
        "operationId": "stopAppInstance",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppInstance"
                }
              }
            },
            "description": "Its job stops it: its processes get a grace period, then the last checkpoint saves what they wrote"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Viewers can't stop a `write` app; `workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such instance of this app (or the caller can't see its conversation or space)"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Stops the instance. A conversation's session keeps running; a space's instance takes\nits sandbox with it.",
        "tags": [
          "apps"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/apps/{app_id}/instances/{instance_id}/decisions": {
      "post": {
        "description": "Only the instance's own app token asks (the TypeSafe AI space's app offers it to agents\nas tools). The call runs on the installation's TypeSafe AI account and is billed in credits\nas a model call of the app's principal (source `decision`), within the plan's limits. The\nstate and questions are never logged.",
        "operationId": "decide",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Decisions"
                }
              }
            },
            "description": "An answer to each question, in the request's order"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`usage_limit_reached`, `billing_restricted`, `service_identity_limit_reached`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`insufficient_scope`: only an app instance asks, with its own app token; viewers can't use a `write` app. `eu_only_processing`: the organisation allows only EU processing, and TypeSafe AI has no EU route. `access_revoked`: the app's principal lost access, or the space was archived, before the decision ran"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Not the token's organisation or space"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed` with the `field` and `reason` (`required`, `too_long`, `out_of_range`, `duplicate`, `invalid_format`, `not_allowed`); `invalid_body`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the instance's requests per minute"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`decision_refused`: TypeSafe AI refused the questions"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`provider_unavailable`: this installation has no TypeSafe AI account, or it didn't answer in time; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Asks TypeSafe AI's Jev the instance's questions about a state, all in one call: yes or no,\none of several options, or a place on a scale, each answer with its probability and, where\nJev gives one, its confidence, so the app acts on confident answers and hands the rest on.",
        "tags": [
          "apps"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/apps/{app_id}/instances/{instance_id}/events": {
      "get": {
        "operationId": "streamAppInstance",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Resume after this event",
            "in": "header",
            "name": "Last-Event-ID",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "`text/event-stream`: `status` (an `AppInstance`) and `log` events"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such instance of this app (or the caller can't see its conversation or space)"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: `Last-Event-ID` is not an event id"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`sandbox_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The instance's status, then `status` whenever it changes and `log` lines (`process`, `seq`,\n`stream`, `text`) while the stream is open, until it stops. Following counts as activity, so\nthe instance doesn't idle while someone watches. Reading the log is audited\n(`app.logs_read`). `Last-Event-ID` resumes after an event.",
        "tags": [
          "apps"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/apps/{app_id}/instances/{instance_id}/images": {
      "post": {
        "description": "Only the instance's own app token asks (the AI agents space's images app offers it to agents\nas a tool), and only a `write` app. The organisation's AI settings pick the model: a provider\nit allows, served in the EU while it keeps processing there; `provider` names one. The call\nruns on the installation's provider accounts and is billed in credits by the tokens the\nprovider reports (source `image_generation`), within the plan's limits. The prompt is never\nlogged.",
        "operationId": "generateImages",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageGenerationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneratedImages"
                }
              }
            },
            "description": "The new image files, in the space's \"Generated images\" folder"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`usage_limit_reached`, `billing_restricted`, `service_identity_limit_reached`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`insufficient_scope`: only an app instance asks, with its own app token; `forbidden`: only a `write` app makes images, and only for a person who may add files to the space. `no_image_provider`: the organisation's AI settings allow no provider whose images this installation offers (in the EU while it keeps processing there). `access_revoked`: the app's principal lost access, or the space was archived, before the request ran"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Not the token's organisation or space, or a reference image that isn't in it"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`file_scanning`: a reference image has no version that passed the malware scan yet"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`storage_limit_reached`: the organisation's storage has no room for the images (4 MB each), checked before the provider is called"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed` with the `field` and `reason`; `image_refused`: the provider's safety system declined the prompt, with its reason; `unsupported_type`, `too_large`: a reference image that isn't a PNG, JPEG or WebP of at most 20 MB"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the instance's requests per minute"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`image_failed`: the provider failed"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`images_unavailable`: this installation makes no images, the provider is busy, or it didn't answer in time; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Makes images from a description, optionally based on images in the space, with Google's or\nOpenAI's image model, and saves them to the space's \"Generated images\" folder, scanned like\nany upload.",
        "tags": [
          "apps"
        ],
        "x-ivy-api-key-scope": "files:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/apps/{app_id}/instances/{instance_id}/log": {
      "get": {
        "operationId": "getAppInstanceLog",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/plain": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The last 256 KiB each process wrote, kept for 7 days after the instance stopped"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such instance of this app, or no log kept (it still runs, or stopped more than 7 days ago)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "An instance's log as it stopped. Logs are space content; reading one is audited\n(`app.logs_read`).",
        "tags": [
          "apps"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/apps/{app_id}/instances/{instance_id}/tools/{tool}/calls": {
      "post": {
        "operationId": "callAppTool",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The tool's name as the app declares it, without the app's prefix",
            "in": "path",
            "name": "tool",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallAppTool"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppToolCallResult"
                }
              }
            },
            "description": "What the app's MCP server answered; `is_error` when the tool reported an error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Viewers can't use a `write` app; `workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such instance of this app (or the caller can't see its conversation); `app_tool_unavailable`: the app declares no such tool, or offers no tools here"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`app_not_running`: the instance has stopped; `app_runs_as_another`: the instance runs as another person in the conversation; the caller stops it and, once it has stopped, starts the app again as themselves"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`invalid_tool_input`: the input doesn't fit the tool's schema; `invalid_body`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`app_tool_failed`: the app's MCP server failed, or didn't answer within 40 s"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`sandbox_unavailable`: the conversation's sandbox didn't answer; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Calls one of the app's tools on this running instance, as the caller, checked like a call\nfrom the agent: its page app's `window.ivy.callTool(name, input)` arrives here through the\nhost. The call is recorded (`app.tool_called`), never its input or output; the session\nsaves what the call changed in the working copy. A call has 40 s, on an instance that\nalready runs; tools that take longer are for the agent.",
        "tags": [
          "apps"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/apps/{app_id}/page": {
      "get": {
        "operationId": "getAppPage",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`SpaceApp.source_space_id`, for an app whose id another of the space's apps\nhas too. Without it, the first app of the id in `listSpaceApps`' order.",
            "in": "query",
            "name": "source_space_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`WorkspaceApp.version_id`: the page of that version only, else `404`, so a page never\nruns with another version's file handlers. With `source_workspace_id` of a space Ivy\nships, that version serves its page or `ui` page even once the space has a newer one.",
            "in": "query",
            "name": "version_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "A `[[ui]]` resource's name: its page (an MCP Apps view, `ui://<app>/<name>`) instead\nof the app's own, for any app Ivy ships, whatever its frontend.",
            "in": "query",
            "name": "ui",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "deprecated": true,
            "description": "Legacy name of `source_space_id`, sent and accepted until 2027-05-31.",
            "in": "query",
            "name": "source_workspace_id",
            "required": false,
            "schema": {
              "type": "string"
            },
            "x-ivy-legacy-of": "source_space_id"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppPage"
                }
              }
            },
            "description": "The page, with `ETag: \"{version_id}\"`"
          },
          "304": {
            "description": "`If-None-Match` matches"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space (or the caller can't see it), or the space has no page app of this id, or its app declares no such `ui` resource"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The page of one of the space's page apps (`frontend = \"page\"`), from the version of the\nspace that declares the app: an always-on space or one the space imports. With\n`ui`, the page of one of the app's `[[ui]]` resources (an MCP Apps view a tool result names),\nfrom the same version. The HTML comes as data, to hand to the sandboxed preview origin: it\nnever runs on the app's origin.",
        "tags": [
          "space-packages"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/apps/{app_id}/snapshot": {
      "get": {
        "operationId": "getAppSnapshot",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppSnapshot"
                }
              }
            },
            "description": "The app's definition, its files' hashes and the snapshot's hash"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space (or the caller can't see it), or the space has no app of this id"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`file_scanning`, `file_quarantined`, `file_scan_failed`: a file of the app has no clean version"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`invalid_app`: the app's manifest breaks a rule, named in the message; `app_too_large`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Exactly what one of the space's apps runs: the manifest's definition (processes, tools\nwith their input schemas, UI resources), every file it is made of with its SHA-256, and the\nsnapshot's hash over them. The first app of this id in `listSpaceApps`' order (the\nalways-on spaces' versions, then the versions the space imports) comes first, so it\nshadows an app of the same id in the space's own files; else the app those files declare\nin a `*.ivy-app.toml` manifest, read from clean versions.",
        "tags": [
          "space-packages"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/channels": {
      "get": {
        "operationId": "listChannels",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelList"
                }
              }
            },
            "description": "Open channels, the invited ones the caller belongs to, and for space admins every channel's name, by name"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or channels are off"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The space's channels.",
        "tags": [
          "channels"
        ],
        "x-ivy-api-key-scope": "channels:read"
      },
      "post": {
        "operationId": "createChannel",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateChannel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Channel"
                }
              }
            },
            "description": "The channel; the creator is its first member"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: space editors and admins create channels; `workspace_content_restricted`, `invalid_origin`; `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or channels are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`channel_name_taken`; `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, with reason `channels_are_open` for `membership: invited` (every channel is open to its space) and for any `members`; `agent_not_enabled` for the default agent"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Creates an open or invited channel.",
        "tags": [
          "channels"
        ],
        "x-ivy-api-key-scope": "channels:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/channels/{channel_id}": {
      "get": {
        "description": "Space admins also see an invited channel's name and member count.",
        "operationId": "getChannel",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Channel"
                }
              }
            },
            "description": "The channel"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or channel the caller sees, or channels are off: an invited channel is 404 to everyone but its members (space admins see its name and count only)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "A channel the caller reads.",
        "tags": [
          "channels"
        ],
        "x-ivy-api-key-scope": "channels:read"
      },
      "patch": {
        "operationId": "updateChannel",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateChannel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Channel"
                }
              }
            },
            "description": "The channel as changed"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: only space admins and the creator rename, archive or change the default agent; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or channel the caller sees, or channels are off: an invited channel is 404 to everyone but its members (space admins see its name and count only)"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`channel_name_taken`; `channel_archived` (unarchive it first); `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, also for `notify` from someone who hasn't joined; `agent_not_enabled`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Renames, describes, archives or changes the default agent (space admins and the\ncreator; never the membership of an invited channel), or sets the caller's own notification\nlevel for the channel's threads.",
        "tags": [
          "channels"
        ],
        "x-ivy-api-key-scope": "channels:write"
      },
      "delete": {
        "operationId": "deleteChannel",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted: its threads can't be read any more and go with the next retention pass"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: only space admins and the creator delete a channel; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or channel the caller sees, or channels are off: an invited channel is 404 to everyone but its members (space admins see its name and count only)"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed` with reason `default_channel`: the space's default channel stays"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Deletes the channel (space admins and its creator); its threads go with it.",
        "tags": [
          "channels"
        ],
        "x-ivy-api-key-scope": "channels:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/channels/{channel_id}/pins": {
      "get": {
        "operationId": "listChannelPins",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelPinList"
                }
              }
            },
            "description": "The pinned files the caller can open; trashed and deleted ones drop out"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or channel the caller sees, or channels are off: an invited channel is 404 to everyone but its members (space admins see its name and count only)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The channel's pinned files the caller can open, in pin order.",
        "tags": [
          "channels"
        ],
        "x-ivy-api-key-scope": "channels:read"
      },
      "post": {
        "operationId": "pinChannelFile",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PinChannelFile"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelPinList"
                }
              }
            },
            "description": "The pins after the change"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: members who may edit the space's files pin; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or channel the caller sees, or channels are off: an invited channel is 404 to everyone but its members (space admins see its name and count only)"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`channel_archived`; `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`invalid_file`; `validation_failed` past [20] pins"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Pins a space file to the channel: its threads' agents get it as context.",
        "tags": [
          "channels"
        ],
        "x-ivy-api-key-scope": "channels:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/channels/{channel_id}/pins/{file_id}": {
      "delete": {
        "operationId": "unpinChannelFile",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Unpinned"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: members who may edit the space's files unpin; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such channel or pinned file, or channels are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`channel_archived`; `workspace_archived`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Unpins a file from the channel.",
        "tags": [
          "channels"
        ],
        "x-ivy-api-key-scope": "channels:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/collections": {
      "get": {
        "operationId": "listCollections",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionList"
                }
              }
            },
            "description": "The space's collections: the built-in ones, then its own by name, each with the file version it serves and any version waiting for a space admin"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or collections are off"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The space's collections.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/collections/{name}": {
      "get": {
        "operationId": "getCollection",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionDetail"
                }
              }
            },
            "description": "The collection, the declaration it serves and the one waiting for a space admin"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, or collections are off"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "A collection of the space, by name.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/collections/{name}/records": {
      "post": {
        "operationId": "createRecord",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRecord"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordView"
                }
              }
            },
            "description": "The record"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: the collection's `access.create` decides who creates; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`collection_full`, `key_taken`: another record has the collection's key value (`details.record_id`), `key_busy`, `collection_detached`, `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, per field in `field`: `field_missing`, `read_only`, `required`, `invalid_type`, `value_unknown`, `not_a_space_member`, `file_missing`, `record_missing`, `record_too_large`, …"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the collection takes 50 writes a second, 200 at once"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Creates a record.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/collections/{name}/records/batch": {
      "post": {
        "operationId": "writeRecordBatch",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordBatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordBatchResult"
                }
              }
            },
            "description": "Each item's outcome in order; an item that failed doesn't undo the others, and `sync.delete_missing` deletes nothing then"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: `sync.delete_missing` needs the collection's `access.delete`; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`collection_has_no_key` for `upsert`, `collection_detached`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: one of `upsert`, `create` and `delete`, with at most 500 items"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Upserts, creates or deletes up to 500 records, each its own write, paced by the\ncollection's write rate (collections-design §5.2).",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/collections/{name}/records/by-key/{value}": {
      "put": {
        "operationId": "upsertRecord",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The value of the collection's `key` field",
            "in": "path",
            "name": "value",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertRecord"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpsertedRecord"
                }
              }
            },
            "description": "The record and whether it was `created`, `updated` or `unchanged`: an upsert that changes nothing writes nothing and starts no flow; `ETag: \"r{revision}\"`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: the collection's `access.create` decides who creates and `access.update` who changes; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`collection_has_no_key`, `key_busy`, `record_changed`, `collection_full`, `collection_detached`, `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, per field in `field`: `key_mismatch` when `fields` gives another key value, `key_immutable`, and those of a create or change"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the collection takes 50 writes a second, 200 at once"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Creates the record with this key value, or changes the given fields of the record that has\nit, so data imported again updates rather than duplicates (collections-design §5.1).",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/collections/{name}/records/query": {
      "post": {
        "operationId": "queryRecords",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordQuery"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordPage"
                }
              }
            },
            "description": "A page of the records that match, in the order asked. A page can hold fewer than `limit` records, even none, while `next_cursor` says more may remain"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`collection_detached`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: `field_missing`, `field_not_indexed`, `field_not_sortable`, `invalid_value`, `query_too_broad`, the cursor or the limit"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Queries a collection's records by their indexed fields.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/collections/{name}/records/{record_id}": {
      "get": {
        "operationId": "getRecord",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordView"
                }
              }
            },
            "description": "The record; `ETag: \"r{revision}\"`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, `record_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`collection_detached`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "One record.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:read"
      },
      "patch": {
        "operationId": "updateRecord",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The `\"r{revision}\"` ETag; a mismatch is 412",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRecord"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordView"
                }
              }
            },
            "description": "The record as changed"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: the collection's `access.update` decides who changes; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, `record_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`collection_detached`, `workspace_archived`"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`precondition_failed`: `If-Match` is not the current revision (`details.current`)"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, per field in `field`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Changes a record's fields.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:write"
      },
      "delete": {
        "operationId": "deleteRecord",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The `\"r{revision}\"` ETag; a mismatch is 412",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted, with its comments; files its fields name stay"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: the collection's `access.delete` decides who deletes; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, `record_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`collection_detached`, `workspace_archived`"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`precondition_failed`: `If-Match` is not the current revision (`details.current`)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Deletes a record.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/collections/{name}/records/{record_id}/comments": {
      "get": {
        "operationId": "listRecordComments",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordCommentList"
                }
              }
            },
            "description": "The record's comments, oldest first"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, `record_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`collection_detached`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "A record's comments.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:read"
      },
      "post": {
        "operationId": "createRecordComment",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRecordComment"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordComment"
                }
              }
            },
            "description": "The comment"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: whoever may change the record comments on it; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, `record_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`comments_off`: the collection takes none; `too_many_comments`, `collection_detached`, `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Comments on a record.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/collections/{name}/records/{record_id}/move": {
      "post": {
        "operationId": "moveRecord",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The `\"r{revision}\"` ETag; a mismatch is 412",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveRecord"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordView"
                }
              }
            },
            "description": "The record in its new column and place; `ETag: \"r{revision}\"`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: the collection's `access.update` decides who moves; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, `record_missing`, `view_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`view_invalid`: the board file has problems; `collection_detached`, `workspace_archived`"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`precondition_failed`: `If-Match` is not the current revision (`details.current`)"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: `column_missing`, `unknown_card` (`before`, `after`), `view_of_another_collection`, `read_only`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Moves a record on a board: into a column, which sets the board's `group_by` field, and\nbetween two cards.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/collections/{name}/schema": {
      "get": {
        "operationId": "getCollectionSchema",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordSchema"
                }
              }
            },
            "description": "The JSON Schema of a record's `fields`, derived from the declaration the collection serves"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`collection_detached`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The JSON Schema a collection's records' fields follow, for apps and code.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/collections/{name}/sources": {
      "get": {
        "operationId": "listRecordSources",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordSourceList"
                }
              }
            },
            "description": "Each source the collection file declares and how its mirror stands: applied or not, paused, its count, last sync and error, and its people links"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`collection_detached`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "A collection's sources and their state.",
        "tags": [
          "github"
        ],
        "x-ivy-api-key-scope": "records:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/connections": {
      "get": {
        "operationId": "listConnections",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionList"
                }
              }
            },
            "description": "Declared connections and stored values: names, hosts, auth type, whether a value is set, its binding and dates; never values"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or connections are off"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The space's connections and the state of their values.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/conversations": {
      "get": {
        "operationId": "listConversations",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Opaque cursor from a previous page's `next_cursor`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-100, default 25.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "`mine` (default), or, while conversations with people are on, `private`, `direct`,\n`groups`, `assigned` or `channel` (`shared` is deprecated).",
            "in": "query",
            "name": "view",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ConversationView"
            }
          },
          {
            "description": "Only chats whose title contains this text, ignoring case.",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only conversations this participant (`user:<id>` or `agent:<id>`) takes part in.",
            "in": "query",
            "name": "peer",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "With `view=channel`: the channel whose threads to list.",
            "in": "query",
            "name": "channel_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`true`: only the conversations the caller archived. Left out or `false`: only those they\ndidn't, except that `q` finds archived ones too. A channel's threads aren't archived.",
            "in": "query",
            "name": "archived",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationList"
                }
              }
            },
            "description": "The caller's chats in this space, pinned ones first, then newest first (or, with `direct`, `groups`, `shared` or `assigned`, by latest activity)"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`invalid_query`: an unknown `view`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`: organisation admins who haven't joined; `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or the caller can't see it; `direct`, `groups`, `shared`, `assigned` and `peer` while conversations with people are off; with `view=channel`, no such channel the caller reads, or channels are off"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, also for `view=channel` without `channel_id`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The caller's chats in the space, pinned ones first, then newest first; `q` keeps those\nwhose title contains it. While conversations with people are on: `direct` (each with its `peer_key`, which the Direct\nlist groups by), `groups`, `shared` and `assigned`, newest activity first, and `peer` keeps\nthe conversations that participant takes part in. While channels are on, `view=channel` with\n`channel_id` lists a channel's threads, newest activity first.",
        "tags": [
          "conversations"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      },
      "post": {
        "operationId": "createConversation",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CreateConversation"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conversation"
                }
              }
            },
            "description": "The chat, private to the caller (or, with `participants`, to them and the participants)"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope` (also for an API key naming a person: keys never reach people); `no_channel_grant`: an API key starting a thread in an invited channel no member granted it; `not_a_channel_member`: the caller reads this open channel but hasn't joined it, and only members post (join with `addChannelMembers`)"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or the caller can't see it; with `channel_id`, no such channel the caller reads"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`; `channel_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, also for `participants` or `visibility` while conversations with people are off, and for `channel_id` while channels are off; `not_a_workspace_member`; `agent_not_enabled`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Starts an empty chat for the caller in the space. Without a body, a chat with the\nspace's built-in assistant; with `participants`, a conversation with those space\nmembers and agents (a DM with one of them, a group with more). A space whose agent\nconversations are `shared` creates a conversation with an agent as a shared thread.",
        "tags": [
          "conversations"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/conversations/{conversation_id}": {
      "get": {
        "operationId": "getConversation",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationDetail"
                }
              }
            },
            "description": "The chat with its messages, and the run still answering it"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "One of the caller's chats, with its messages and the run still answering it.",
        "tags": [
          "conversations"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      },
      "patch": {
        "operationId": "updateConversation",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateConversation"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conversation"
                }
              }
            },
            "description": "The chat"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`; `not_a_channel_member`: moving into an open channel the caller hasn't joined, other than the default channel and the space's agent conversations channel"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: `title` must be 1-200 characters"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Renames the caller's chat or pins it to the top of `listConversations`.",
        "tags": [
          "conversations"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      },
      "delete": {
        "operationId": "deleteConversation",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted, with its messages, their other versions, its queue and its ratings; this can't be undone"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`run_in_progress` while the assistant is answering in it (stop the run first); `workspace_archived`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Deletes the caller's chat for good. Chats have no trash.",
        "tags": [
          "conversations"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/conversations/{conversation_id}/app-instances": {
      "get": {
        "operationId": "listConversationAppInstances",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppInstanceList"
                }
              }
            },
            "description": "The conversation's instances, newest first"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such conversation in this space (or the caller can't see it)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The conversation's 20 newest app instances: those running and those stopped in the last 7\ndays.",
        "tags": [
          "apps"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/conversations/{conversation_id}/events": {
      "get": {
        "operationId": "streamConversationEvents",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Resume after this stream position",
            "in": "header",
            "name": "Last-Event-ID",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationStreamEvent"
                }
              }
            },
            "description": "Server-sent events"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such conversation the caller reads, or conversations with people are off"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: `Last-Event-ID` is not a stream position"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`stream_unavailable`: the live stream can't be read right now; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The conversation's live events, as server-sent events whose `id` is the stream position\nand whose name is the `kind`: messages posted, edited or deleted, reactions, the queue,\nparticipants, the conversation's own fields, and runs starting and finishing. Open it\nfirst, then load the conversation, whose `stream_seq` names the position it reflects;\nevents up to it are already in what you loaded. Resume with `Last-Event-ID`; a position\nolder than the stream keeps (24 hours) gets a single `resync` event: reload the\nconversation and open the stream again from its `stream_seq`. Events carry ids and, for a\nmessage, the message as it is when delivered (a deleted one as its tombstone). The stream\nends when the caller can no longer read the conversation.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/conversations/{conversation_id}/messages": {
      "post": {
        "operationId": "sendAgentMessage",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "With a repeated `client_message_id`: resume after this event",
            "in": "header",
            "name": "Last-Event-ID",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendMessage"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/AgentStreamEvent"
                }
              }
            },
            "description": "Server-sent events",
            "headers": {
              "Ivy-Run-Id": {
                "description": "The run writing the reply",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatMessage"
                }
              }
            },
            "description": "Posted without a reply, while conversations with people are on: no agent answers it (§3.4: in a group or a shared thread, agents answer only when @mentioned)"
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueuedMessage"
                }
              }
            },
            "description": "Queued while the assistant answers an earlier message; `Ivy-Run-Id` is set when it started at once because the chat had just become free",
            "headers": {
              "Ivy-Run-Id": {
                "description": "Set when the queued message has already started",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`usage_limit_reached`: the organisation used its AI credit allowance and spending limit for this period (`details`: `scope_type`, `period_end`, `can_raise_limit`); `billing_restricted`: its subscription is unpaid. A run can also end with an `error` event of either code."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope` (also when an API key mentions a person); `not_a_participant`; `not_a_channel_member`: the caller reads this open channel but hasn't joined it, and only members post (join with `addChannelMembers`), unless they take part in this thread already"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`invite_required` when the message mentions someone who isn't in this private conversation (`details.participants`: invite them, then send again); `workspace_archived`; `queue_full` when the assistant is answering and 20 messages already wait; `queue_full_for_person` when the caller already queued 10 here; `run_in_progress` when a retried `client_message_id` meets another answer in progress; `chat_busy` when the message couldn't be stored because the chat kept changing (send it again)"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed` (reason `not_quotable` for a `quote` that isn't a message of this conversation still in it); `not_a_workspace_member` or `agent_not_enabled` for a mention; `invalid_model` when `model` is not one of `listAgentModels` (or of the chat's agent's models), such as a regular variant while the organisation has EU-only processing on; `invalid_attachment` when an id in `attachments` is not a file of this space or failed its malware scan; `invalid_agent` when `agent_id` is not one of `listSpaceAgents` or differs from the chat's agent; `agent_unavailable` (with `details.reason`) when the agent can't run here yet"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`agent_unavailable` when no assistant worker is running or configured; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Sends a message and streams the assistant's reply as server-sent events. Each event's\nname is `event` and its data is the JSON of `data` in `AgentStreamEvent`; its `id` is the\nposition in the run's event log. The stream ends after `done` or `error`. The reply is\nwritten by a background run (named by the `Ivy-Run-Id` header) that keeps going if the\nconnection drops: resume with `GET …/runs/{run_id}/events` and `Last-Event-ID`. While the\nassistant is still answering an earlier message, the message joins the chat's queue\ninstead (`202`, as `queueAgentMessage`) and starts once the chat is free.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/conversations/{conversation_id}/messages/{message_id}": {
      "patch": {
        "operationId": "editConversationMessage",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateChatMessage"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatMessage"
                }
              }
            },
            "description": "The message, edited in every version that holds it"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Not the caller's message; `not_a_participant`; `insufficient_scope`; `workspace_content_restricted`, `invalid_origin`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such conversation or message, or conversations with people are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`edit_creates_branch`: only agent replies follow the message (or nobody else takes part), so `editAgentMessage` edits it and the agent answers again; `edit_on_platform`: written in Slack or Teams, it is edited there and Ivy follows; `invite_required` (`details.participants`); `workspace_archived`; `channel_archived`: the channel is archived and read-only"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed` (reason `not_quotable` for a `quote` that isn't an earlier message of this conversation still in it); `not_a_workspace_member`, `agent_not_enabled` for a mention"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Changes the text of your own message where it is, marked edited, without a turn. Later\ncompaction summaries are discarded so no turn reads the old text.",
        "tags": [
          "conversations"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      },
      "delete": {
        "operationId": "deleteConversationMessage",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted everywhere it was stored; a tombstone keeps its place"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Neither its author nor the person an agent's reply acted for; `not_a_participant`; `insufficient_scope`; `workspace_content_restricted`, `invalid_origin`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such conversation or message, or conversations with people are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`edit_on_platform`: written in Slack or Teams, it is deleted there and Ivy follows; `workspace_archived`; `channel_archived`: the channel is archived and read-only"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Deletes a message in every version of the conversation, leaving a tombstone, and discards\nthe compaction summaries written after it.",
        "tags": [
          "conversations"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/conversations/{conversation_id}/messages/{message_id}/branch": {
      "put": {
        "operationId": "selectMessageBranch",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SelectBranch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationDetail"
                }
              }
            },
            "description": "The chat with the chosen version of its messages"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`; with several people, only the person who made the versions switches between them"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space, or no such message in its current version"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`run_in_progress` while the assistant is answering in this chat"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: the message has no other versions, or `index` is out of range"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Shows another version of the chat from the message carrying `branch` on: the messages from\nthere on are swapped for those of version `index`, which the model then continues from.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/conversations/{conversation_id}/messages/{message_id}/edit": {
      "post": {
        "operationId": "editAgentMessage",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "With a repeated `client_message_id`: resume after this event",
            "in": "header",
            "name": "Last-Event-ID",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EditMessage"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/AgentStreamEvent"
                }
              }
            },
            "description": "Server-sent events",
            "headers": {
              "Ivy-Run-Id": {
                "description": "The run writing the reply",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`usage_limit_reached`, `billing_restricted`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`; with several people, only its author edits a message"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space, or no such message in its current version"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`run_in_progress` while the assistant is answering in this chat; `edit_in_place` when others wrote after the message (edit it with `editConversationMessage`); `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, also when the message isn't the caller's own, or (reason `not_quotable`) when `quote` isn't an earlier message of this conversation still in it; `invalid_model`; `invalid_attachment`; `agent_unavailable`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`agent_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Replaces one of the caller's messages with an edited one and streams the new reply, as\n`sendAgentMessage` does. The messages from the edited one on stay as the other version of\nthat point of the chat (`ChatMessage.branch`, `selectMessageBranch`); the model sees only\nthe new version.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/conversations/{conversation_id}/messages/{message_id}/feedback": {
      "put": {
        "operationId": "rateAgentMessage",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RateMessage"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Rated (or the rating cleared)"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat the caller can read in this space, or no such message in its current version"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: only assistant messages are rated"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Rates one of the assistant's messages for the caller (`ChatMessage.feedback`); `null`\nclears the rating.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/conversations/{conversation_id}/messages/{message_id}/regenerate": {
      "post": {
        "operationId": "regenerateAgentMessage",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegenerateMessage"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/AgentStreamEvent"
                }
              }
            },
            "description": "Server-sent events",
            "headers": {
              "Ivy-Run-Id": {
                "description": "The run writing the reply",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`usage_limit_reached`, `billing_restricted`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`; with several people, only the person a reply acted for regenerates it"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space, or no such message in its current version"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`run_in_progress` while the assistant is answering in this chat; `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, also when the message isn't the assistant's; `invalid_model`; `agent_unavailable`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`agent_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Writes another reply in place of one of the assistant's and streams it, as\n`sendAgentMessage` does. The question stays; the earlier reply (with whatever followed it)\nstays as another version of that point of the chat.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/conversations/{conversation_id}/participants": {
      "get": {
        "operationId": "listConversationParticipants",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParticipantList"
                }
              }
            },
            "description": "Everyone who takes or took part, with their state"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such conversation the caller reads in this space, or conversations with people are off"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The conversation's participants: people and agents, active, left, removed or revoked.",
        "tags": [
          "conversations"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/conversations/{conversation_id}/queue": {
      "get": {
        "operationId": "getConversationQueue",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueState"
                }
              }
            },
            "description": "The messages waiting in the chat, in the order they will start"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The chat's queue: messages sent while the assistant was answering, which start on their own\none after another, and whether it is paused.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      },
      "post": {
        "operationId": "queueAgentMessage",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueueMessage"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueuedMessage"
                }
              }
            },
            "description": "Queued",
            "headers": {
              "Ivy-Run-Id": {
                "description": "Set when the message started at once: the run writing the reply",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`; `not_a_participant`; `not_a_channel_member`: the caller reads this open channel but hasn't joined it, and only members post (join with `addChannelMembers`), unless they take part in this thread already"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`queue_full`: the chat already holds 20 queued messages; `queue_full_for_person`: the caller already queued 10 here; `starts_no_turn`: no agent would answer it (post it with `sendAgentMessage`); `invite_required`; `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`; `invalid_model`; `invalid_attachment`; `invalid_agent`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`agent_unavailable` when no assistant worker is running or configured; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Queues a message to send once the assistant has finished its current reply. When the chat\nis free and its queue isn't paused, the message starts at once: the response then names its\nrun in `Ivy-Run-Id` (follow it with `GET …/runs/{run_id}/events`).",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/conversations/{conversation_id}/queue/order": {
      "put": {
        "operationId": "reorderQueue",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReorderQueue"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueState"
                }
              }
            },
            "description": "The queue in its new order"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`version_conflict`: `ids` isn't exactly the queued messages (one started, was added, removed or edited meanwhile)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Puts the queued messages in a new order.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/conversations/{conversation_id}/queue/resume": {
      "post": {
        "operationId": "resumeQueue",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueState"
                }
              }
            },
            "description": "The queue, no longer paused",
            "headers": {
              "Ivy-Run-Id": {
                "description": "Set when the next message started: the run writing its reply",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`agent_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Resumes a paused queue and starts its next message if the chat is free (the started run is\nin `Ivy-Run-Id`).",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/conversations/{conversation_id}/queue/{queued_message_id}": {
      "patch": {
        "operationId": "updateQueuedMessage",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "queued_message_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateQueuedMessage"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueuedMessage"
                }
              }
            },
            "description": "The edited message, with its new `version`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`; `not_your_queued_message`: only its author edits it"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`version_conflict`: the message was edited since `version`; `queued_message_started`: it has already started (or was removed)"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`; `invalid_attachment`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Edits a queued message that hasn't started yet.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      },
      "delete": {
        "operationId": "removeQueuedMessage",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "queued_message_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Removed from the queue"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`; `not_your_queued_message`: only its author removes it"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat, or no such message waiting in its queue (it may have started)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Removes a message from the queue before it starts.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/conversations/{conversation_id}/runs/{run_id}/cancel": {
      "post": {
        "operationId": "cancelAgentRun",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Cancellation requested"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`; `not_a_participant`: while conversations with people are on, only a participant stops a reply"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat or run of the caller's in this space (while conversations with people are on: no such run of a conversation the caller reads)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`agent_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Stops a run. The reply ends with an `error` event whose code is `cancelled`; what was\nwritten so far is kept. While conversations with people are on, any participant stops a\nreply, which then names who stopped it (`stopped_by`).",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/conversations/{conversation_id}/runs/{run_id}/events": {
      "get": {
        "operationId": "streamAgentRun",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Resume after this event",
            "in": "header",
            "name": "Last-Event-ID",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/AgentStreamEvent"
                }
              }
            },
            "description": "Server-sent events"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat or run of the caller's in this space"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: `Last-Event-ID` is not an event id"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`agent_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Follows a run's reply: the events after `Last-Event-ID` (all of them without it), then\nlive ones, as server-sent events like `sendAgentMessage`'s. Use it to resume after a dropped\nconnection or to follow a reply from another device (`active_run_id`). When the run's\nevents are gone, the stream ends with the run's outcome: `done` with its reply, or `error`\nwith the run's error code; a run that finished but whose reply can't be found ends with\n`error` code `reply_unavailable` (reload the chat).",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/conversations/{conversation_id}/sandbox": {
      "get": {
        "operationId": "getConversationSandbox",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxInfo"
                }
              }
            },
            "description": "The sandbox"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The chat's sandbox: its state, times and the changes waiting for the caller's\nconfirmation.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      },
      "delete": {
        "operationId": "stopConversationSandbox",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Stopping"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`invalid_origin`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Stops the chat's sandbox now; files saved at earlier steps stay, and pending changes wait\nfor their decision.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/conversations/{conversation_id}/sandbox/changes/{change_set_id}/apply": {
      "post": {
        "operationId": "applySandboxChanges",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "change_set_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyChanges"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxInfo"
                }
              }
            },
            "description": "Applied; the sandbox with the changes still pending"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `invalid_origin`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such change set"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`version_conflict`: the file changed again; reload and decide again"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Confirms a change set (D10): deletes the files listed in `deletes` and settles each\nconflict with `keep_mine` (a new version), `keep_theirs` (nothing) or `save_copy` (a new\nfile beside it). Anything not listed is dropped.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/conversations/{conversation_id}/sandbox/changes/{change_set_id}/discard": {
      "post": {
        "operationId": "discardSandboxChanges",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "change_set_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxInfo"
                }
              }
            },
            "description": "Discarded"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`invalid_origin`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such change set"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Drops a change set: no file is deleted or overwritten.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/entries": {
      "get": {
        "operationId": "listEntries",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Defaults to `root`.",
            "in": "query",
            "name": "parent_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Folders always come first. Defaults to `name`; other sorts are refused\n(`sort_unavailable`) in folders with more than 5 000 entries.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/EntrySort"
            }
          },
          {
            "description": "Defaults to `asc`.",
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SortOrder"
            }
          },
          {
            "description": "Opaque cursor from a previous page's `next_cursor`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-200, default 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntryList"
                }
              }
            },
            "description": "A page of the folder: folders first, then files"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`: organisation admins who haven't joined; `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or folder, or the caller can't see it"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, or `sort_unavailable` for a non-name sort of a folder with more than 5 000 entries"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The folders and files in one folder of the space.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/entries/search": {
      "get": {
        "operationId": "searchEntries",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-100 characters: a prefix of the name or of one of its words.",
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Opaque cursor from a previous page's `next_cursor`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-100, default 25.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntrySearchResults"
                }
              }
            },
            "description": "Folders and files whose name matches, with their paths"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or the caller can't see it"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Finds folders and files of the space by name.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/events": {
      "get": {
        "operationId": "streamSpaceEvents",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceEvent"
                }
              }
            },
            "description": "Server-sent events"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`: organisation admins who haven't joined; `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or the caller can't see it"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`live_unavailable`: poll instead; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Live hints to refetch, as server-sent events: the event name (`entries`, `file`, `scan`,\n`members`, `workspace`, `trash`, `revoked`, `records`, `channels`, `presence`, `runs`, `apps`)\nand a `SpaceEvent` as data. `presence`: a member's presence changed (`listSpacePresence`);\n`runs`: an agent turn started or ended in one of the space's conversations (their\n`run_state`); `apps`: one of the space's own apps was approved or its approval revoked. No ids or\nresume; after a reconnect, refetch everything of the space. A heartbeat comment every 25 s.",
        "tags": [
          "spaces"
        ],
        "x-ivy-api-key-scope": "workspaces:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/file-checks": {
      "post": {
        "operationId": "checkFile",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckFile"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileCheck"
                }
              }
            },
            "description": "The problems Ivy finds in the file as it reads its kind; `valid` when none is an error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such file or version in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`file_scanning`, `file_quarantined`, `file_scan_failed`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`not_checkable`: Ivy has no check for the file's kind; `file_too_large`, `invalid_encoding`, `validation_failed`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`storage_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Checks a file of a kind Ivy reads as configuration (a flow, `connections.ivy.yaml`, a\nspace app manifest) as Ivy does, without saving anything: a version of a file, or draft\ntext. The Files view, the agents' tools and saves by agents report the same problems.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/files": {
      "post": {
        "operationId": "uploadFile",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Defaults to `root`.",
            "in": "query",
            "name": "parent_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-255 characters.",
            "in": "query",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Defaults to `fail`.",
            "in": "query",
            "name": "on_conflict",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/OnConflict"
            }
          },
          {
            "description": "Required (`411` without it); browsers and HTTP clients set it from the body",
            "in": "header",
            "name": "Content-Length",
            "required": false,
            "schema": {
              "format": "int64",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            }
          },
          "description": "The raw content",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                }
              }
            },
            "description": "A new version of the file of that name (`on_conflict=new_version`)"
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                }
              }
            },
            "description": "A new file, `scan_status: scanning`"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`upload_incomplete`: the body was shorter or longer than `Content-Length`, or stalled"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or parent folder"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`name_taken` (`details.existing_id`) or `workspace_archived`"
          },
          "411": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`length_required`: `Content-Length` is missing"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`file_too_large` or `storage_limit_reached`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`invalid_name` or `validation_failed`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`too_many_uploads`: the caller's concurrent uploads"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`storage_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Streams one file into the space. The body is the raw content; its type is sniffed, not\ntaken from `Content-Type`. The file is `scanning` until the malware scan finds it clean.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/files/{file_id}": {
      "get": {
        "operationId": "getFile",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                }
              }
            },
            "description": "The file; its `ETag` is `\"r{revision}\"`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such file in this space"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "One file and its versions' state.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:read"
      },
      "patch": {
        "operationId": "updateFile",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The `\"r{revision}\"` ETag; a mismatch is 412",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEntry"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                }
              }
            },
            "description": "The renamed or moved file"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such file, or no such target folder"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`name_taken` or `workspace_archived`"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`precondition_failed`: `If-Match` is not the current revision (`details.current`)"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`invalid_name`, `cross_workspace_move`, `validation_failed` or `invalid_body`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Renames or moves a file.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:write"
      },
      "delete": {
        "operationId": "trashFile",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The `\"r{revision}\"` ETag; a mismatch is 412",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrashItem"
                }
              }
            },
            "description": "The entry, now in the trash"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such entry in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`precondition_failed`: `If-Match` is not the current revision"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Moves the file to the trash.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/files/{file_id}/content": {
      "get": {
        "operationId": "downloadFile",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "A clean version; defaults to the newest clean one.",
            "in": "query",
            "name": "version",
            "required": false,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "Defaults to `attachment`.",
            "in": "query",
            "name": "disposition",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Disposition"
            }
          },
          {
            "description": "A native document's export format (one of its `connector.export_formats`); defaults to\n`pdf` inline and the editable format as an attachment.",
            "in": "query",
            "name": "format",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One `bytes=` range",
            "in": "header",
            "name": "Range",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The content of the newest clean version (or `version`), with its sniffed `Content-Type` and `ETag: \"{version_id}\"`"
          },
          "206": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The requested `Range`"
          },
          "304": {
            "description": "`If-None-Match` matches"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such file or version in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`file_scanning` (`Retry-After`), `file_quarantined` or `file_scan_failed`: no clean version"
          },
          "416": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`range_not_satisfiable`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`storage_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Downloads a clean version. `HEAD` answers the same headers without the body. Served as an\nattachment unless `disposition=inline` and the type is on the inline allow-list; HTML and SVG\nnever are.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:read"
      },
      "put": {
        "operationId": "uploadFileVersion",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The `\"{version_id}\"` content ETag the edit started from",
            "in": "header",
            "name": "If-Match",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Required (`411` without it); browsers and HTTP clients set it from the body",
            "in": "header",
            "name": "Content-Length",
            "required": false,
            "schema": {
              "format": "int64",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            }
          },
          "description": "The raw content",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                }
              }
            },
            "description": "The file with its new version, `scan_status: scanning`"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`upload_incomplete`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such file in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`"
          },
          "411": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`length_required`"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`version_conflict`: someone saved a newer version (`details.current_version_id`)"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`file_too_large` or `storage_limit_reached`"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`precondition_required`: `If-Match` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`too_many_uploads`"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`storage_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Saves new content as the next version, if the caller edited the current one.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/files/{file_id}/runs": {
      "post": {
        "operationId": "startCodeRun",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartRun"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunAccepted"
                }
              }
            },
            "description": "Queued; repeating `client_run_id` returns the same run"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`usage_limit_reached`, `billing_restricted`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `tier_not_available`, `invalid_origin`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such file or version in this space; `environment_not_found`"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`run_in_progress`, `file_scanning`; `environment_not_ready`: the environment is off"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`inputs_too_large`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`file_not_runnable`: no rule of the environment (or of any built-in, when none is named) matches the file (`details.patterns`); `validation_failed`; `sandbox_tier_unavailable`: the installation doesn't offer that size (`details.enabled_tiers`)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`sandbox_unavailable`: no gVisor sandbox on this installation (`details.reason`); or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Runs a code file in a gVisor sandbox as the caller. Output streams from\n`…/runs/{run_id}/events`; outputs are saved as new file versions.",
        "tags": [
          "code-runs"
        ],
        "x-ivy-api-key-scope": "code_runs:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/files/{file_id}/versions": {
      "get": {
        "operationId": "listFileVersions",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Opaque cursor from a previous page's `next_cursor`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-100, default 25.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileVersionList"
                }
              }
            },
            "description": "The versions, newest first"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such file in this space"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The file's version history.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/files/{file_id}/versions/{version}/restore": {
      "post": {
        "operationId": "restoreFileVersion",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "The current version's `\"{version_id}\"` content ETag",
            "in": "header",
            "name": "If-Match",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                }
              }
            },
            "description": "The file; the restored content is its new current version"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such file or version in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`version_not_clean` or `workspace_archived`"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`version_conflict` (`details.current_version_id`)"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`storage_limit_reached`"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`precondition_required`: `If-Match` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Copies an older clean version into a new current version.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/flow-runs/{run_id}": {
      "get": {
        "operationId": "getFlowRun",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowRunView"
                }
              }
            },
            "description": "The run page: content only when you may read it (`content_visible`)"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such run you may know of, or flows are off"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "A run's page (§10): every step's attempts and outcome, and its content for its readers.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/flow-runs/{run_id}/cancel": {
      "post": {
        "operationId": "cancelFlowRun",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowRunView"
                }
              }
            },
            "description": "The run, cancelled: its current step was stopped; a run that has finished is returned as it is"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`, `forbidden`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such run, or flows are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workflow_unavailable`: runs can't be changed right now; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Cancels a run: people who can run the flow and space admins; a test run only its\ntester.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:run"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/flow-runs/{run_id}/events": {
      "get": {
        "operationId": "streamFlowRunEvents",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Resume after this event",
            "in": "header",
            "name": "Last-Event-ID",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/RunEventRecord"
                }
              }
            },
            "description": "Server-sent events"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such run you may know of, or flows are off"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: `Last-Event-ID` is not an event id"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "A run's live events as server-sent events whose `id` is the event's sequence and whose name\nis its `kind`: statuses and ids, never content. Resume with `Last-Event-ID`. The stream ends\nonce the run has finished and every event was sent.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/flow-runs/{run_id}/from": {
      "post": {
        "operationId": "runFlowFromStep",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunFromStep"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowRunAccepted"
                }
              }
            },
            "description": "The new run started: the steps before the chosen one are reused from the run, the rest run again"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`run_content_hidden`: you may see only that the run ran; `not_your_run`: it acts as the person who started it; `insufficient_scope`, `workspace_content_restricted`, `forbidden`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such run you may know of, no such step, or flows or paths are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`run_in_progress`; `test_run`: test runs start again from the editor; `cannot_run_from_here`: a step before it didn't finish; `run_from_version_changed`: the flow has another active version; `run_from_reused_erased`: what a step to reuse did, or the run's input, was erased; `run_from_changed_inputs`: the trigger's file, or a file a step to reuse read, has a newer version; `input_missing`: a file the run read or a step to reuse saved is being deleted; `busy`; `workflow_inactive`: the flow was switched off while the run started; `workspace_archived`; on the three `run_from_…` codes and `input_missing`, run it again from the start"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Run from here (flow-paths-design §8 phase 4): a new run of the same version that reuses the\noutputs of the steps before `step_id` from this run, without doing their work again.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:run"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/flow-runs/{run_id}/steps/{step_id}/files/{n}": {
      "get": {
        "operationId": "downloadFlowRunFile",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "step_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The file's position in the step's files, from 0",
            "in": "path",
            "name": "n",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The file's bytes, as an attachment"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such run file, or the caller reads neither the run's content nor a post that attached it"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`storage_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Downloads a run file (§10): the `n`th file of a step, or of the run files a `post` step\nattached, which that post's audience may open too (§5.5).",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/flows": {
      "get": {
        "operationId": "listFlows",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowList"
                }
              }
            },
            "description": "Files recognised as flows, with their activation state, last run and next run; never run content"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or flows are off"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The space's flow files (`*.ivy-flow.yaml`, or the older `*.ivy-workflow.yaml`, which still\nworks) and their status line.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/flows/check": {
      "post": {
        "operationId": "checkFlow",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckFlow"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowCheck"
                }
              }
            },
            "description": "The check's errors, the outside-reach report, who may activate it and what the space identity can't reach"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such file or version, or flows are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`file_scanning`, `file_quarantined`, `file_scan_failed`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`not_a_workflow`, `file_too_large`, `invalid_encoding`, `validation_failed`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`storage_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Checks a version without activating it (§7.2); a dry run while editing.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/flows/code-files": {
      "get": {
        "operationId": "listFlowCodeFiles",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowCodeFileList"
                }
              }
            },
            "description": "Runnable code files in the space's Ivy folders, with the path a step names them by"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or flows are off"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The space's runnable code files, for the quick forms' code step (§8.4).",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/flows/templates": {
      "get": {
        "operationId": "listFlowTemplates",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowTemplateList"
                }
              }
            },
            "description": "The flow files space packages ship, to copy as new inactive files"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or drafting flows is off"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Flow templates (§11) from the always-on spaces and those the organisation imported.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/flows/{file_id}/deactivate": {
      "post": {
        "operationId": "deactivateFlow",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowState"
                }
              }
            },
            "description": "The flow, inactive: its triggers are paused and running runs finish"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`, `forbidden`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such flow file, or flows are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workflow_inactive`: the flow was never active; deactivating an inactive one succeeds. `workflow_changed`, `trigger_changed`, `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`not_a_workflow`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Deactivates a flow: new runs stop at once; running runs continue unless cancelled.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/flows/{file_id}/resume": {
      "post": {
        "operationId": "resumeFlow",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowState"
                }
              }
            },
            "description": "The flow with its paused triggers active again; their failure count starts over"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`, `forbidden`; `workflow_blocked_by_admin`, `trigger_paused_by_admin`: only an organisation admin lifts an organisation admin's pause"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such flow file, or flows are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workflow_inactive`, `trigger_changed`, `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`not_a_workflow`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Resumes a paused flow (§8.1): its paused triggers start runs again.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/flows/{file_id}/runs": {
      "get": {
        "operationId": "listFlowRuns",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`next_before` of the previous page.",
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "1-100, default 25.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowRunList"
                }
              }
            },
            "description": "The flow's runs, newest first, and your own test runs: statuses only"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such flow file, or flows are off"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, `not_a_workflow`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Lists a flow's runs.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:read"
      },
      "post": {
        "operationId": "startFlowRun",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartFlowRun"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowRunAccepted"
                }
              }
            },
            "description": "The run started, queued for a free slot or was skipped (`reason`)"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`people_only_workflow`: it asks or emails people, so a key can't start it; `workspace_content_restricted`, `insufficient_scope`, `forbidden`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such flow file, or flows are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workflow_inactive`, `no_manual_trigger`, `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: `inputs` isn't an object; `not_a_workflow`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Starts a run through the flow's manual trigger, acting as you or your key's identity.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:run"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/flows/{file_id}/state": {
      "get": {
        "operationId": "listFlowState",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowStateList"
                }
              }
            },
            "description": "Every key of the flow's state, its value and the run and step that wrote it"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: space admins only; `workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such flow file, or flows are off"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`not_a_workflow`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Lists a flow's state (§5.8), which its steps write with `set_state`.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/flows/{file_id}/triggers": {
      "get": {
        "operationId": "listFlowTriggers",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowTriggerList"
                }
              }
            },
            "description": "The flow's trigger rows: kind, status, a webhook's URL and its secrets' ids and dates; never secret values"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such flow file, or flows are off"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`not_a_workflow`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Lists a flow's triggers.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/folders": {
      "post": {
        "operationId": "createFolder",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFolder"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Folder"
                }
              }
            },
            "description": "The folder"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or parent folder"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`name_taken` (`details.existing_id`), `folder_limit_reached` or `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`invalid_name`, `too_deep`, `validation_failed` or `invalid_body`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Creates a folder.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/folders/{folder_id}": {
      "get": {
        "operationId": "getFolder",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "folder_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Folder"
                }
              }
            },
            "description": "The folder and its path"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such folder in this space"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "One folder.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:read"
      },
      "patch": {
        "operationId": "updateFolder",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "folder_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The `\"r{revision}\"` ETag; a mismatch is 412",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEntry"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Folder"
                }
              }
            },
            "description": "The renamed or moved folder"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such folder, or no such target parent"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`name_taken`, `move_into_descendant` or `workspace_archived`"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`precondition_failed`: `If-Match` is not the current revision (`details.current`)"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`invalid_name`, `cross_workspace_move`, `validation_failed` or `invalid_body`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Renames or moves a folder.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:write"
      },
      "delete": {
        "operationId": "trashFolder",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "folder_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The `\"r{revision}\"` ETag; a mismatch is 412",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrashItem"
                }
              }
            },
            "description": "The entry, now in the trash"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such entry in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`precondition_failed`: `If-Match` is not the current revision"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Moves the folder to the trash; everything in it becomes unreachable until it is restored.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/mounts": {
      "get": {
        "operationId": "listMounts",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MountList"
                }
              }
            },
            "description": "The drives mounted in the space"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Drives mounted in the space.",
        "tags": [
          "connectors"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/runs": {
      "get": {
        "operationId": "listCodeRuns",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only this file's runs.",
            "in": "query",
            "name": "file_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeRunList"
                }
              }
            },
            "description": "The runs"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The space's code runs, newest first (90 days): status, exit code, timings, CPU-seconds,\ncredits and the versions they saved. Output text is in each run's log.",
        "tags": [
          "code-runs"
        ],
        "x-ivy-api-key-scope": "code_runs:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/runs/{run_id}": {
      "get": {
        "operationId": "getCodeRun",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeRun"
                }
              }
            },
            "description": "The run"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such run in this space"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "One code run.",
        "tags": [
          "code-runs"
        ],
        "x-ivy-api-key-scope": "code_runs:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/runs/{run_id}/cancel": {
      "post": {
        "operationId": "cancelCodeRun",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Cancellation requested"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: someone else's run; `invalid_origin`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such run in this space"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Stops a run: the sandbox is deleted at once and the CPU used so far is billed.",
        "tags": [
          "code-runs"
        ],
        "x-ivy-api-key-scope": "code_runs:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/runs/{run_id}/events": {
      "get": {
        "operationId": "streamCodeRun",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Resume after this event",
            "in": "header",
            "name": "Last-Event-ID",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "`text/event-stream`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such run in this space"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: `Last-Event-ID` is not an event id"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`sandbox_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "A run's live events as server-sent events: `run_status`, `stdout`, `stderr`,\n`output_truncated`, `output_file`, `output_skipped`, `usage`, then `done` or `error`.\n`Last-Event-ID` resumes after an event for 24 hours.",
        "tags": [
          "code-runs"
        ],
        "x-ivy-api-key-scope": "code_runs:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/runs/{run_id}/log": {
      "get": {
        "operationId": "getCodeRunLog",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "The log"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such run, or it wrote nothing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "A run's stdout and stderr as plain text, capped at 10 MiB.",
        "tags": [
          "code-runs"
        ],
        "x-ivy-api-key-scope": "code_runs:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/search": {
      "get": {
        "operationId": "searchSpace",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-200 characters. Words match the start of words, with accents ignored and typos forgiven\nwhen exact words find little; `\"…\"` matches a phrase and `-word` excludes one.",
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Comma-separated: `file`, `folder`, `file_content`, `conversation`, `message`. All by default.",
            "in": "query",
            "name": "kinds",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "space_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "A user id: files they uploaded, messages they wrote.",
            "in": "query",
            "name": "author",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SearchSort"
            }
          },
          {
            "description": "Ranks results from this space first on a tie: the one on screen.",
            "in": "query",
            "name": "near_space_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Opaque cursor from a previous page's `next_cursor`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-50, default 20.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "deprecated": true,
            "description": "Legacy name of `space_id`, sent and accepted until 2027-05-31.",
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "type": "string"
            },
            "x-ivy-legacy-of": "space_id"
          },
          {
            "deprecated": true,
            "description": "Legacy name of `near_space_id`, sent and accepted until 2027-05-31.",
            "in": "query",
            "name": "near_workspace_id",
            "required": false,
            "schema": {
              "type": "string"
            },
            "x-ivy-legacy-of": "near_space_id"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResults"
                }
              }
            },
            "description": "Files, folders, conversations and messages the caller may open, best first. An API key finds files with `files:read` and conversations and messages with `conversations:read`."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`insufficient_scope`: an API key without `files:read` or `conversations:read`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such organisation or space, or the caller can't see it"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`search_unavailable`: the index isn't reachable; names can still be searched with `searchEntries`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Searches one space.",
        "tags": [
          "search"
        ],
        "x-ivy-api-key-scope": "any"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/share-links": {
      "get": {
        "operationId": "listShareLinks",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only the links to this file or folder.",
            "in": "query",
            "name": "entry_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareLinkList"
                }
              }
            },
            "description": "The space's links, or one entry's, newest first"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`; `unsupported` in the Local organisation"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The space's share links, with who created each one and when it was last opened.\n`entry_id` narrows the list to one file or folder.",
        "tags": [
          "share-links"
        ],
        "x-ivy-api-key-scope": "share_links:read"
      },
      "post": {
        "operationId": "createShareLink",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateShareLink"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedShareLink"
                }
              }
            },
            "description": "The link and its URL, shown once"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: space editors and admins only; `external_links_disabled`; `external_links_people_only` for API keys; `app_links_off`, `app_link_role_capped` (`details.max_role`), `app_links_people_only`; `workspace_content_restricted`, `insufficient_scope`, `invalid_origin`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, file or folder"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`, `share_link_limit_reached`, `app_link_limit_reached`, `app_not_approved`, `workspace_limit_reached`; `share_link_busy`: the link or its organisation's app links are being changed; retry"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`storage_limit_reached`: the organisation has no room for the app's share files"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, `password_required`, `expiry_required`, `expiry_too_long`, `recipient_not_in_organisation`, `app_not_shareable`; `unsupported` in the Local organisation"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: too many link emails today; `too_many_uploads`: the creator's uploads are busy while an app link copies its files; retry"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`email_unavailable` when `notify` is set but email isn't configured; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Creates a link to a file or folder, or with `entry_kind = app` to an app. The URL carries a\nrandom token that Ivy stores only as a hash, so it is shown only in this response. External\nlinks (`audience = anyone`) need the organisation's setting and a person; `notify` emails the\nlink. An app link creates a share space with copies of the app's `[share] files` and a\nlink identity every visitor acts as, with the link's role.",
        "tags": [
          "share-links"
        ],
        "x-ivy-api-key-scope": "share_links:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/share-links/{link_id}": {
      "get": {
        "operationId": "getShareLink",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "link_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareLink"
                }
              }
            },
            "description": "The link"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or link"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unsupported` in the Local organisation"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "One share link.",
        "tags": [
          "share-links"
        ],
        "x-ivy-api-key-scope": "share_links:read"
      },
      "patch": {
        "operationId": "updateShareLink",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "link_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateShareLink"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareLink"
                }
              }
            },
            "description": "The link"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: only the link's creator or a space admin; `app_link_role_capped` (`details.max_role`); `workspace_content_restricted`, `insufficient_scope`, `invalid_origin`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or live link"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`, `share_workspace_archived`; `share_link_busy`: the link or its organisation's app links are being changed; retry"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, `not_an_app_link`; `unsupported` in the Local organisation"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Changes an app link's role or its link identity's budget. A lower role applies at once and\nrestarts the app; a raised budget turns a link paused by its budget on again.",
        "tags": [
          "share-links"
        ],
        "x-ivy-api-key-scope": "share_links:write"
      },
      "delete": {
        "operationId": "revokeShareLink",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "link_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Revoked: the link stops working with the next request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: only the link's creator or a space admin; `workspace_content_restricted`, `insufficient_scope`, `invalid_origin`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or link"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`; `share_link_busy`: the link or its organisation's app links are being changed; retry"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unsupported` in the Local organisation"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Revokes a share link. Revoking is final; create a new link to share again. An app link's\nshare space is archived, its link identity disabled and its app stopped.",
        "tags": [
          "share-links"
        ],
        "x-ivy-api-key-scope": "share_links:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/share-links/{link_id}/refresh": {
      "post": {
        "operationId": "refreshShareLink",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "link_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RefreshedShareLink"
                }
              }
            },
            "description": "What was copied, and what a visitor changed and was left"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: only the link's creator; `workspace_content_restricted`, `insufficient_scope`, `invalid_origin`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or live link"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`, `share_workspace_archived`; `share_link_busy`: the link or its organisation's app links are being changed; retry"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`storage_limit_reached`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`not_an_app_link`; `unsupported` in the Local organisation"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`too_many_uploads`: the creator's uploads are busy; retry"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Copies the newest clean versions of an app link's share files into its share space again,\nas new versions. A file a visitor changed since the last copy is skipped and listed.",
        "tags": [
          "share-links"
        ],
        "x-ivy-api-key-scope": "share_links:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/skills": {
      "get": {
        "operationId": "listSpaceSkills",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceSkillList"
                }
              }
            },
            "description": "The space's skills"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or the caller can't see it"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The written know-how the space's agents read when it applies: the always-on spaces'\nskills, then those of every version the space imports. A chat's agent is given the ones for\nit whose apps and tools the chat has.",
        "tags": [
          "space-packages"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/trash": {
      "get": {
        "operationId": "listTrash",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Opaque cursor from a previous page's `next_cursor`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-100, default 25.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrashList"
                }
              }
            },
            "description": "Trashed folders and files, most recently trashed first"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or the caller can't see it"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The space's trash.",
        "tags": [
          "trash"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/trash/{entry_id}": {
      "delete": {
        "operationId": "deleteFromTrash",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "entry_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            },
            "description": "The purge job"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: space admins only; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such entry in this space's trash"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`jobs_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Deletes a trashed entry and everything in it permanently, every version included.",
        "tags": [
          "trash"
        ],
        "x-ivy-api-key-scope": "files:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/trash/{entry_id}/restore": {
      "post": {
        "operationId": "restoreFromTrash",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "entry_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestoredEntry"
                }
              }
            },
            "description": "The restored entry and where it went"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such entry in this space's trash"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Restores to the original folder, or to the root when that is gone; a clashing name becomes\n`name (restored).ext`.",
        "tags": [
          "trash"
        ],
        "x-ivy-api-key-scope": "files:write"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/views/{file_id}": {
      "get": {
        "operationId": "getView",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ViewDetail"
                }
              }
            },
            "description": "The board as its file's last clean version declares it"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `view_missing`: no board file with this id in place, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`view_invalid`: the board file has problems"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "A board of the space, by its file's id.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:read"
      }
    },
    "/v1/organisations/{organisation_id}/spaces/{space_id}/views/{file_id}/records": {
      "get": {
        "operationId": "listViewRecords",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ViewRecords"
                }
              }
            },
            "description": "The board's cards by column, in the board's order"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `view_missing`, `collection_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`view_invalid`, `collection_detached`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: the board's filter names a field the collection no longer indexes"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The records on a board, by column.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces": {
      "get": {
        "deprecated": true,
        "operationId": "listWorkspaces",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Include archived spaces. Defaults to `false`.",
            "in": "query",
            "name": "include_archived",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Opaque cursor from a previous page's `next_cursor`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-100, default 25.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceList"
                }
              }
            },
            "description": "Every space for organisation owners and admins, otherwise the caller's"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such organisation (or not yours)"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The organisation's spaces: all of them for organisation owners and admins, otherwise the caller's.",
        "tags": [
          "spaces"
        ],
        "x-ivy-api-key-scope": "workspaces:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}": {
      "get": {
        "deprecated": true,
        "operationId": "getWorkspace",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Space"
                }
              }
            },
            "description": "The space"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or the caller can't see it"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "One space.",
        "tags": [
          "spaces"
        ],
        "x-ivy-api-key-scope": "workspaces:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/agents": {
      "get": {
        "deprecated": true,
        "operationId": "listWorkspaceAgents",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceAgentList"
                }
              }
            },
            "description": "The space's agents with their envelopes, and why any can't run now"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or the caller can't see it"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The space's agents, active or not. Pass an active agent's `id` as\n`SendMessage.agent_id` in a chat's first message.",
        "tags": [
          "space-packages"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/app-instances": {
      "get": {
        "deprecated": true,
        "operationId": "listWorkspaceAppInstances",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppInstanceList"
                }
              }
            },
            "description": "The space's own running instances, by app"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space (or the caller isn't a member)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The apps the space runs for its members, each in a sandbox of its own; not those\nrunning in conversations' sessions.",
        "tags": [
          "apps"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/apps": {
      "get": {
        "deprecated": true,
        "operationId": "listWorkspaceApps",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceAppList"
                }
              }
            },
            "description": "The apps and the open-with choices, with an `ETag` over the versions and choices they come from"
          },
          "304": {
            "description": "`If-None-Match` matches"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or the caller can't see it"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The apps the space's members open files with: the always-on spaces' apps, then the\napps of every version the space imports, each from the version that declares it.",
        "tags": [
          "space-packages"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/apps/{app_id}/approval": {
      "get": {
        "deprecated": true,
        "operationId": "getAppApprovalLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppApprovalReview"
                }
              }
            },
            "description": "The app as its files are now, the approved snapshot and the changes between them"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space (or the caller can't see it), or the space's own files declare no app of this id and none is approved"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "What a person reviews before approving one of the space's own apps: its snapshot as the\nfiles make it now (`problem` says why there is none), the snapshot approved before, the\nfiles changed between them with diffs of the text ones, what makes it a space admin's to\napprove, and whether the caller may approve or revoke it.",
        "tags": [
          "apps"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/apps/{app_id}/asset": {
      "get": {
        "deprecated": true,
        "operationId": "getAppAssetLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The file's path from the app's `root`, such as `cmaps/UniJIS-UCS2-H.bcmap`.",
            "in": "query",
            "name": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "As for the app's page: `SpaceApp.source_space_id`.",
            "in": "query",
            "name": "source_space_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`AppPage.version_id`, the version or snapshot the page came from: that one's file only,\nelse `404`, and then the answer never changes.",
            "in": "query",
            "name": "version_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "deprecated": true,
            "description": "Legacy name of `source_space_id`, sent and accepted until 2027-05-31.",
            "in": "query",
            "name": "source_workspace_id",
            "required": false,
            "schema": {
              "type": "string"
            },
            "x-ivy-legacy-of": "source_space_id"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The file, with a `Content-Type` from its extension and `ETag: \"{version_id}\"`; immutable when the request names `version_id`"
          },
          "304": {
            "description": "`If-None-Match` matches"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space (or the caller can't see it), no page app of this id, or no file of the app at `path` under its `root`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`app_too_large`: the file is larger than an app's files may be"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "A file of one of the space's page apps, by its path from the app's `root`, from the version\nor approved snapshot its page comes from (`getAppPage`): what the page asks for with\n`window.ivy.asset`. Only files the app owns under its root are served, never its default\nfile.",
        "tags": [
          "space-packages"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/apps/{app_id}/instances": {
      "post": {
        "deprecated": true,
        "description": "With a `conversation_id`, it runs in the sandbox session of the conversation, which starts\nif none runs: the session's job stages the app read-only at `/app/{app_id}` and runs its\nprocesses beside the agent's shell, as the person the session acts for. A session runs at\nmost 3 apps.\n\nWithout one, the space runs it for its members in a sandbox of its own, as the\nspace identity, which it bills; one instance per app. It takes one of the\norganisation's app slots (Free 0, Business 5) and stops after 15 minutes without activity.\n\n`write` apps are for the space's editors and admins; `read` apps for any member, and\nwhat they change in the space's files is never saved.",
        "operationId": "startAppInstanceLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartAppInstance"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppInstance"
                }
              }
            },
            "description": "The app already runs there (the conversation's session, or the space's own sandbox): its instance"
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppInstance"
                }
              }
            },
            "description": "The instance, `starting` until its job has staged the app and started its processes"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Viewers can't start a `write` app; `workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, conversation or app (or the caller can't see it)"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`app_not_approved`: one of the space's own apps no person approved yet (or an imported space's app); `app_runtime_unavailable`: no sandbox environment the installation has on is the app's `environment` (a session's runs apps of the session environment, of the environments it `provides` and `shell`; the space's own any built-in environment); `too_many_apps`: the session already runs 3; `app_start_conflict`: concurrent starts kept winning, try again; `file_scanning`, `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`app_not_runnable`: the app declares no processes; `invalid_app`, `app_too_large`, `validation_failed`, `invalid_body`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`sandbox_busy`: the organisation's sandbox sessions, or for a space's instance its app slots, are all in use; for app slots `details.holders` names the instances holding them that the caller can see (`instance_id`, `workspace_id`, `app_id`) and `details.other_holders` counts the rest"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`sandbox_unavailable`: code execution is off or no sandbox worker runs; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Starts the app, or answers the instance of it already running there.",
        "tags": [
          "apps"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/apps/{app_id}/instances/{instance_id}": {
      "get": {
        "deprecated": true,
        "operationId": "getAppInstanceLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppInstance"
                }
              }
            },
            "description": "The instance, with what its processes last reported"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such instance of this app (or the caller can't see its conversation or space)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "One instance of the app: its state, why it stopped, and what its processes last reported.",
        "tags": [
          "apps"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      },
      "delete": {
        "deprecated": true,
        "operationId": "stopAppInstanceLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppInstance"
                }
              }
            },
            "description": "Its job stops it: its processes get a grace period, then the last checkpoint saves what they wrote"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Viewers can't stop a `write` app; `workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such instance of this app (or the caller can't see its conversation or space)"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Stops the instance. A conversation's session keeps running; a space's instance takes\nits sandbox with it.",
        "tags": [
          "apps"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/apps/{app_id}/instances/{instance_id}/decisions": {
      "post": {
        "deprecated": true,
        "description": "Only the instance's own app token asks (the TypeSafe AI space's app offers it to agents\nas tools). The call runs on the installation's TypeSafe AI account and is billed in credits\nas a model call of the app's principal (source `decision`), within the plan's limits. The\nstate and questions are never logged.",
        "operationId": "decideLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Decisions"
                }
              }
            },
            "description": "An answer to each question, in the request's order"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`usage_limit_reached`, `billing_restricted`, `service_identity_limit_reached`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`insufficient_scope`: only an app instance asks, with its own app token; viewers can't use a `write` app. `eu_only_processing`: the organisation allows only EU processing, and TypeSafe AI has no EU route. `access_revoked`: the app's principal lost access, or the space was archived, before the decision ran"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Not the token's organisation or space"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed` with the `field` and `reason` (`required`, `too_long`, `out_of_range`, `duplicate`, `invalid_format`, `not_allowed`); `invalid_body`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the instance's requests per minute"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`decision_refused`: TypeSafe AI refused the questions"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`provider_unavailable`: this installation has no TypeSafe AI account, or it didn't answer in time; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Asks TypeSafe AI's Jev the instance's questions about a state, all in one call: yes or no,\none of several options, or a place on a scale, each answer with its probability and, where\nJev gives one, its confidence, so the app acts on confident answers and hands the rest on.",
        "tags": [
          "apps"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/apps/{app_id}/instances/{instance_id}/events": {
      "get": {
        "deprecated": true,
        "operationId": "streamAppInstanceLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Resume after this event",
            "in": "header",
            "name": "Last-Event-ID",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "`text/event-stream`: `status` (an `AppInstance`) and `log` events"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such instance of this app (or the caller can't see its conversation or space)"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: `Last-Event-ID` is not an event id"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`sandbox_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The instance's status, then `status` whenever it changes and `log` lines (`process`, `seq`,\n`stream`, `text`) while the stream is open, until it stops. Following counts as activity, so\nthe instance doesn't idle while someone watches. Reading the log is audited\n(`app.logs_read`). `Last-Event-ID` resumes after an event.",
        "tags": [
          "apps"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/apps/{app_id}/instances/{instance_id}/images": {
      "post": {
        "deprecated": true,
        "description": "Only the instance's own app token asks (the AI agents space's images app offers it to agents\nas a tool), and only a `write` app. The organisation's AI settings pick the model: a provider\nit allows, served in the EU while it keeps processing there; `provider` names one. The call\nruns on the installation's provider accounts and is billed in credits by the tokens the\nprovider reports (source `image_generation`), within the plan's limits. The prompt is never\nlogged.",
        "operationId": "generateImagesLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageGenerationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeneratedImages"
                }
              }
            },
            "description": "The new image files, in the space's \"Generated images\" folder"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`usage_limit_reached`, `billing_restricted`, `service_identity_limit_reached`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`insufficient_scope`: only an app instance asks, with its own app token; `forbidden`: only a `write` app makes images, and only for a person who may add files to the space. `no_image_provider`: the organisation's AI settings allow no provider whose images this installation offers (in the EU while it keeps processing there). `access_revoked`: the app's principal lost access, or the space was archived, before the request ran"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Not the token's organisation or space, or a reference image that isn't in it"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`file_scanning`: a reference image has no version that passed the malware scan yet"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`storage_limit_reached`: the organisation's storage has no room for the images (4 MB each), checked before the provider is called"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed` with the `field` and `reason`; `image_refused`: the provider's safety system declined the prompt, with its reason; `unsupported_type`, `too_large`: a reference image that isn't a PNG, JPEG or WebP of at most 20 MB"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the instance's requests per minute"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`image_failed`: the provider failed"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`images_unavailable`: this installation makes no images, the provider is busy, or it didn't answer in time; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Makes images from a description, optionally based on images in the space, with Google's or\nOpenAI's image model, and saves them to the space's \"Generated images\" folder, scanned like\nany upload.",
        "tags": [
          "apps"
        ],
        "x-ivy-api-key-scope": "files:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/apps/{app_id}/instances/{instance_id}/log": {
      "get": {
        "deprecated": true,
        "operationId": "getAppInstanceLogLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/plain": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The last 256 KiB each process wrote, kept for 7 days after the instance stopped"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such instance of this app, or no log kept (it still runs, or stopped more than 7 days ago)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "An instance's log as it stopped. Logs are space content; reading one is audited\n(`app.logs_read`).",
        "tags": [
          "apps"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/apps/{app_id}/instances/{instance_id}/tools/{tool}/calls": {
      "post": {
        "deprecated": true,
        "operationId": "callAppToolLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "instance_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The tool's name as the app declares it, without the app's prefix",
            "in": "path",
            "name": "tool",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CallAppTool"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppToolCallResult"
                }
              }
            },
            "description": "What the app's MCP server answered; `is_error` when the tool reported an error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Viewers can't use a `write` app; `workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such instance of this app (or the caller can't see its conversation); `app_tool_unavailable`: the app declares no such tool, or offers no tools here"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`app_not_running`: the instance has stopped; `app_runs_as_another`: the instance runs as another person in the conversation; the caller stops it and, once it has stopped, starts the app again as themselves"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`invalid_tool_input`: the input doesn't fit the tool's schema; `invalid_body`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`app_tool_failed`: the app's MCP server failed, or didn't answer within 40 s"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`sandbox_unavailable`: the conversation's sandbox didn't answer; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Calls one of the app's tools on this running instance, as the caller, checked like a call\nfrom the agent: its page app's `window.ivy.callTool(name, input)` arrives here through the\nhost. The call is recorded (`app.tool_called`), never its input or output; the session\nsaves what the call changed in the working copy. A call has 40 s, on an instance that\nalready runs; tools that take longer are for the agent.",
        "tags": [
          "apps"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/apps/{app_id}/page": {
      "get": {
        "deprecated": true,
        "operationId": "getAppPageLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`SpaceApp.source_space_id`, for an app whose id another of the space's apps\nhas too. Without it, the first app of the id in `listSpaceApps`' order.",
            "in": "query",
            "name": "source_space_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`WorkspaceApp.version_id`: the page of that version only, else `404`, so a page never\nruns with another version's file handlers. With `source_workspace_id` of a space Ivy\nships, that version serves its page or `ui` page even once the space has a newer one.",
            "in": "query",
            "name": "version_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "A `[[ui]]` resource's name: its page (an MCP Apps view, `ui://<app>/<name>`) instead\nof the app's own, for any app Ivy ships, whatever its frontend.",
            "in": "query",
            "name": "ui",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "deprecated": true,
            "description": "Legacy name of `source_space_id`, sent and accepted until 2027-05-31.",
            "in": "query",
            "name": "source_workspace_id",
            "required": false,
            "schema": {
              "type": "string"
            },
            "x-ivy-legacy-of": "source_space_id"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppPage"
                }
              }
            },
            "description": "The page, with `ETag: \"{version_id}\"`"
          },
          "304": {
            "description": "`If-None-Match` matches"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space (or the caller can't see it), or the space has no page app of this id, or its app declares no such `ui` resource"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The page of one of the space's page apps (`frontend = \"page\"`), from the version of the\nspace that declares the app: an always-on space or one the space imports. With\n`ui`, the page of one of the app's `[[ui]]` resources (an MCP Apps view a tool result names),\nfrom the same version. The HTML comes as data, to hand to the sandboxed preview origin: it\nnever runs on the app's origin.",
        "tags": [
          "space-packages"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/apps/{app_id}/snapshot": {
      "get": {
        "deprecated": true,
        "operationId": "getAppSnapshotLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "app_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppSnapshot"
                }
              }
            },
            "description": "The app's definition, its files' hashes and the snapshot's hash"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space (or the caller can't see it), or the space has no app of this id"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`file_scanning`, `file_quarantined`, `file_scan_failed`: a file of the app has no clean version"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`invalid_app`: the app's manifest breaks a rule, named in the message; `app_too_large`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Exactly what one of the space's apps runs: the manifest's definition (processes, tools\nwith their input schemas, UI resources), every file it is made of with its SHA-256, and the\nsnapshot's hash over them. The first app of this id in `listSpaceApps`' order (the\nalways-on spaces' versions, then the versions the space imports) comes first, so it\nshadows an app of the same id in the space's own files; else the app those files declare\nin a `*.ivy-app.toml` manifest, read from clean versions.",
        "tags": [
          "space-packages"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/channels": {
      "get": {
        "deprecated": true,
        "operationId": "listChannelsLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelList"
                }
              }
            },
            "description": "Open channels, the invited ones the caller belongs to, and for space admins every channel's name, by name"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or channels are off"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The space's channels.",
        "tags": [
          "channels"
        ],
        "x-ivy-api-key-scope": "channels:read"
      },
      "post": {
        "deprecated": true,
        "operationId": "createChannelLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateChannel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Channel"
                }
              }
            },
            "description": "The channel; the creator is its first member"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: space editors and admins create channels; `workspace_content_restricted`, `invalid_origin`; `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or channels are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`channel_name_taken`; `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, with reason `channels_are_open` for `membership: invited` (every channel is open to its space) and for any `members`; `agent_not_enabled` for the default agent"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Creates an open or invited channel.",
        "tags": [
          "channels"
        ],
        "x-ivy-api-key-scope": "channels:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/channels/{channel_id}": {
      "get": {
        "deprecated": true,
        "description": "Space admins also see an invited channel's name and member count.",
        "operationId": "getChannelLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Channel"
                }
              }
            },
            "description": "The channel"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or channel the caller sees, or channels are off: an invited channel is 404 to everyone but its members (space admins see its name and count only)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "A channel the caller reads.",
        "tags": [
          "channels"
        ],
        "x-ivy-api-key-scope": "channels:read"
      },
      "patch": {
        "deprecated": true,
        "operationId": "updateChannelLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateChannel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Channel"
                }
              }
            },
            "description": "The channel as changed"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: only space admins and the creator rename, archive or change the default agent; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or channel the caller sees, or channels are off: an invited channel is 404 to everyone but its members (space admins see its name and count only)"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`channel_name_taken`; `channel_archived` (unarchive it first); `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, also for `notify` from someone who hasn't joined; `agent_not_enabled`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Renames, describes, archives or changes the default agent (space admins and the\ncreator; never the membership of an invited channel), or sets the caller's own notification\nlevel for the channel's threads.",
        "tags": [
          "channels"
        ],
        "x-ivy-api-key-scope": "channels:write"
      },
      "delete": {
        "deprecated": true,
        "operationId": "deleteChannelLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted: its threads can't be read any more and go with the next retention pass"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: only space admins and the creator delete a channel; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or channel the caller sees, or channels are off: an invited channel is 404 to everyone but its members (space admins see its name and count only)"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed` with reason `default_channel`: the space's default channel stays"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Deletes the channel (space admins and its creator); its threads go with it.",
        "tags": [
          "channels"
        ],
        "x-ivy-api-key-scope": "channels:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/channels/{channel_id}/pins": {
      "get": {
        "deprecated": true,
        "operationId": "listChannelPinsLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelPinList"
                }
              }
            },
            "description": "The pinned files the caller can open; trashed and deleted ones drop out"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or channel the caller sees, or channels are off: an invited channel is 404 to everyone but its members (space admins see its name and count only)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The channel's pinned files the caller can open, in pin order.",
        "tags": [
          "channels"
        ],
        "x-ivy-api-key-scope": "channels:read"
      },
      "post": {
        "deprecated": true,
        "operationId": "pinChannelFileLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PinChannelFile"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelPinList"
                }
              }
            },
            "description": "The pins after the change"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: members who may edit the space's files pin; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or channel the caller sees, or channels are off: an invited channel is 404 to everyone but its members (space admins see its name and count only)"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`channel_archived`; `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`invalid_file`; `validation_failed` past [20] pins"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Pins a space file to the channel: its threads' agents get it as context.",
        "tags": [
          "channels"
        ],
        "x-ivy-api-key-scope": "channels:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/channels/{channel_id}/pins/{file_id}": {
      "delete": {
        "deprecated": true,
        "operationId": "unpinChannelFileLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "channel_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Unpinned"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: members who may edit the space's files unpin; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such channel or pinned file, or channels are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`channel_archived`; `workspace_archived`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Unpins a file from the channel.",
        "tags": [
          "channels"
        ],
        "x-ivy-api-key-scope": "channels:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/collections": {
      "get": {
        "deprecated": true,
        "operationId": "listCollectionsLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionList"
                }
              }
            },
            "description": "The space's collections: the built-in ones, then its own by name, each with the file version it serves and any version waiting for a space admin"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or collections are off"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The space's collections.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/collections/{name}": {
      "get": {
        "deprecated": true,
        "operationId": "getCollectionLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionDetail"
                }
              }
            },
            "description": "The collection, the declaration it serves and the one waiting for a space admin"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, or collections are off"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "A collection of the space, by name.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/collections/{name}/records": {
      "post": {
        "deprecated": true,
        "operationId": "createRecordLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRecord"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordView"
                }
              }
            },
            "description": "The record"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: the collection's `access.create` decides who creates; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`collection_full`, `key_taken`: another record has the collection's key value (`details.record_id`), `key_busy`, `collection_detached`, `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, per field in `field`: `field_missing`, `read_only`, `required`, `invalid_type`, `value_unknown`, `not_a_space_member`, `file_missing`, `record_missing`, `record_too_large`, …"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the collection takes 50 writes a second, 200 at once"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Creates a record.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/collections/{name}/records/batch": {
      "post": {
        "deprecated": true,
        "operationId": "writeRecordBatchLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordBatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordBatchResult"
                }
              }
            },
            "description": "Each item's outcome in order; an item that failed doesn't undo the others, and `sync.delete_missing` deletes nothing then"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: `sync.delete_missing` needs the collection's `access.delete`; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`collection_has_no_key` for `upsert`, `collection_detached`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: one of `upsert`, `create` and `delete`, with at most 500 items"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Upserts, creates or deletes up to 500 records, each its own write, paced by the\ncollection's write rate (collections-design §5.2).",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/collections/{name}/records/by-key/{value}": {
      "put": {
        "deprecated": true,
        "operationId": "upsertRecordLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The value of the collection's `key` field",
            "in": "path",
            "name": "value",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertRecord"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpsertedRecord"
                }
              }
            },
            "description": "The record and whether it was `created`, `updated` or `unchanged`: an upsert that changes nothing writes nothing and starts no flow; `ETag: \"r{revision}\"`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: the collection's `access.create` decides who creates and `access.update` who changes; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`collection_has_no_key`, `key_busy`, `record_changed`, `collection_full`, `collection_detached`, `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, per field in `field`: `key_mismatch` when `fields` gives another key value, `key_immutable`, and those of a create or change"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the collection takes 50 writes a second, 200 at once"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Creates the record with this key value, or changes the given fields of the record that has\nit, so data imported again updates rather than duplicates (collections-design §5.1).",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/collections/{name}/records/query": {
      "post": {
        "deprecated": true,
        "operationId": "queryRecordsLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordQuery"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordPage"
                }
              }
            },
            "description": "A page of the records that match, in the order asked. A page can hold fewer than `limit` records, even none, while `next_cursor` says more may remain"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`collection_detached`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: `field_missing`, `field_not_indexed`, `field_not_sortable`, `invalid_value`, `query_too_broad`, the cursor or the limit"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Queries a collection's records by their indexed fields.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/collections/{name}/records/{record_id}": {
      "get": {
        "deprecated": true,
        "operationId": "getRecordLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordView"
                }
              }
            },
            "description": "The record; `ETag: \"r{revision}\"`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, `record_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`collection_detached`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "One record.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:read"
      },
      "patch": {
        "deprecated": true,
        "operationId": "updateRecordLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The `\"r{revision}\"` ETag; a mismatch is 412",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRecord"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordView"
                }
              }
            },
            "description": "The record as changed"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: the collection's `access.update` decides who changes; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, `record_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`collection_detached`, `workspace_archived`"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`precondition_failed`: `If-Match` is not the current revision (`details.current`)"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, per field in `field`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Changes a record's fields.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:write"
      },
      "delete": {
        "deprecated": true,
        "operationId": "deleteRecordLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The `\"r{revision}\"` ETag; a mismatch is 412",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted, with its comments; files its fields name stay"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: the collection's `access.delete` decides who deletes; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, `record_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`collection_detached`, `workspace_archived`"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`precondition_failed`: `If-Match` is not the current revision (`details.current`)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Deletes a record.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/collections/{name}/records/{record_id}/comments": {
      "get": {
        "deprecated": true,
        "operationId": "listRecordCommentsLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordCommentList"
                }
              }
            },
            "description": "The record's comments, oldest first"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, `record_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`collection_detached`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "A record's comments.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:read"
      },
      "post": {
        "deprecated": true,
        "operationId": "createRecordCommentLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRecordComment"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordComment"
                }
              }
            },
            "description": "The comment"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: whoever may change the record comments on it; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, `record_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`comments_off`: the collection takes none; `too_many_comments`, `collection_detached`, `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Comments on a record.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/collections/{name}/records/{record_id}/move": {
      "post": {
        "deprecated": true,
        "operationId": "moveRecordLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "record_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The `\"r{revision}\"` ETag; a mismatch is 412",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveRecord"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordView"
                }
              }
            },
            "description": "The record in its new column and place; `ETag: \"r{revision}\"`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: the collection's `access.update` decides who moves; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, `record_missing`, `view_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`view_invalid`: the board file has problems; `collection_detached`, `workspace_archived`"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`precondition_failed`: `If-Match` is not the current revision (`details.current`)"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: `column_missing`, `unknown_card` (`before`, `after`), `view_of_another_collection`, `read_only`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Moves a record on a board: into a column, which sets the board's `group_by` field, and\nbetween two cards.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/collections/{name}/schema": {
      "get": {
        "deprecated": true,
        "operationId": "getCollectionSchemaLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordSchema"
                }
              }
            },
            "description": "The JSON Schema of a record's `fields`, derived from the declaration the collection serves"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`collection_detached`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The JSON Schema a collection's records' fields follow, for apps and code.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/collections/{name}/sources": {
      "get": {
        "deprecated": true,
        "operationId": "listRecordSourcesLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordSourceList"
                }
              }
            },
            "description": "Each source the collection file declares and how its mirror stands: applied or not, paused, its count, last sync and error, and its people links"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `collection_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`collection_detached`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "A collection's sources and their state.",
        "tags": [
          "github"
        ],
        "x-ivy-api-key-scope": "records:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/connections": {
      "get": {
        "deprecated": true,
        "operationId": "listConnectionsLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionList"
                }
              }
            },
            "description": "Declared connections and stored values: names, hosts, auth type, whether a value is set, its binding and dates; never values"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or connections are off"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The space's connections and the state of their values.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/conversations": {
      "get": {
        "deprecated": true,
        "operationId": "listConversationsLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Opaque cursor from a previous page's `next_cursor`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-100, default 25.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "`mine` (default), or, while conversations with people are on, `private`, `direct`,\n`groups`, `assigned` or `channel` (`shared` is deprecated).",
            "in": "query",
            "name": "view",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ConversationView"
            }
          },
          {
            "description": "Only chats whose title contains this text, ignoring case.",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only conversations this participant (`user:<id>` or `agent:<id>`) takes part in.",
            "in": "query",
            "name": "peer",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "With `view=channel`: the channel whose threads to list.",
            "in": "query",
            "name": "channel_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`true`: only the conversations the caller archived. Left out or `false`: only those they\ndidn't, except that `q` finds archived ones too. A channel's threads aren't archived.",
            "in": "query",
            "name": "archived",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationList"
                }
              }
            },
            "description": "The caller's chats in this space, pinned ones first, then newest first (or, with `direct`, `groups`, `shared` or `assigned`, by latest activity)"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`invalid_query`: an unknown `view`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`: organisation admins who haven't joined; `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or the caller can't see it; `direct`, `groups`, `shared`, `assigned` and `peer` while conversations with people are off; with `view=channel`, no such channel the caller reads, or channels are off"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, also for `view=channel` without `channel_id`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The caller's chats in the space, pinned ones first, then newest first; `q` keeps those\nwhose title contains it. While conversations with people are on: `direct` (each with its `peer_key`, which the Direct\nlist groups by), `groups`, `shared` and `assigned`, newest activity first, and `peer` keeps\nthe conversations that participant takes part in. While channels are on, `view=channel` with\n`channel_id` lists a channel's threads, newest activity first.",
        "tags": [
          "conversations"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      },
      "post": {
        "deprecated": true,
        "operationId": "createConversationLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CreateConversation"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conversation"
                }
              }
            },
            "description": "The chat, private to the caller (or, with `participants`, to them and the participants)"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope` (also for an API key naming a person: keys never reach people); `no_channel_grant`: an API key starting a thread in an invited channel no member granted it; `not_a_channel_member`: the caller reads this open channel but hasn't joined it, and only members post (join with `addChannelMembers`)"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or the caller can't see it; with `channel_id`, no such channel the caller reads"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`; `channel_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, also for `participants` or `visibility` while conversations with people are off, and for `channel_id` while channels are off; `not_a_workspace_member`; `agent_not_enabled`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Starts an empty chat for the caller in the space. Without a body, a chat with the\nspace's built-in assistant; with `participants`, a conversation with those space\nmembers and agents (a DM with one of them, a group with more). A space whose agent\nconversations are `shared` creates a conversation with an agent as a shared thread.",
        "tags": [
          "conversations"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/conversations/{conversation_id}": {
      "get": {
        "deprecated": true,
        "operationId": "getConversationLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationDetail"
                }
              }
            },
            "description": "The chat with its messages, and the run still answering it"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "One of the caller's chats, with its messages and the run still answering it.",
        "tags": [
          "conversations"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      },
      "patch": {
        "deprecated": true,
        "operationId": "updateConversationLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateConversation"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conversation"
                }
              }
            },
            "description": "The chat"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`; `not_a_channel_member`: moving into an open channel the caller hasn't joined, other than the default channel and the space's agent conversations channel"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: `title` must be 1-200 characters"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Renames the caller's chat or pins it to the top of `listConversations`.",
        "tags": [
          "conversations"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      },
      "delete": {
        "deprecated": true,
        "operationId": "deleteConversationLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted, with its messages, their other versions, its queue and its ratings; this can't be undone"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`run_in_progress` while the assistant is answering in it (stop the run first); `workspace_archived`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Deletes the caller's chat for good. Chats have no trash.",
        "tags": [
          "conversations"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/conversations/{conversation_id}/app-instances": {
      "get": {
        "deprecated": true,
        "operationId": "listConversationAppInstancesLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppInstanceList"
                }
              }
            },
            "description": "The conversation's instances, newest first"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such conversation in this space (or the caller can't see it)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The conversation's 20 newest app instances: those running and those stopped in the last 7\ndays.",
        "tags": [
          "apps"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/conversations/{conversation_id}/events": {
      "get": {
        "deprecated": true,
        "operationId": "streamConversationEventsLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Resume after this stream position",
            "in": "header",
            "name": "Last-Event-ID",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationStreamEvent"
                }
              }
            },
            "description": "Server-sent events"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such conversation the caller reads, or conversations with people are off"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: `Last-Event-ID` is not a stream position"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`stream_unavailable`: the live stream can't be read right now; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The conversation's live events, as server-sent events whose `id` is the stream position\nand whose name is the `kind`: messages posted, edited or deleted, reactions, the queue,\nparticipants, the conversation's own fields, and runs starting and finishing. Open it\nfirst, then load the conversation, whose `stream_seq` names the position it reflects;\nevents up to it are already in what you loaded. Resume with `Last-Event-ID`; a position\nolder than the stream keeps (24 hours) gets a single `resync` event: reload the\nconversation and open the stream again from its `stream_seq`. Events carry ids and, for a\nmessage, the message as it is when delivered (a deleted one as its tombstone). The stream\nends when the caller can no longer read the conversation.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/conversations/{conversation_id}/messages": {
      "post": {
        "deprecated": true,
        "operationId": "sendAgentMessageLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "With a repeated `client_message_id`: resume after this event",
            "in": "header",
            "name": "Last-Event-ID",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendMessage"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/AgentStreamEvent"
                }
              }
            },
            "description": "Server-sent events",
            "headers": {
              "Ivy-Run-Id": {
                "description": "The run writing the reply",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatMessage"
                }
              }
            },
            "description": "Posted without a reply, while conversations with people are on: no agent answers it (§3.4: in a group or a shared thread, agents answer only when @mentioned)"
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueuedMessage"
                }
              }
            },
            "description": "Queued while the assistant answers an earlier message; `Ivy-Run-Id` is set when it started at once because the chat had just become free",
            "headers": {
              "Ivy-Run-Id": {
                "description": "Set when the queued message has already started",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`usage_limit_reached`: the organisation used its AI credit allowance and spending limit for this period (`details`: `scope_type`, `period_end`, `can_raise_limit`); `billing_restricted`: its subscription is unpaid. A run can also end with an `error` event of either code."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope` (also when an API key mentions a person); `not_a_participant`; `not_a_channel_member`: the caller reads this open channel but hasn't joined it, and only members post (join with `addChannelMembers`), unless they take part in this thread already"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`invite_required` when the message mentions someone who isn't in this private conversation (`details.participants`: invite them, then send again); `workspace_archived`; `queue_full` when the assistant is answering and 20 messages already wait; `queue_full_for_person` when the caller already queued 10 here; `run_in_progress` when a retried `client_message_id` meets another answer in progress; `chat_busy` when the message couldn't be stored because the chat kept changing (send it again)"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed` (reason `not_quotable` for a `quote` that isn't a message of this conversation still in it); `not_a_workspace_member` or `agent_not_enabled` for a mention; `invalid_model` when `model` is not one of `listAgentModels` (or of the chat's agent's models), such as a regular variant while the organisation has EU-only processing on; `invalid_attachment` when an id in `attachments` is not a file of this space or failed its malware scan; `invalid_agent` when `agent_id` is not one of `listSpaceAgents` or differs from the chat's agent; `agent_unavailable` (with `details.reason`) when the agent can't run here yet"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`agent_unavailable` when no assistant worker is running or configured; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Sends a message and streams the assistant's reply as server-sent events. Each event's\nname is `event` and its data is the JSON of `data` in `AgentStreamEvent`; its `id` is the\nposition in the run's event log. The stream ends after `done` or `error`. The reply is\nwritten by a background run (named by the `Ivy-Run-Id` header) that keeps going if the\nconnection drops: resume with `GET …/runs/{run_id}/events` and `Last-Event-ID`. While the\nassistant is still answering an earlier message, the message joins the chat's queue\ninstead (`202`, as `queueAgentMessage`) and starts once the chat is free.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/conversations/{conversation_id}/messages/{message_id}": {
      "patch": {
        "deprecated": true,
        "operationId": "editConversationMessageLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateChatMessage"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatMessage"
                }
              }
            },
            "description": "The message, edited in every version that holds it"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Not the caller's message; `not_a_participant`; `insufficient_scope`; `workspace_content_restricted`, `invalid_origin`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such conversation or message, or conversations with people are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`edit_creates_branch`: only agent replies follow the message (or nobody else takes part), so `editAgentMessage` edits it and the agent answers again; `edit_on_platform`: written in Slack or Teams, it is edited there and Ivy follows; `invite_required` (`details.participants`); `workspace_archived`; `channel_archived`: the channel is archived and read-only"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed` (reason `not_quotable` for a `quote` that isn't an earlier message of this conversation still in it); `not_a_workspace_member`, `agent_not_enabled` for a mention"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Changes the text of your own message where it is, marked edited, without a turn. Later\ncompaction summaries are discarded so no turn reads the old text.",
        "tags": [
          "conversations"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      },
      "delete": {
        "deprecated": true,
        "operationId": "deleteConversationMessageLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted everywhere it was stored; a tombstone keeps its place"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "Neither its author nor the person an agent's reply acted for; `not_a_participant`; `insufficient_scope`; `workspace_content_restricted`, `invalid_origin`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such conversation or message, or conversations with people are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`edit_on_platform`: written in Slack or Teams, it is deleted there and Ivy follows; `workspace_archived`; `channel_archived`: the channel is archived and read-only"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Deletes a message in every version of the conversation, leaving a tombstone, and discards\nthe compaction summaries written after it.",
        "tags": [
          "conversations"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/conversations/{conversation_id}/messages/{message_id}/branch": {
      "put": {
        "deprecated": true,
        "operationId": "selectMessageBranchLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SelectBranch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationDetail"
                }
              }
            },
            "description": "The chat with the chosen version of its messages"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`; with several people, only the person who made the versions switches between them"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space, or no such message in its current version"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`run_in_progress` while the assistant is answering in this chat"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: the message has no other versions, or `index` is out of range"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Shows another version of the chat from the message carrying `branch` on: the messages from\nthere on are swapped for those of version `index`, which the model then continues from.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/conversations/{conversation_id}/messages/{message_id}/edit": {
      "post": {
        "deprecated": true,
        "operationId": "editAgentMessageLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "With a repeated `client_message_id`: resume after this event",
            "in": "header",
            "name": "Last-Event-ID",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EditMessage"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/AgentStreamEvent"
                }
              }
            },
            "description": "Server-sent events",
            "headers": {
              "Ivy-Run-Id": {
                "description": "The run writing the reply",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`usage_limit_reached`, `billing_restricted`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`; with several people, only its author edits a message"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space, or no such message in its current version"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`run_in_progress` while the assistant is answering in this chat; `edit_in_place` when others wrote after the message (edit it with `editConversationMessage`); `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, also when the message isn't the caller's own, or (reason `not_quotable`) when `quote` isn't an earlier message of this conversation still in it; `invalid_model`; `invalid_attachment`; `agent_unavailable`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`agent_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Replaces one of the caller's messages with an edited one and streams the new reply, as\n`sendAgentMessage` does. The messages from the edited one on stay as the other version of\nthat point of the chat (`ChatMessage.branch`, `selectMessageBranch`); the model sees only\nthe new version.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/conversations/{conversation_id}/messages/{message_id}/feedback": {
      "put": {
        "deprecated": true,
        "operationId": "rateAgentMessageLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RateMessage"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Rated (or the rating cleared)"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat the caller can read in this space, or no such message in its current version"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: only assistant messages are rated"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Rates one of the assistant's messages for the caller (`ChatMessage.feedback`); `null`\nclears the rating.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/conversations/{conversation_id}/messages/{message_id}/regenerate": {
      "post": {
        "deprecated": true,
        "operationId": "regenerateAgentMessageLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "message_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegenerateMessage"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/AgentStreamEvent"
                }
              }
            },
            "description": "Server-sent events",
            "headers": {
              "Ivy-Run-Id": {
                "description": "The run writing the reply",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`usage_limit_reached`, `billing_restricted`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`; with several people, only the person a reply acted for regenerates it"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space, or no such message in its current version"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`run_in_progress` while the assistant is answering in this chat; `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, also when the message isn't the assistant's; `invalid_model`; `agent_unavailable`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`agent_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Writes another reply in place of one of the assistant's and streams it, as\n`sendAgentMessage` does. The question stays; the earlier reply (with whatever followed it)\nstays as another version of that point of the chat.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/conversations/{conversation_id}/participants": {
      "get": {
        "deprecated": true,
        "operationId": "listConversationParticipantsLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParticipantList"
                }
              }
            },
            "description": "Everyone who takes or took part, with their state"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such conversation the caller reads in this space, or conversations with people are off"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The conversation's participants: people and agents, active, left, removed or revoked.",
        "tags": [
          "conversations"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/conversations/{conversation_id}/queue": {
      "get": {
        "deprecated": true,
        "operationId": "getConversationQueueLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueState"
                }
              }
            },
            "description": "The messages waiting in the chat, in the order they will start"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The chat's queue: messages sent while the assistant was answering, which start on their own\none after another, and whether it is paused.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      },
      "post": {
        "deprecated": true,
        "operationId": "queueAgentMessageLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueueMessage"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueuedMessage"
                }
              }
            },
            "description": "Queued",
            "headers": {
              "Ivy-Run-Id": {
                "description": "Set when the message started at once: the run writing the reply",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`; `not_a_participant`; `not_a_channel_member`: the caller reads this open channel but hasn't joined it, and only members post (join with `addChannelMembers`), unless they take part in this thread already"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`queue_full`: the chat already holds 20 queued messages; `queue_full_for_person`: the caller already queued 10 here; `starts_no_turn`: no agent would answer it (post it with `sendAgentMessage`); `invite_required`; `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`; `invalid_model`; `invalid_attachment`; `invalid_agent`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`agent_unavailable` when no assistant worker is running or configured; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Queues a message to send once the assistant has finished its current reply. When the chat\nis free and its queue isn't paused, the message starts at once: the response then names its\nrun in `Ivy-Run-Id` (follow it with `GET …/runs/{run_id}/events`).",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/conversations/{conversation_id}/queue/order": {
      "put": {
        "deprecated": true,
        "operationId": "reorderQueueLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReorderQueue"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueState"
                }
              }
            },
            "description": "The queue in its new order"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`version_conflict`: `ids` isn't exactly the queued messages (one started, was added, removed or edited meanwhile)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Puts the queued messages in a new order.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/conversations/{conversation_id}/queue/resume": {
      "post": {
        "deprecated": true,
        "operationId": "resumeQueueLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueState"
                }
              }
            },
            "description": "The queue, no longer paused",
            "headers": {
              "Ivy-Run-Id": {
                "description": "Set when the next message started: the run writing its reply",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`agent_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Resumes a paused queue and starts its next message if the chat is free (the started run is\nin `Ivy-Run-Id`).",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/conversations/{conversation_id}/queue/{queued_message_id}": {
      "patch": {
        "deprecated": true,
        "operationId": "updateQueuedMessageLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "queued_message_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateQueuedMessage"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueuedMessage"
                }
              }
            },
            "description": "The edited message, with its new `version`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`; `not_your_queued_message`: only its author edits it"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`version_conflict`: the message was edited since `version`; `queued_message_started`: it has already started (or was removed)"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`; `invalid_attachment`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Edits a queued message that hasn't started yet.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      },
      "delete": {
        "deprecated": true,
        "operationId": "removeQueuedMessageLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "queued_message_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Removed from the queue"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`; `not_your_queued_message`: only its author removes it"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat, or no such message waiting in its queue (it may have started)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Removes a message from the queue before it starts.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/conversations/{conversation_id}/runs/{run_id}/cancel": {
      "post": {
        "deprecated": true,
        "operationId": "cancelAgentRunLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Cancellation requested"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `invalid_origin`, `insufficient_scope`; `not_a_participant`: while conversations with people are on, only a participant stops a reply"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat or run of the caller's in this space (while conversations with people are on: no such run of a conversation the caller reads)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`agent_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Stops a run. The reply ends with an `error` event whose code is `cancelled`; what was\nwritten so far is kept. While conversations with people are on, any participant stops a\nreply, which then names who stopped it (`stopped_by`).",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/conversations/{conversation_id}/runs/{run_id}/events": {
      "get": {
        "deprecated": true,
        "operationId": "streamAgentRunLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Resume after this event",
            "in": "header",
            "name": "Last-Event-ID",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/AgentStreamEvent"
                }
              }
            },
            "description": "Server-sent events"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat or run of the caller's in this space"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: `Last-Event-ID` is not an event id"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`agent_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Follows a run's reply: the events after `Last-Event-ID` (all of them without it), then\nlive ones, as server-sent events like `sendAgentMessage`'s. Use it to resume after a dropped\nconnection or to follow a reply from another device (`active_run_id`). When the run's\nevents are gone, the stream ends with the run's outcome: `done` with its reply, or `error`\nwith the run's error code; a run that finished but whose reply can't be found ends with\n`error` code `reply_unavailable` (reload the chat).",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/conversations/{conversation_id}/sandbox": {
      "get": {
        "deprecated": true,
        "operationId": "getConversationSandboxLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxInfo"
                }
              }
            },
            "description": "The sandbox"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The chat's sandbox: its state, times and the changes waiting for the caller's\nconfirmation.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:read"
      },
      "delete": {
        "deprecated": true,
        "operationId": "stopConversationSandboxLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Stopping"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`invalid_origin`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such chat of the caller's in this space"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Stops the chat's sandbox now; files saved at earlier steps stay, and pending changes wait\nfor their decision.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/conversations/{conversation_id}/sandbox/changes/{change_set_id}/apply": {
      "post": {
        "deprecated": true,
        "operationId": "applySandboxChangesLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "change_set_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyChanges"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxInfo"
                }
              }
            },
            "description": "Applied; the sandbox with the changes still pending"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `invalid_origin`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such change set"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`version_conflict`: the file changed again; reload and decide again"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Confirms a change set (D10): deletes the files listed in `deletes` and settles each\nconflict with `keep_mine` (a new version), `keep_theirs` (nothing) or `save_copy` (a new\nfile beside it). Anything not listed is dropped.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/conversations/{conversation_id}/sandbox/changes/{change_set_id}/discard": {
      "post": {
        "deprecated": true,
        "operationId": "discardSandboxChangesLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "conversation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "change_set_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SandboxInfo"
                }
              }
            },
            "description": "Discarded"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`invalid_origin`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such change set"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Drops a change set: no file is deleted or overwritten.",
        "tags": [
          "agent"
        ],
        "x-ivy-api-key-scope": "conversations:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/entries": {
      "get": {
        "deprecated": true,
        "operationId": "listEntriesLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Defaults to `root`.",
            "in": "query",
            "name": "parent_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Folders always come first. Defaults to `name`; other sorts are refused\n(`sort_unavailable`) in folders with more than 5 000 entries.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/EntrySort"
            }
          },
          {
            "description": "Defaults to `asc`.",
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SortOrder"
            }
          },
          {
            "description": "Opaque cursor from a previous page's `next_cursor`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-200, default 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntryList"
                }
              }
            },
            "description": "A page of the folder: folders first, then files"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`: organisation admins who haven't joined; `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or folder, or the caller can't see it"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, or `sort_unavailable` for a non-name sort of a folder with more than 5 000 entries"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The folders and files in one folder of the space.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/entries/search": {
      "get": {
        "deprecated": true,
        "operationId": "searchEntriesLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-100 characters: a prefix of the name or of one of its words.",
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Opaque cursor from a previous page's `next_cursor`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-100, default 25.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntrySearchResults"
                }
              }
            },
            "description": "Folders and files whose name matches, with their paths"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or the caller can't see it"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Finds folders and files of the space by name.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/events": {
      "get": {
        "deprecated": true,
        "operationId": "streamWorkspaceEvents",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceEvent"
                }
              }
            },
            "description": "Server-sent events"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`: organisation admins who haven't joined; `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or the caller can't see it"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`live_unavailable`: poll instead; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Live hints to refetch, as server-sent events: the event name (`entries`, `file`, `scan`,\n`members`, `workspace`, `trash`, `revoked`, `records`, `channels`, `presence`, `runs`, `apps`)\nand a `SpaceEvent` as data. `presence`: a member's presence changed (`listSpacePresence`);\n`runs`: an agent turn started or ended in one of the space's conversations (their\n`run_state`); `apps`: one of the space's own apps was approved or its approval revoked. No ids or\nresume; after a reconnect, refetch everything of the space. A heartbeat comment every 25 s.",
        "tags": [
          "spaces"
        ],
        "x-ivy-api-key-scope": "workspaces:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/file-checks": {
      "post": {
        "deprecated": true,
        "operationId": "checkFileLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckFile"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileCheck"
                }
              }
            },
            "description": "The problems Ivy finds in the file as it reads its kind; `valid` when none is an error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such file or version in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`file_scanning`, `file_quarantined`, `file_scan_failed`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`not_checkable`: Ivy has no check for the file's kind; `file_too_large`, `invalid_encoding`, `validation_failed`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`storage_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Checks a file of a kind Ivy reads as configuration (a flow, `connections.ivy.yaml`, a\nspace app manifest) as Ivy does, without saving anything: a version of a file, or draft\ntext. The Files view, the agents' tools and saves by agents report the same problems.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/files": {
      "post": {
        "deprecated": true,
        "operationId": "uploadFileLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Defaults to `root`.",
            "in": "query",
            "name": "parent_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-255 characters.",
            "in": "query",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Defaults to `fail`.",
            "in": "query",
            "name": "on_conflict",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/OnConflict"
            }
          },
          {
            "description": "Required (`411` without it); browsers and HTTP clients set it from the body",
            "in": "header",
            "name": "Content-Length",
            "required": false,
            "schema": {
              "format": "int64",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            }
          },
          "description": "The raw content",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                }
              }
            },
            "description": "A new version of the file of that name (`on_conflict=new_version`)"
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                }
              }
            },
            "description": "A new file, `scan_status: scanning`"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`upload_incomplete`: the body was shorter or longer than `Content-Length`, or stalled"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or parent folder"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`name_taken` (`details.existing_id`) or `workspace_archived`"
          },
          "411": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`length_required`: `Content-Length` is missing"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`file_too_large` or `storage_limit_reached`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`invalid_name` or `validation_failed`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`too_many_uploads`: the caller's concurrent uploads"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`storage_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Streams one file into the space. The body is the raw content; its type is sniffed, not\ntaken from `Content-Type`. The file is `scanning` until the malware scan finds it clean.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/files/{file_id}": {
      "get": {
        "deprecated": true,
        "operationId": "getFileLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                }
              }
            },
            "description": "The file; its `ETag` is `\"r{revision}\"`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such file in this space"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "One file and its versions' state.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:read"
      },
      "patch": {
        "deprecated": true,
        "operationId": "updateFileLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The `\"r{revision}\"` ETag; a mismatch is 412",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEntry"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                }
              }
            },
            "description": "The renamed or moved file"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such file, or no such target folder"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`name_taken` or `workspace_archived`"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`precondition_failed`: `If-Match` is not the current revision (`details.current`)"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`invalid_name`, `cross_workspace_move`, `validation_failed` or `invalid_body`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Renames or moves a file.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:write"
      },
      "delete": {
        "deprecated": true,
        "operationId": "trashFileLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The `\"r{revision}\"` ETag; a mismatch is 412",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrashItem"
                }
              }
            },
            "description": "The entry, now in the trash"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such entry in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`precondition_failed`: `If-Match` is not the current revision"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Moves the file to the trash.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/files/{file_id}/content": {
      "get": {
        "deprecated": true,
        "operationId": "downloadFileLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "A clean version; defaults to the newest clean one.",
            "in": "query",
            "name": "version",
            "required": false,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "Defaults to `attachment`.",
            "in": "query",
            "name": "disposition",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Disposition"
            }
          },
          {
            "description": "A native document's export format (one of its `connector.export_formats`); defaults to\n`pdf` inline and the editable format as an attachment.",
            "in": "query",
            "name": "format",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "One `bytes=` range",
            "in": "header",
            "name": "Range",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The content of the newest clean version (or `version`), with its sniffed `Content-Type` and `ETag: \"{version_id}\"`"
          },
          "206": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The requested `Range`"
          },
          "304": {
            "description": "`If-None-Match` matches"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such file or version in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`file_scanning` (`Retry-After`), `file_quarantined` or `file_scan_failed`: no clean version"
          },
          "416": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`range_not_satisfiable`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`storage_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Downloads a clean version. `HEAD` answers the same headers without the body. Served as an\nattachment unless `disposition=inline` and the type is on the inline allow-list; HTML and SVG\nnever are.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:read"
      },
      "put": {
        "deprecated": true,
        "operationId": "uploadFileVersionLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The `\"{version_id}\"` content ETag the edit started from",
            "in": "header",
            "name": "If-Match",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Required (`411` without it); browsers and HTTP clients set it from the body",
            "in": "header",
            "name": "Content-Length",
            "required": false,
            "schema": {
              "format": "int64",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            }
          },
          "description": "The raw content",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                }
              }
            },
            "description": "The file with its new version, `scan_status: scanning`"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`upload_incomplete`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such file in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`"
          },
          "411": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`length_required`"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`version_conflict`: someone saved a newer version (`details.current_version_id`)"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`file_too_large` or `storage_limit_reached`"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`precondition_required`: `If-Match` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`too_many_uploads`"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`storage_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Saves new content as the next version, if the caller edited the current one.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/files/{file_id}/runs": {
      "post": {
        "deprecated": true,
        "operationId": "startCodeRunLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartRun"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunAccepted"
                }
              }
            },
            "description": "Queued; repeating `client_run_id` returns the same run"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`usage_limit_reached`, `billing_restricted`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `tier_not_available`, `invalid_origin`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such file or version in this space; `environment_not_found`"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`run_in_progress`, `file_scanning`; `environment_not_ready`: the environment is off"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`inputs_too_large`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`file_not_runnable`: no rule of the environment (or of any built-in, when none is named) matches the file (`details.patterns`); `validation_failed`; `sandbox_tier_unavailable`: the installation doesn't offer that size (`details.enabled_tiers`)"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`sandbox_unavailable`: no gVisor sandbox on this installation (`details.reason`); or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Runs a code file in a gVisor sandbox as the caller. Output streams from\n`…/runs/{run_id}/events`; outputs are saved as new file versions.",
        "tags": [
          "code-runs"
        ],
        "x-ivy-api-key-scope": "code_runs:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/files/{file_id}/versions": {
      "get": {
        "deprecated": true,
        "operationId": "listFileVersionsLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Opaque cursor from a previous page's `next_cursor`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-100, default 25.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileVersionList"
                }
              }
            },
            "description": "The versions, newest first"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such file in this space"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The file's version history.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/files/{file_id}/versions/{version}/restore": {
      "post": {
        "deprecated": true,
        "operationId": "restoreFileVersionLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "version",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "The current version's `\"{version_id}\"` content ETag",
            "in": "header",
            "name": "If-Match",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                }
              }
            },
            "description": "The file; the restored content is its new current version"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such file or version in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`version_not_clean` or `workspace_archived`"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`version_conflict` (`details.current_version_id`)"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`storage_limit_reached`"
          },
          "428": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`precondition_required`: `If-Match` is missing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Copies an older clean version into a new current version.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/folders": {
      "post": {
        "deprecated": true,
        "operationId": "createFolderLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFolder"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Folder"
                }
              }
            },
            "description": "The folder"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or parent folder"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`name_taken` (`details.existing_id`), `folder_limit_reached` or `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`invalid_name`, `too_deep`, `validation_failed` or `invalid_body`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Creates a folder.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/folders/{folder_id}": {
      "get": {
        "deprecated": true,
        "operationId": "getFolderLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "folder_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Folder"
                }
              }
            },
            "description": "The folder and its path"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such folder in this space"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "One folder.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:read"
      },
      "patch": {
        "deprecated": true,
        "operationId": "updateFolderLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "folder_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The `\"r{revision}\"` ETag; a mismatch is 412",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEntry"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Folder"
                }
              }
            },
            "description": "The renamed or moved folder"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such folder, or no such target parent"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`name_taken`, `move_into_descendant` or `workspace_archived`"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`precondition_failed`: `If-Match` is not the current revision (`details.current`)"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`invalid_name`, `cross_workspace_move`, `validation_failed` or `invalid_body`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Renames or moves a folder.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:write"
      },
      "delete": {
        "deprecated": true,
        "operationId": "trashFolderLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "folder_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The `\"r{revision}\"` ETag; a mismatch is 412",
            "in": "header",
            "name": "If-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrashItem"
                }
              }
            },
            "description": "The entry, now in the trash"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such entry in this space"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`"
          },
          "412": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`precondition_failed`: `If-Match` is not the current revision"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Moves the folder to the trash; everything in it becomes unreachable until it is restored.",
        "tags": [
          "files"
        ],
        "x-ivy-api-key-scope": "files:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/mounts": {
      "get": {
        "deprecated": true,
        "operationId": "listMountsLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MountList"
                }
              }
            },
            "description": "The drives mounted in the space"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Drives mounted in the space.",
        "tags": [
          "connectors"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/runs": {
      "get": {
        "deprecated": true,
        "operationId": "listCodeRunsLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only this file's runs.",
            "in": "query",
            "name": "file_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeRunList"
                }
              }
            },
            "description": "The runs"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The space's code runs, newest first (90 days): status, exit code, timings, CPU-seconds,\ncredits and the versions they saved. Output text is in each run's log.",
        "tags": [
          "code-runs"
        ],
        "x-ivy-api-key-scope": "code_runs:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/runs/{run_id}": {
      "get": {
        "deprecated": true,
        "operationId": "getCodeRunLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeRun"
                }
              }
            },
            "description": "The run"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such run in this space"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "One code run.",
        "tags": [
          "code-runs"
        ],
        "x-ivy-api-key-scope": "code_runs:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/runs/{run_id}/cancel": {
      "post": {
        "deprecated": true,
        "operationId": "cancelCodeRunLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Cancellation requested"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: someone else's run; `invalid_origin`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such run in this space"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Stops a run: the sandbox is deleted at once and the CPU used so far is billed.",
        "tags": [
          "code-runs"
        ],
        "x-ivy-api-key-scope": "code_runs:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/runs/{run_id}/events": {
      "get": {
        "deprecated": true,
        "operationId": "streamCodeRunLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Resume after this event",
            "in": "header",
            "name": "Last-Event-ID",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "`text/event-stream`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such run in this space"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: `Last-Event-ID` is not an event id"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`sandbox_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "A run's live events as server-sent events: `run_status`, `stdout`, `stderr`,\n`output_truncated`, `output_file`, `output_skipped`, `usage`, then `done` or `error`.\n`Last-Event-ID` resumes after an event for 24 hours.",
        "tags": [
          "code-runs"
        ],
        "x-ivy-api-key-scope": "code_runs:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/runs/{run_id}/log": {
      "get": {
        "deprecated": true,
        "operationId": "getCodeRunLogLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "The log"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such run, or it wrote nothing"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "A run's stdout and stderr as plain text, capped at 10 MiB.",
        "tags": [
          "code-runs"
        ],
        "x-ivy-api-key-scope": "code_runs:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/search": {
      "get": {
        "deprecated": true,
        "operationId": "searchWorkspace",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-200 characters. Words match the start of words, with accents ignored and typos forgiven\nwhen exact words find little; `\"…\"` matches a phrase and `-word` excludes one.",
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Comma-separated: `file`, `folder`, `file_content`, `conversation`, `message`. All by default.",
            "in": "query",
            "name": "kinds",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "space_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "A user id: files they uploaded, messages they wrote.",
            "in": "query",
            "name": "author",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/SearchSort"
            }
          },
          {
            "description": "Ranks results from this space first on a tie: the one on screen.",
            "in": "query",
            "name": "near_space_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Opaque cursor from a previous page's `next_cursor`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-50, default 20.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "deprecated": true,
            "description": "Legacy name of `space_id`, sent and accepted until 2027-05-31.",
            "in": "query",
            "name": "workspace_id",
            "required": false,
            "schema": {
              "type": "string"
            },
            "x-ivy-legacy-of": "space_id"
          },
          {
            "deprecated": true,
            "description": "Legacy name of `near_space_id`, sent and accepted until 2027-05-31.",
            "in": "query",
            "name": "near_workspace_id",
            "required": false,
            "schema": {
              "type": "string"
            },
            "x-ivy-legacy-of": "near_space_id"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResults"
                }
              }
            },
            "description": "Files, folders, conversations and messages the caller may open, best first. An API key finds files with `files:read` and conversations and messages with `conversations:read`."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`insufficient_scope`: an API key without `files:read` or `conversations:read`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such organisation or space, or the caller can't see it"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`search_unavailable`: the index isn't reachable; names can still be searched with `searchEntries`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Searches one space.",
        "tags": [
          "search"
        ],
        "x-ivy-api-key-scope": "any"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/share-links": {
      "get": {
        "deprecated": true,
        "operationId": "listShareLinksLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only the links to this file or folder.",
            "in": "query",
            "name": "entry_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareLinkList"
                }
              }
            },
            "description": "The space's links, or one entry's, newest first"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`; `unsupported` in the Local organisation"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The space's share links, with who created each one and when it was last opened.\n`entry_id` narrows the list to one file or folder.",
        "tags": [
          "share-links"
        ],
        "x-ivy-api-key-scope": "share_links:read"
      },
      "post": {
        "deprecated": true,
        "operationId": "createShareLinkLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateShareLink"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedShareLink"
                }
              }
            },
            "description": "The link and its URL, shown once"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: space editors and admins only; `external_links_disabled`; `external_links_people_only` for API keys; `app_links_off`, `app_link_role_capped` (`details.max_role`), `app_links_people_only`; `workspace_content_restricted`, `insufficient_scope`, `invalid_origin`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, file or folder"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`, `share_link_limit_reached`, `app_link_limit_reached`, `app_not_approved`, `workspace_limit_reached`; `share_link_busy`: the link or its organisation's app links are being changed; retry"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`storage_limit_reached`: the organisation has no room for the app's share files"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, `password_required`, `expiry_required`, `expiry_too_long`, `recipient_not_in_organisation`, `app_not_shareable`; `unsupported` in the Local organisation"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: too many link emails today; `too_many_uploads`: the creator's uploads are busy while an app link copies its files; retry"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`email_unavailable` when `notify` is set but email isn't configured; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Creates a link to a file or folder, or with `entry_kind = app` to an app. The URL carries a\nrandom token that Ivy stores only as a hash, so it is shown only in this response. External\nlinks (`audience = anyone`) need the organisation's setting and a person; `notify` emails the\nlink. An app link creates a share space with copies of the app's `[share] files` and a\nlink identity every visitor acts as, with the link's role.",
        "tags": [
          "share-links"
        ],
        "x-ivy-api-key-scope": "share_links:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/share-links/{link_id}": {
      "get": {
        "deprecated": true,
        "operationId": "getShareLinkLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "link_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareLink"
                }
              }
            },
            "description": "The link"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or link"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unsupported` in the Local organisation"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "One share link.",
        "tags": [
          "share-links"
        ],
        "x-ivy-api-key-scope": "share_links:read"
      },
      "patch": {
        "deprecated": true,
        "operationId": "updateShareLinkLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "link_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateShareLink"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareLink"
                }
              }
            },
            "description": "The link"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: only the link's creator or a space admin; `app_link_role_capped` (`details.max_role`); `workspace_content_restricted`, `insufficient_scope`, `invalid_origin`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or live link"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`, `share_workspace_archived`; `share_link_busy`: the link or its organisation's app links are being changed; retry"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, `not_an_app_link`; `unsupported` in the Local organisation"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Changes an app link's role or its link identity's budget. A lower role applies at once and\nrestarts the app; a raised budget turns a link paused by its budget on again.",
        "tags": [
          "share-links"
        ],
        "x-ivy-api-key-scope": "share_links:write"
      },
      "delete": {
        "deprecated": true,
        "operationId": "revokeShareLinkLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "link_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Revoked: the link stops working with the next request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: only the link's creator or a space admin; `workspace_content_restricted`, `insufficient_scope`, `invalid_origin`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or link"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`; `share_link_busy`: the link or its organisation's app links are being changed; retry"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unsupported` in the Local organisation"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Revokes a share link. Revoking is final; create a new link to share again. An app link's\nshare space is archived, its link identity disabled and its app stopped.",
        "tags": [
          "share-links"
        ],
        "x-ivy-api-key-scope": "share_links:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/share-links/{link_id}/refresh": {
      "post": {
        "deprecated": true,
        "operationId": "refreshShareLinkLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "link_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RefreshedShareLink"
                }
              }
            },
            "description": "What was copied, and what a visitor changed and was left"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: only the link's creator; `workspace_content_restricted`, `insufficient_scope`, `invalid_origin`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space or live link"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`, `share_workspace_archived`; `share_link_busy`: the link or its organisation's app links are being changed; retry"
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`storage_limit_reached`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`not_an_app_link`; `unsupported` in the Local organisation"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`too_many_uploads`: the creator's uploads are busy; retry"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Copies the newest clean versions of an app link's share files into its share space again,\nas new versions. A file a visitor changed since the last copy is skipped and listed.",
        "tags": [
          "share-links"
        ],
        "x-ivy-api-key-scope": "share_links:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/skills": {
      "get": {
        "deprecated": true,
        "operationId": "listWorkspaceSkills",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpaceSkillList"
                }
              }
            },
            "description": "The space's skills"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or the caller can't see it"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The written know-how the space's agents read when it applies: the always-on spaces'\nskills, then those of every version the space imports. A chat's agent is given the ones for\nit whose apps and tools the chat has.",
        "tags": [
          "space-packages"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/trash": {
      "get": {
        "deprecated": true,
        "operationId": "listTrashLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Opaque cursor from a previous page's `next_cursor`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1-100, default 25.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrashList"
                }
              }
            },
            "description": "Trashed folders and files, most recently trashed first"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or the caller can't see it"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The space's trash.",
        "tags": [
          "trash"
        ],
        "x-ivy-api-key-scope": "files:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/trash/{entry_id}": {
      "delete": {
        "deprecated": true,
        "operationId": "deleteFromTrashLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "entry_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            },
            "description": "The purge job"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: space admins only; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such entry in this space's trash"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`jobs_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Deletes a trashed entry and everything in it permanently, every version included.",
        "tags": [
          "trash"
        ],
        "x-ivy-api-key-scope": "files:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/trash/{entry_id}/restore": {
      "post": {
        "deprecated": true,
        "operationId": "restoreFromTrashLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "entry_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RestoredEntry"
                }
              }
            },
            "description": "The restored entry and where it went"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: editors and admins only; `workspace_content_restricted`, `invalid_origin`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such entry in this space's trash"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Restores to the original folder, or to the root when that is gone; a clashing name becomes\n`name (restored).ext`.",
        "tags": [
          "trash"
        ],
        "x-ivy-api-key-scope": "files:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/views/{file_id}": {
      "get": {
        "deprecated": true,
        "operationId": "getViewLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ViewDetail"
                }
              }
            },
            "description": "The board as its file's last clean version declares it"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `view_missing`: no board file with this id in place, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`view_invalid`: the board file has problems"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "A board of the space, by its file's id.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/views/{file_id}/records": {
      "get": {
        "deprecated": true,
        "operationId": "listViewRecordsLegacy",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ViewRecords"
                }
              }
            },
            "description": "The board's cards by column, in the board's order"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, `view_missing`, `collection_missing`, or collections are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`view_invalid`, `collection_detached`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: the board's filter names a field the collection no longer indexes"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The records on a board, by column.",
        "tags": [
          "collections"
        ],
        "x-ivy-api-key-scope": "records:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/workflow-runs/{run_id}": {
      "get": {
        "deprecated": true,
        "operationId": "getWorkflowRun",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowRunView"
                }
              }
            },
            "description": "The run page: content only when you may read it (`content_visible`)"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such run you may know of, or flows are off"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "A run's page (§10): every step's attempts and outcome, and its content for its readers.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/workflow-runs/{run_id}/cancel": {
      "post": {
        "deprecated": true,
        "operationId": "cancelWorkflowRun",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowRunView"
                }
              }
            },
            "description": "The run, cancelled: its current step was stopped; a run that has finished is returned as it is"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`, `forbidden`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such run, or flows are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_archived`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workflow_unavailable`: runs can't be changed right now; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Cancels a run: people who can run the flow and space admins; a test run only its\ntester.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:run"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/workflow-runs/{run_id}/events": {
      "get": {
        "deprecated": true,
        "operationId": "streamWorkflowRunEvents",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Resume after this event",
            "in": "header",
            "name": "Last-Event-ID",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "$ref": "#/components/schemas/RunEventRecord"
                }
              }
            },
            "description": "Server-sent events"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such run you may know of, or flows are off"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: `Last-Event-ID` is not an event id"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "A run's live events as server-sent events whose `id` is the event's sequence and whose name\nis its `kind`: statuses and ids, never content. Resume with `Last-Event-ID`. The stream ends\nonce the run has finished and every event was sent.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/workflow-runs/{run_id}/from": {
      "post": {
        "deprecated": true,
        "operationId": "runWorkflowFromStep",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunFromStep"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowRunAccepted"
                }
              }
            },
            "description": "The new run started: the steps before the chosen one are reused from the run, the rest run again"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`run_content_hidden`: you may see only that the run ran; `not_your_run`: it acts as the person who started it; `insufficient_scope`, `workspace_content_restricted`, `forbidden`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such run you may know of, no such step, or flows or paths are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`run_in_progress`; `test_run`: test runs start again from the editor; `cannot_run_from_here`: a step before it didn't finish; `run_from_version_changed`: the flow has another active version; `run_from_reused_erased`: what a step to reuse did, or the run's input, was erased; `run_from_changed_inputs`: the trigger's file, or a file a step to reuse read, has a newer version; `input_missing`: a file the run read or a step to reuse saved is being deleted; `busy`; `workflow_inactive`: the flow was switched off while the run started; `workspace_archived`; on the three `run_from_…` codes and `input_missing`, run it again from the start"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Run from here (flow-paths-design §8 phase 4): a new run of the same version that reuses the\noutputs of the steps before `step_id` from this run, without doing their work again.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:run"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/workflow-runs/{run_id}/steps/{step_id}/files/{n}": {
      "get": {
        "deprecated": true,
        "operationId": "downloadWorkflowRunFile",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "step_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The file's position in the step's files, from 0",
            "in": "path",
            "name": "n",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "The file's bytes, as an attachment"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such run file, or the caller reads neither the run's content nor a post that attached it"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`storage_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Downloads a run file (§10): the `n`th file of a step, or of the run files a `post` step\nattached, which that post's audience may open too (§5.5).",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/workflows": {
      "get": {
        "deprecated": true,
        "operationId": "listWorkflows",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowList"
                }
              }
            },
            "description": "Files recognised as flows, with their activation state, last run and next run; never run content"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or flows are off"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The space's flow files (`*.ivy-flow.yaml`, or the older `*.ivy-workflow.yaml`, which still\nworks) and their status line.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/workflows/check": {
      "post": {
        "deprecated": true,
        "operationId": "checkWorkflow",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckFlow"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowCheck"
                }
              }
            },
            "description": "The check's errors, the outside-reach report, who may activate it and what the space identity can't reach"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such file or version, or flows are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`file_scanning`, `file_quarantined`, `file_scan_failed`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`not_a_workflow`, `file_too_large`, `invalid_encoding`, `validation_failed`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`storage_unavailable`; or `unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Checks a version without activating it (§7.2); a dry run while editing.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/workflows/code-files": {
      "get": {
        "deprecated": true,
        "operationId": "listWorkflowCodeFiles",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowCodeFileList"
                }
              }
            },
            "description": "Runnable code files in the space's Ivy folders, with the path a step names them by"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or flows are off"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "The space's runnable code files, for the quick forms' code step (§8.4).",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/workflows/templates": {
      "get": {
        "deprecated": true,
        "operationId": "listWorkflowTemplates",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowTemplateList"
                }
              }
            },
            "description": "The flow files space packages ship, to copy as new inactive files"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such space, or drafting flows is off"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Flow templates (§11) from the always-on spaces and those the organisation imported.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/workflows/{file_id}/deactivate": {
      "post": {
        "deprecated": true,
        "operationId": "deactivateWorkflow",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowState"
                }
              }
            },
            "description": "The flow, inactive: its triggers are paused and running runs finish"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`, `forbidden`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such flow file, or flows are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workflow_inactive`: the flow was never active; deactivating an inactive one succeeds. `workflow_changed`, `trigger_changed`, `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`not_a_workflow`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Deactivates a flow: new runs stop at once; running runs continue unless cancelled.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/workflows/{file_id}/resume": {
      "post": {
        "deprecated": true,
        "operationId": "resumeWorkflow",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowState"
                }
              }
            },
            "description": "The flow with its paused triggers active again; their failure count starts over"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`, `forbidden`; `workflow_blocked_by_admin`, `trigger_paused_by_admin`: only an organisation admin lifts an organisation admin's pause"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such flow file, or flows are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workflow_inactive`, `trigger_changed`, `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`not_a_workflow`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Resumes a paused flow (§8.1): its paused triggers start runs again.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:write"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/workflows/{file_id}/runs": {
      "get": {
        "deprecated": true,
        "operationId": "listWorkflowRuns",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`next_before` of the previous page.",
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "1-100, default 25.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowRunList"
                }
              }
            },
            "description": "The flow's runs, newest first, and your own test runs: statuses only"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such flow file, or flows are off"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`, `not_a_workflow`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Lists a flow's runs.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:read"
      },
      "post": {
        "deprecated": true,
        "operationId": "startWorkflowRun",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartFlowRun"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowRunAccepted"
                }
              }
            },
            "description": "The run started, queued for a free slot or was skipped (`reason`)"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`people_only_workflow`: it asks or emails people, so a key can't start it; `workspace_content_restricted`, `insufficient_scope`, `forbidden`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such flow file, or flows are off"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workflow_inactive`, `no_manual_trigger`, `workspace_archived`"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`validation_failed`: `inputs` isn't an object; `not_a_workflow`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Starts a run through the flow's manual trigger, acting as you or your key's identity.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:run"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/workflows/{file_id}/state": {
      "get": {
        "deprecated": true,
        "operationId": "listWorkflowState",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowStateList"
                }
              }
            },
            "description": "Every key of the flow's state, its value and the run and step that wrote it"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`forbidden`: space admins only; `workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such flow file, or flows are off"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`not_a_workflow`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Lists a flow's state (§5.8), which its steps write with `set_state`.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:read"
      }
    },
    "/v1/organisations/{organisation_id}/workspaces/{workspace_id}/workflows/{file_id}/triggers": {
      "get": {
        "deprecated": true,
        "operationId": "listWorkflowTriggers",
        "parameters": [
          {
            "in": "path",
            "name": "organisation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowTriggerList"
                }
              }
            },
            "description": "The flow's trigger rows: kind, status, a webhook's URL and its secrets' ids and dates; never secret values"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unauthenticated`"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`workspace_content_restricted`, `insufficient_scope`"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "No such flow file, or flows are off"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`not_a_workflow`"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`rate_limited`: the API key's requests per minute are used up; retry after `Retry-After` seconds"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`internal`"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            },
            "description": "`unavailable`: the database is briefly unavailable; retry after `Retry-After` seconds"
          }
        },
        "security": [
          {
            "session_cookie": []
          },
          {
            "bearer": []
          },
          {
            "api_key": []
          }
        ],
        "summary": "Lists a flow's triggers.",
        "tags": [
          "flows"
        ],
        "x-ivy-api-key-scope": "workflows:read"
      }
    }
  },
  "security": [
    {
      "session_cookie": []
    },
    {
      "bearer": []
    }
  ],
  "servers": [
    {
      "url": "/api"
    }
  ],
  "tags": [
    {
      "description": "Service health: liveness and readiness probes",
      "name": "meta"
    },
    {
      "description": "Spaces of an organisation and their live events",
      "name": "spaces"
    },
    {
      "description": "Public spaces, the versions an organisation imports and the agents its spaces inherit",
      "name": "space-packages"
    },
    {
      "description": "Folders, files and their versions in a space",
      "name": "files"
    },
    {
      "description": "Finding files, their text, conversations and messages across the spaces the caller may read",
      "name": "search"
    },
    {
      "description": "Trashed folders and files: restore or delete permanently",
      "name": "trash"
    },
    {
      "description": "The caller's chats with the assistant in a space",
      "name": "conversations"
    },
    {
      "description": "The assistant: its models and the runs that answer messages",
      "name": "agent"
    },
    {
      "description": "App instances: apps' processes running in a conversation's sandbox session",
      "name": "apps"
    },
    {
      "description": "Code runs in gVisor sandboxes, their history, the egress allow-lists and the environments sandboxes start from",
      "name": "code-runs"
    },
    {
      "description": "The calling API key",
      "name": "api-keys"
    },
    {
      "description": "Links to a space's files and folders, and the organisation's rules for external links",
      "name": "share-links"
    },
    {
      "description": "Flows: their triggers and runs; `POST /v1/hooks/{trigger_id}` delivers to a webhook trigger",
      "name": "flows"
    },
    {
      "description": "Connected drives: Microsoft 365 and Google Drive per organisation, reached only with the organisation's app access to drives an org admin selected, and mounted in spaces",
      "name": "connectors"
    },
    {
      "description": "Space channels: lasting contexts with a purpose, members, a default agent and pinned files, holding channel threads",
      "name": "channels"
    },
    {
      "description": "Collections: the record types a space declares in `*.ivy-collection.yaml` files, the version each serves, applying a version that waits for a space admin, and their records: querying, reading, writing, moving on boards and comments; boards are `*.ivy-board.yaml` files over a collection, tasks its built-in `tasks` collection",
      "name": "collections"
    },
    {
      "description": "A collection's GitHub sources: their state, people links, sync now and confirming them again, and the GitHub App webhooks that keep them live",
      "name": "github"
    }
  ]
}