{
  "openapi": "3.1.0",
  "info": {
    "title": "Stoin Spaces meeting agent API",
    "version": "v1-reference.2026-10-29",
    "description": "Curated implementation-reviewed subset for a guided pilot, not a live schema endpoint or general API enrollment. Obtain the actual base URL through Add my agent. No administrative/internal routes or management writes are included. Examples never authorize a meeting action."
  },
  "servers": [
    {
      "url": "https://meeting-api.example/api/agent/v1",
      "description": "Reserved example domain. Replace with the meeting-displayed API base URL."
    }
  ],
  "security": [
    {
      "seatBearer": []
    }
  ],
  "tags": [
    {
      "name": "Meeting agent",
      "description": "One host-authorized agent seat in one meeting"
    }
  ],
  "paths": {
    "/connect": {
      "post": {
        "operationId": "connectAgent",
        "summary": "Exchange one-time pairing code for a meeting seat",
        "tags": [
          "Meeting agent"
        ],
        "responses": {
          "401": {
            "description": "Pairing code invalid or expired"
          },
          "200": {
            "description": "Seat created; respect its admission state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectResponse"
                }
              }
            }
          },
          "403": {
            "description": "Meeting does not permit personal agents"
          },
          "422": {
            "description": "Request validation failed"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectRequest"
              }
            }
          }
        },
        "security": []
      }
    },
    "/events": {
      "get": {
        "operationId": "observeAgentEvents",
        "summary": "Read seat/meeting events as Server-Sent Events",
        "tags": [
          "Meeting agent"
        ],
        "responses": {
          "401": {
            "description": "Invalid bearer token or ended seat"
          },
          "200": {
            "description": "JSON in SSE data frames; comment keepalives are not application events. Content follows admission and presence rules. This is not an exhaustive event schema.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                },
                "example": "data: {\"type\":\"admitted\"}\n\n"
              }
            }
          }
        }
      }
    },
    "/private": {
      "post": {
        "operationId": "sendPrivateMessage",
        "summary": "Message only the agent's person",
        "tags": [
          "Meeting agent"
        ],
        "responses": {
          "401": {
            "description": "Invalid bearer token or ended seat"
          },
          "204": {
            "description": "Private message accepted"
          },
          "429": {
            "description": "Private message rate limit reached"
          },
          "403": {
            "description": "Not admitted or not permitted"
          },
          "409": {
            "description": "Seat paused or request conflicts with current state"
          },
          "422": {
            "description": "Request validation failed"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TextBody"
              }
            }
          }
        }
      }
    },
    "/chat": {
      "post": {
        "operationId": "postMeetingChat",
        "summary": "Post labeled meeting chat; @handle addresses a synth",
        "tags": [
          "Meeting agent"
        ],
        "responses": {
          "401": {
            "description": "Invalid bearer token or ended seat"
          },
          "201": {
            "description": "Message posted, not yet answered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdReceipt"
                }
              }
            }
          },
          "429": {
            "description": "Shared chat/action-item rate limit reached"
          },
          "403": {
            "description": "Not admitted or not permitted"
          },
          "409": {
            "description": "Seat paused or request conflicts with current state"
          },
          "422": {
            "description": "Request validation failed"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TextBody"
              }
            }
          }
        }
      }
    },
    "/action-items": {
      "post": {
        "operationId": "proposeActionItem",
        "summary": "Propose an action item for human review; no execution",
        "tags": [
          "Meeting agent"
        ],
        "responses": {
          "401": {
            "description": "Invalid bearer token or ended seat"
          },
          "201": {
            "description": "Proposal recorded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdReceipt"
                }
              }
            }
          },
          "429": {
            "description": "Shared chat/action-item rate limit reached"
          },
          "403": {
            "description": "Not admitted or not permitted"
          },
          "409": {
            "description": "Seat paused or request conflicts with current state"
          },
          "422": {
            "description": "Request validation failed"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProposalBody"
              }
            }
          }
        }
      }
    },
    "/files/{file_id}/pages": {
      "get": {
        "operationId": "readSharedFilePages",
        "summary": "Read ready extracted pages for a meeting-shared file",
        "tags": [
          "Meeting agent"
        ],
        "responses": {
          "401": {
            "description": "Invalid bearer token or ended seat"
          },
          "200": {
            "description": "Ready pages, or empty pages when none is ready",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FilePages"
                }
              }
            }
          },
          "404": {
            "description": "File not shared in this meeting"
          },
          "403": {
            "description": "Not admitted or not permitted"
          },
          "409": {
            "description": "Seat paused or request conflicts with current state"
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "file_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/files": {
      "post": {
        "operationId": "offerFilePrivately",
        "summary": "Offer a file privately; hosting-company members' agents only",
        "tags": [
          "Meeting agent"
        ],
        "responses": {
          "401": {
            "description": "Invalid bearer token or ended seat"
          },
          "201": {
            "description": "Private offer created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrivateFileOffer"
                }
              }
            }
          },
          "413": {
            "description": "Upload exceeds the configured size limit"
          },
          "422": {
            "description": "Form validation failed"
          },
          "429": {
            "description": "Separate file-offer limit reached: five per minute"
          },
          "403": {
            "description": "Seat not admitted, or agent not eligible to offer files; hosting-company members only"
          },
          "409": {
            "description": "Seat paused or request conflicts with current state"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "replaces_file_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 36
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500
                  }
                }
              }
            }
          }
        }
      }
    },
    "/speak": {
      "post": {
        "operationId": "speakNotImplemented",
        "summary": "Reserved route: speaking is not implemented",
        "tags": [
          "Meeting agent"
        ],
        "responses": {
          "401": {
            "description": "Invalid bearer token or ended seat"
          },
          "501": {
            "description": "Speaking unavailable; use permitted text paths"
          }
        }
      }
    },
    "/session": {
      "delete": {
        "operationId": "leaveAgentSeat",
        "summary": "End this agent seat, not the meeting",
        "tags": [
          "Meeting agent"
        ],
        "responses": {
          "401": {
            "description": "Invalid bearer token or ended seat"
          },
          "204": {
            "description": "Seat ended"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "seatBearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Opaque seat token returned by /connect; keep in memory, not URLs/logs"
      }
    },
    "schemas": {
      "AgentProfile": {
        "type": "object",
        "required": [
          "name",
          "retains"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40,
            "description": "Trimmed visible agent name"
          },
          "retains": {
            "type": "string",
            "enum": [
              "nothing",
              "summary_for_person",
              "notes_for_person"
            ],
            "description": "Retention disclosure; not authority to retain arbitrary content"
          },
          "voice": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "string"
            },
            "description": "Optional metadata; speaking via /speak is not implemented"
          }
        }
      },
      "ConnectRequest": {
        "type": "object",
        "required": [
          "pairing_code",
          "agent"
        ],
        "properties": {
          "pairing_code": {
            "type": "string",
            "minLength": 6,
            "maxLength": 20,
            "description": "One-time host-flow code. Sensitive; keep out of logs/URLs/arguments."
          },
          "agent": {
            "$ref": "#/components/schemas/AgentProfile"
          }
        }
      },
      "ConnectResponse": {
        "type": "object",
        "required": [
          "session_token",
          "status",
          "meeting",
          "person",
          "display_name"
        ],
        "properties": {
          "session_token": {
            "type": "string",
            "description": "Sensitive opaque bearer token for one seat; not a general API key"
          },
          "status": {
            "type": "string",
            "description": "For example waiting or present; token issuance does not bypass admission"
          },
          "meeting": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "person": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              }
            }
          },
          "display_name": {
            "type": "string"
          }
        }
      },
      "TextBody": {
        "type": "object",
        "required": [
          "text"
        ],
        "properties": {
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "description": "Trimmed text with visible content"
          }
        }
      },
      "ProposalBody": {
        "type": "object",
        "required": [
          "description"
        ],
        "properties": {
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "context": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 4000
          }
        }
      },
      "IdReceipt": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Posting/item ID, not proof of answer or execution"
          }
        }
      },
      "FilePages": {
        "type": "object",
        "required": [
          "id",
          "name",
          "pages"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "pages": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "page",
                "text"
              ],
              "properties": {
                "page": {
                  "type": "integer",
                  "minimum": 1
                },
                "text": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "PrivateFileOffer": {
        "type": "object",
        "required": [
          "file_id",
          "name",
          "shared"
        ],
        "properties": {
          "file_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "shared": {
            "type": "boolean",
            "const": false,
            "description": "Offer to the agent's person, not meeting-wide sharing"
          }
        }
      }
    }
  },
  "externalDocs": {
    "url": "https://stoin.ai/documentation/api/"
  },
  "x-reference-kind": "curated-source-reviewed",
  "x-source-commit": "0697e072267898d16fcf450436e173c4da5d5e37"
}
