{
  "openapi":"3.0.3",
  "info":{"title":"PLAIS Meet API","version":"1.0.0","description":"서버에서 호출하는 영상회의 생성·조회·종료 API. 사이트별 API 키는 서버에만 보관합니다. 최대 12명, 생성 후 최대 2시간 유지됩니다. 미입장 방은 5분 뒤, 마지막 참석자 퇴장 후 빈 방은 약 1분 뒤 자동 종료됩니다."},
  "servers":[{"url":"https://talk.plais.kr/meet/api/v1"}],
  "security":[{"serverApiKey":[]}],
  "paths":{
    "/rooms":{"post":{"operationId":"createRoom","summary":"관리자용 회의 개설","description":"연동 사이트에서 관리자 인증을 먼저 완료한 후 호출합니다. 일반 참가자에게는 inviteUrl만 전달합니다.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":60},"expected":{"type":"integer","minimum":2,"maximum":12,"default":8}}}}}},"responses":{"201":{"description":"생성 완료. hostUrl과 ownerToken은 주최자 전용 비밀입니다.","content":{"application/json":{"schema":{"type":"object","required":["ok","room","inviteUrl","hostUrl","ownerToken"],"properties":{"ok":{"type":"boolean"},"room":{"$ref":"#/components/schemas/Room"},"inviteUrl":{"type":"string","format":"uri"},"hostUrl":{"type":"string","format":"uri"},"ownerToken":{"type":"string","description":"주최자 권한. 공개 금지."}}}}}},"400":{"$ref":"#/components/responses/Rejected"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},
    "/rooms/{roomId}":{"parameters":[{"name":"roomId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{24}$"}}],"get":{"operationId":"getRoom","summary":"같은 연동 계정의 회의 조회","responses":{"200":{"description":"회의 정보","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"room":{"$ref":"#/components/schemas/Room"}}}}}},"400":{"$ref":"#/components/responses/Rejected"},"403":{"$ref":"#/components/responses/Forbidden"}}},"delete":{"operationId":"endRoom","summary":"같은 연동 계정의 회의 종료","responses":{"200":{"description":"회의 종료. 모든 참가자가 퇴장하고 공유 자료가 삭제됩니다.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"400":{"$ref":"#/components/responses/Rejected"},"403":{"$ref":"#/components/responses/Forbidden"}}}}
  },
  "components":{
    "securitySchemes":{"serverApiKey":{"type":"http","scheme":"bearer","description":"사이트별 서버 API 키. 브라우저·모바일 앱 코드에 포함하지 않습니다."}},
    "schemas":{"Room":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"capacity":{"type":"integer","maximum":12},"participants":{"type":"integer"},"expected":{"type":"integer"},"expiresAt":{"type":"integer","format":"int64","description":"만료 시각, Unix milliseconds"},"microphoneMode":{"type":"string","enum":["request","open"]}}},"Error":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"message":{"type":"string"}}}},
    "responses":{"Rejected":{"description":"입력 오류, 종료된 회의 또는 동시 회의실 한도 초과","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"서버 API 키가 없거나 유효하지 않음","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"다른 연동 사이트 소유의 회의 또는 브라우저의 직접 API 호출","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}
  }
}
