{"openapi":"3.1.0","info":{"title":"Lynkoria API","version":"v1","description":"Lynkoria calls, livestreams, messaging, presence and console API."},"servers":[{"url":"https://api.lynkoria.com"}],"components":{"securitySchemes":{"serviceKey":{"type":"http","scheme":"bearer","description":"Product backend service key (lynk_live_… / lynk_test_…). Server-to-server only."},"messagingToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Short-lived Lynkoria messaging JWT minted via POST /v1/sessions/messaging-token."},"consoleSession":{"type":"apiKey","in":"cookie","name":"__Host-lynkoria_console","description":"Console session cookie set by POST /v1/admin/auth/login (named lynkoria_console outside production). When Cloudflare Access is configured, the Cf-Access-Jwt-Assertion header must also match the session."}},"schemas":{},"parameters":{}},"paths":{"/v1/calls":{"post":{"tags":["Calls"],"security":[{"serviceKey":["calls:write"]}],"summary":"Create a call and its LiveKit room (idempotent on productCallId)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"productCallId":{"type":"string","pattern":"^[A-Za-z0-9._@-]{1,128}$"},"tenantId":{"type":"string","pattern":"^[A-Za-z0-9._@-]{1,128}$","default":"default"},"type":{"type":"string","enum":["one_to_one","group","livestream"],"default":"group"},"maxParticipants":{"type":"integer","minimum":2,"maximum":1000},"emptyTimeoutSec":{"type":"integer","minimum":10,"maximum":3600,"default":300},"departureTimeoutSec":{"type":"integer","minimum":0,"maximum":3600,"default":20},"e2ee":{"type":"boolean","default":false}},"required":["productCallId"]}}}},"responses":{"200":{"description":"Existing active call","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"productCallId":{"type":"string"},"tenantId":{"type":"string"},"type":{"type":"string","enum":["one_to_one","group","livestream"]},"roomName":{"type":"string"},"status":{"type":"string","enum":["active","ended"]},"maxParticipants":{"type":"integer"},"e2ee":{"type":"boolean"},"createdAt":{"type":"string"},"endedAt":{"type":["string","null"]}},"required":["id","productCallId","tenantId","type","roomName","status","maxParticipants","e2ee","createdAt","endedAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"productCallId":{"type":"string"},"tenantId":{"type":"string"},"type":{"type":"string","enum":["one_to_one","group","livestream"]},"roomName":{"type":"string"},"status":{"type":"string","enum":["active","ended"]},"maxParticipants":{"type":"integer"},"e2ee":{"type":"boolean"},"createdAt":{"type":"string"},"endedAt":{"type":["string","null"]}},"required":["id","productCallId","tenantId","type","roomName","status","maxParticipants","e2ee","createdAt","endedAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/calls/{id}":{"get":{"tags":["Calls"],"security":[{"serviceKey":["calls:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"productCallId":{"type":"string"},"tenantId":{"type":"string"},"type":{"type":"string","enum":["one_to_one","group","livestream"]},"roomName":{"type":"string"},"status":{"type":"string","enum":["active","ended"]},"maxParticipants":{"type":"integer"},"e2ee":{"type":"boolean"},"createdAt":{"type":"string"},"endedAt":{"type":["string","null"]}},"required":["id","productCallId","tenantId","type","roomName","status","maxParticipants","e2ee","createdAt","endedAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/calls/{id}/join-token":{"post":{"tags":["Calls"],"security":[{"serviceKey":["calls:write"]}],"summary":"Issue a 5-minute, device-scoped LiveKit token for a user the product has authorized","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","pattern":"^[A-Za-z0-9._@-]{1,128}$"},"deviceId":{"type":"string","pattern":"^[A-Za-z0-9._@-]{1,128}$"},"displayName":{"type":"string","minLength":1,"maxLength":128},"role":{"type":"string","enum":["host","speaker","viewer","participant"],"default":"participant"}},"required":["userId","deviceId","displayName"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"token":{"type":"string"},"identity":{"type":"string"},"expiresAt":{"type":"string"}},"required":["url","token","identity","expiresAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/calls/{id}/end":{"post":{"tags":["Calls"],"security":[{"serviceKey":["calls:write"]}],"summary":"Stop token issuance and delete the room","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"productCallId":{"type":"string"},"tenantId":{"type":"string"},"type":{"type":"string","enum":["one_to_one","group","livestream"]},"roomName":{"type":"string"},"status":{"type":"string","enum":["active","ended"]},"maxParticipants":{"type":"integer"},"e2ee":{"type":"boolean"},"createdAt":{"type":"string"},"endedAt":{"type":["string","null"]}},"required":["id","productCallId","tenantId","type","roomName","status","maxParticipants","e2ee","createdAt","endedAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/calls/{id}/participants/{pid}/remove":{"post":{"tags":["Calls"],"security":[{"serviceKey":["calls:write"]}],"summary":"Remove a participant (by identity) and invalidate its earlier tokens","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":400},"required":true,"name":"pid","in":"path"}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/calls/{id}/participants/{pid}/permissions":{"post":{"tags":["Calls"],"security":[{"serviceKey":["calls:write"]}],"summary":"Change a livestream participant role (e.g. promote a viewer to speaker)","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":400},"required":true,"name":"pid","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["host","speaker","viewer","participant"]}},"required":["role"]}}}},"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/calls/{id}/signal":{"post":{"tags":["Calls"],"security":[{"serviceKey":["calls:write"]}],"summary":"Send an incoming-call signal (call:invited, call:ringing, ...) to users' foreground sockets","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["invited","ringing","accepted","declined","ended"]},"toUserIds":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9._@-]{1,128}$"},"minItems":1,"maxItems":1000},"fromUserId":{"type":"string","pattern":"^[A-Za-z0-9._@-]{1,128}$"},"data":{"type":"object","additionalProperties":{}}},"required":["type","toUserIds"]}}}},"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/sessions/messaging-token":{"post":{"tags":["Sessions"],"security":[{"serviceKey":["messaging:write"]}],"summary":"Mint a 10-minute Lynkoria messaging JWT for a user/device the product has authorized","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","pattern":"^[A-Za-z0-9._@-]{1,128}$"},"deviceId":{"type":"string","pattern":"^[A-Za-z0-9._@-]{1,128}$"},"tenantId":{"type":"string","pattern":"^[A-Za-z0-9._@-]{1,128}$","default":"default"}},"required":["userId","deviceId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"expiresAt":{"type":"string"}},"required":["token","expiresAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/users/{userId}/suspend":{"post":{"tags":["Sessions"],"security":[{"serviceKey":["users:write"]}],"summary":"Suspend a user: stop token issuance, disconnect sockets, remove from active calls","parameters":[{"schema":{"type":"string","pattern":"^[A-Za-z0-9._@-]{1,128}$"},"required":true,"name":"userId","in":"path"}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}},"delete":{"tags":["Sessions"],"security":[{"serviceKey":["users:write"]}],"summary":"Lift a user suspension","parameters":[{"schema":{"type":"string","pattern":"^[A-Za-z0-9._@-]{1,128}$"},"required":true,"name":"userId","in":"path"}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/conversations":{"get":{"tags":["Messaging"],"security":[{"messagingToken":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string"},"type":{"type":"string","enum":["dm","group","channel","session"]},"productConversationId":{"type":["string","null"]},"title":{"type":["string","null"]},"lastSeq":{"type":"integer"},"lastMessageAt":{"type":["string","null"]},"createdAt":{"type":"string"},"readSeq":{"type":"integer"}},"required":["id","tenantId","type","productConversationId","title","lastSeq","lastMessageAt","createdAt"]}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"tags":["Messaging"],"security":[{"serviceKey":["messaging:write"]}],"summary":"Create a conversation the product backend has authorized (idempotent on productConversationId)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","pattern":"^[A-Za-z0-9._@-]{1,128}$","default":"default"},"type":{"type":"string","enum":["dm","group","channel","session"]},"productConversationId":{"type":"string","pattern":"^[A-Za-z0-9._@-]{1,128}$"},"title":{"type":"string","maxLength":200},"memberIds":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9._@-]{1,128}$"},"minItems":1,"maxItems":1000}},"required":["type","memberIds"]}}}},"responses":{"200":{"description":"Existing","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string"},"type":{"type":"string","enum":["dm","group","channel","session"]},"productConversationId":{"type":["string","null"]},"title":{"type":["string","null"]},"lastSeq":{"type":"integer"},"lastMessageAt":{"type":["string","null"]},"createdAt":{"type":"string"},"readSeq":{"type":"integer"}},"required":["id","tenantId","type","productConversationId","title","lastSeq","lastMessageAt","createdAt"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenantId":{"type":"string"},"type":{"type":"string","enum":["dm","group","channel","session"]},"productConversationId":{"type":["string","null"]},"title":{"type":["string","null"]},"lastSeq":{"type":"integer"},"lastMessageAt":{"type":["string","null"]},"createdAt":{"type":"string"},"readSeq":{"type":"integer"}},"required":["id","tenantId","type","productConversationId","title","lastSeq","lastMessageAt","createdAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/conversations/{id}/members":{"post":{"tags":["Messaging"],"security":[{"serviceKey":["messaging:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userIds":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9._@-]{1,128}$"},"minItems":1,"maxItems":1000}},"required":["userIds"]}}}},"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/conversations/{id}/members/{userId}":{"delete":{"tags":["Messaging"],"security":[{"serviceKey":["messaging:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","pattern":"^[A-Za-z0-9._@-]{1,128}$"},"required":true,"name":"userId","in":"path"}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/conversations/{id}/messages":{"get":{"tags":["Messaging"],"security":[{"messagingToken":[]}],"summary":"Events after `after_seq` (resync), or message history before `before_seq`","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":["integer","null"],"minimum":0},"required":false,"name":"after_seq","in":"query"},{"schema":{"type":"integer","minimum":1},"required":false,"name":"before_seq","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":100},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid"},"seq":{"type":"integer"},"type":{"type":"string","enum":["message.created","message.updated","message.deleted","reaction.added","reaction.removed"]},"message":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"conversationId":{"type":"string","format":"uuid"},"seq":{"type":"integer"},"senderId":{"type":"string"},"clientMessageId":{"type":"string"},"kind":{"type":"string","enum":["text","system"]},"body":{"type":["string","null"]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fileName":{"type":"string"},"mediaType":{"type":"string"},"size":{"type":"integer"},"status":{"type":"string","enum":["pending","ready","rejected"]},"scanStatus":{"type":"string","enum":["not_scanned","pending","clean","infected","rejected","failed"]}},"required":["id","fileName","mediaType","size","status"]}},"reactions":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"emoji":{"type":"string"}},"required":["userId","emoji"]}},"parentMessageId":{"type":["string","null"]},"createdAt":{"type":"string"},"editedAt":{"type":["string","null"]},"deletedAt":{"type":["string","null"]}},"required":["id","conversationId","seq","senderId","clientMessageId","kind","body","attachments","reactions","parentMessageId","createdAt","editedAt","deletedAt"]},"reaction":{"type":["object","null"],"properties":{"userId":{"type":"string"},"emoji":{"type":"string"}},"required":["userId","emoji"]},"createdAt":{"type":"string"}},"required":["conversationId","seq","type","message","reaction","createdAt"]}},"lastSeq":{"type":"integer"},"hasMore":{"type":"boolean"}},"required":["items","lastSeq","hasMore"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"tags":["Messaging"],"security":[{"messagingToken":[]}],"summary":"Send a message (idempotent on clientMessageId)","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientMessageId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"},"text":{"type":"string","maxLength":65536,"default":""},"attachmentIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":10,"default":[]},"parentMessageId":{"type":"string","format":"uuid"}},"required":["clientMessageId"]}}}},"responses":{"200":{"description":"Duplicate of an earlier send","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"conversationId":{"type":"string","format":"uuid"},"seq":{"type":"integer"},"senderId":{"type":"string"},"clientMessageId":{"type":"string"},"kind":{"type":"string","enum":["text","system"]},"body":{"type":["string","null"]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fileName":{"type":"string"},"mediaType":{"type":"string"},"size":{"type":"integer"},"status":{"type":"string","enum":["pending","ready","rejected"]},"scanStatus":{"type":"string","enum":["not_scanned","pending","clean","infected","rejected","failed"]}},"required":["id","fileName","mediaType","size","status"]}},"reactions":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"emoji":{"type":"string"}},"required":["userId","emoji"]}},"parentMessageId":{"type":["string","null"]},"createdAt":{"type":"string"},"editedAt":{"type":["string","null"]},"deletedAt":{"type":["string","null"]}},"required":["id","conversationId","seq","senderId","clientMessageId","kind","body","attachments","reactions","parentMessageId","createdAt","editedAt","deletedAt"]},"created":{"type":"boolean"},"status":{"type":"string","enum":["sent"]}},"required":["message","created","status"]}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"conversationId":{"type":"string","format":"uuid"},"seq":{"type":"integer"},"senderId":{"type":"string"},"clientMessageId":{"type":"string"},"kind":{"type":"string","enum":["text","system"]},"body":{"type":["string","null"]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fileName":{"type":"string"},"mediaType":{"type":"string"},"size":{"type":"integer"},"status":{"type":"string","enum":["pending","ready","rejected"]},"scanStatus":{"type":"string","enum":["not_scanned","pending","clean","infected","rejected","failed"]}},"required":["id","fileName","mediaType","size","status"]}},"reactions":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"emoji":{"type":"string"}},"required":["userId","emoji"]}},"parentMessageId":{"type":["string","null"]},"createdAt":{"type":"string"},"editedAt":{"type":["string","null"]},"deletedAt":{"type":["string","null"]}},"required":["id","conversationId","seq","senderId","clientMessageId","kind","body","attachments","reactions","parentMessageId","createdAt","editedAt","deletedAt"]},"created":{"type":"boolean"},"status":{"type":"string","enum":["sent"]}},"required":["message","created","status"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/conversations/{id}/read":{"post":{"tags":["Messaging"],"security":[{"messagingToken":[]}],"summary":"Advance the read watermark","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"seq":{"type":"integer","minimum":0}},"required":["seq"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"readSeq":{"type":"integer"}},"required":["readSeq"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/messages/{id}":{"patch":{"tags":["Messaging"],"security":[{"messagingToken":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":65536}},"required":["text"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"conversationId":{"type":"string","format":"uuid"},"seq":{"type":"integer"},"senderId":{"type":"string"},"clientMessageId":{"type":"string"},"kind":{"type":"string","enum":["text","system"]},"body":{"type":["string","null"]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fileName":{"type":"string"},"mediaType":{"type":"string"},"size":{"type":"integer"},"status":{"type":"string","enum":["pending","ready","rejected"]},"scanStatus":{"type":"string","enum":["not_scanned","pending","clean","infected","rejected","failed"]}},"required":["id","fileName","mediaType","size","status"]}},"reactions":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"emoji":{"type":"string"}},"required":["userId","emoji"]}},"parentMessageId":{"type":["string","null"]},"createdAt":{"type":"string"},"editedAt":{"type":["string","null"]},"deletedAt":{"type":["string","null"]}},"required":["id","conversationId","seq","senderId","clientMessageId","kind","body","attachments","reactions","parentMessageId","createdAt","editedAt","deletedAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}},"delete":{"tags":["Messaging"],"security":[{"messagingToken":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/messages/{id}/reactions":{"post":{"tags":["Messaging"],"security":[{"messagingToken":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"emoji":{"type":"string","minLength":1,"maxLength":32}},"required":["emoji"]}}}},"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/messages/{id}/reactions/{emoji}":{"delete":{"tags":["Messaging"],"security":[{"messagingToken":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":32},"required":true,"name":"emoji","in":"path"}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/presence/{userId}":{"get":{"tags":["Presence"],"security":[{"messagingToken":[]}],"summary":"Presence of a user in the caller's project environment and tenant","parameters":[{"schema":{"type":"string","pattern":"^[A-Za-z0-9._@-]{1,128}$"},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"status":{"type":"string","enum":["online","offline","away","dnd","busy"]},"lastSeenAt":{"type":["string","null"]}},"required":["userId","status","lastSeenAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/attachments/upload-intent":{"post":{"tags":["Attachments"],"security":[{"messagingToken":[]}],"summary":"Reserve an attachment and get a 5-minute presigned PUT URL","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conversationId":{"type":"string","format":"uuid"},"fileName":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","minimum":1},"mediaType":{"type":"string","pattern":"^[a-z]+\\/[a-z0-9.+-]+$/i"}},"required":["conversationId","fileName","size","mediaType"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"attachment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fileName":{"type":"string"},"mediaType":{"type":"string"},"size":{"type":"integer"},"status":{"type":"string","enum":["pending","ready","rejected"]},"scanStatus":{"type":"string","enum":["not_scanned","pending","clean","infected","rejected","failed"]}},"required":["id","fileName","mediaType","size","status"]},"uploadUrl":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"expiresAt":{"type":"string"}},"required":["attachment","uploadUrl","headers","expiresAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/attachments/{id}/complete":{"post":{"tags":["Attachments"],"security":[{"messagingToken":[]}],"summary":"Verify the uploaded object (size and type) and mark it usable","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fileName":{"type":"string"},"mediaType":{"type":"string"},"size":{"type":"integer"},"status":{"type":"string","enum":["pending","ready","rejected"]},"scanStatus":{"type":"string","enum":["not_scanned","pending","clean","infected","rejected","failed"]}},"required":["id","fileName","mediaType","size","status"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/attachments/{id}/url":{"get":{"tags":["Attachments"],"security":[{"messagingToken":[]}],"summary":"A 5-minute presigned download URL, after membership checks","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"expiresAt":{"type":"string"}},"required":["url","expiresAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/push/devices":{"put":{"tags":["Push"],"security":[{"messagingToken":[]}],"summary":"Register or refresh this device’s push token (idempotent; call on every token refresh)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"platform":{"type":"string","enum":["android","ios"]},"provider":{"type":"string","enum":["fcm","apns","apns_voip"]},"token":{"type":"string","pattern":"^[A-Za-z0-9:_.-]{16,4096}$"},"appId":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,200}$"},"apnsEnvironment":{"type":"string","enum":["sandbox","production"]}},"required":["platform","provider","token","appId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deviceId":{"type":"string"},"platform":{"type":"string","enum":["android","ios"]},"provider":{"type":"string","enum":["fcm","apns","apns_voip"]},"appId":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","deviceId","platform","provider","appId","updatedAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}},"get":{"tags":["Push"],"security":[{"messagingToken":[]}],"summary":"Push registrations of the signed-in user","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"devices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"deviceId":{"type":"string"},"platform":{"type":"string","enum":["android","ios"]},"provider":{"type":"string","enum":["fcm","apns","apns_voip"]},"appId":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","deviceId","platform","provider","appId","updatedAt"]}}},"required":["devices"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}},"delete":{"tags":["Push"],"security":[{"messagingToken":[]}],"summary":"Unregister this device (on sign-out); optionally only one provider","parameters":[{"schema":{"type":"string","enum":["fcm","apns","apns_voip"]},"required":false,"name":"provider","in":"query"}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/push/preferences":{"get":{"tags":["Push"],"security":[{"messagingToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"calls":{"type":"boolean"},"messages":{"type":"boolean"}},"required":["calls","messages"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}},"put":{"tags":["Push"],"security":[{"messagingToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"calls":{"type":"boolean"},"messages":{"type":"boolean"}},"required":["calls","messages"]}}}},"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/notifications":{"post":{"tags":["Push"],"security":[{"serviceKey":["messaging:write"]}],"summary":"Queue a push to users’ registered devices (message or custom kinds)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","pattern":"^[A-Za-z0-9._@-]{1,128}$","default":"default"},"userIds":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9._@-]{1,128}$"},"minItems":1,"maxItems":1000},"kind":{"type":"string","enum":["message","custom"],"default":"custom"},"title":{"type":"string","maxLength":200},"body":{"type":"string","maxLength":1000},"data":{"type":"object","additionalProperties":{"type":"string","maxLength":1024},"default":{}},"collapseKey":{"type":"string","maxLength":64},"ttlSeconds":{"type":"integer","minimum":0,"maximum":2419200,"default":86400}},"required":["userIds"]}}}},"responses":{"202":{"description":"Queued","content":{"application/json":{"schema":{"type":"object","properties":{"queued":{"type":"integer"}},"required":["queued"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/calls/{id}/recordings":{"post":{"tags":["Recordings"],"security":[{"serviceKey":["calls:write"]}],"summary":"Start recording or streaming a call through LiveKit Egress (refused for E2EE calls)","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["room_composite","participant","audio_only"],"default":"room_composite"},"participantIdentity":{"type":"string","minLength":1,"maxLength":400},"outputs":{"type":"array","items":{"type":"string","enum":["mp4","ogg","hls"]},"minItems":1,"maxItems":2,"default":["mp4"]},"rtmpUrls":{"type":"array","items":{"type":"string","format":"uri"},"maxItems":3,"default":[]},"layout":{"type":"string","enum":["grid","speaker","single-speaker"],"default":"grid"}}}}}},"responses":{"201":{"description":"Started","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"callId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["room_composite","participant","audio_only"]},"outputs":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["starting","active","ending","complete","failed","aborted","deleted"]},"files":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"size":{"type":["integer","null"]},"durationMs":{"type":["integer","null"]}},"required":["name","size","durationMs"]}},"error":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"endedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","callId","kind","outputs","status","files","error","startedAt","endedAt","expiresAt","createdAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"409":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}},"get":{"tags":["Recordings"],"security":[{"serviceKey":["calls:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"recordings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"callId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["room_composite","participant","audio_only"]},"outputs":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["starting","active","ending","complete","failed","aborted","deleted"]},"files":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"size":{"type":["integer","null"]},"durationMs":{"type":["integer","null"]}},"required":["name","size","durationMs"]}},"error":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"endedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","callId","kind","outputs","status","files","error","startedAt","endedAt","expiresAt","createdAt"]}}},"required":["recordings"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/recordings/{id}":{"get":{"tags":["Recordings"],"security":[{"serviceKey":["calls:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"callId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["room_composite","participant","audio_only"]},"outputs":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["starting","active","ending","complete","failed","aborted","deleted"]},"files":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"size":{"type":["integer","null"]},"durationMs":{"type":["integer","null"]}},"required":["name","size","durationMs"]}},"error":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"endedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","callId","kind","outputs","status","files","error","startedAt","endedAt","expiresAt","createdAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}},"delete":{"tags":["Recordings"],"security":[{"serviceKey":["calls:write"]}],"summary":"Delete a finished recording and every stored file","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/recordings/{id}/stop":{"post":{"tags":["Recordings"],"security":[{"serviceKey":["calls:write"]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"callId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["room_composite","participant","audio_only"]},"outputs":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["starting","active","ending","complete","failed","aborted","deleted"]},"files":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"size":{"type":["integer","null"]},"durationMs":{"type":["integer","null"]}},"required":["name","size","durationMs"]}},"error":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"endedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","callId","kind","outputs","status","files","error","startedAt","endedAt","expiresAt","createdAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/recordings/{id}/download":{"get":{"tags":["Recordings"],"security":[{"serviceKey":["calls:write"]}],"summary":"A 5-minute presigned URL for one output file of a completed recording","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":300},"required":true,"name":"file","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"expiresAt":{"type":"string"}},"required":["url","expiresAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/auth/login":{"post":{"tags":["Admin"],"summary":"Console sign-in. Accounts are provisioned by the operator CLI; there is no signup.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email"},"password":{"type":"string","minLength":1,"maxLength":1024}},"required":["email","password"]}}}},"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/auth/logout":{"post":{"tags":["Admin"],"summary":"Revoke the current console session","responses":{"204":{"description":"No content"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/me":{"get":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin","developer","auditor"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"roles":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","developer","auditor"]},"projectId":{"type":["string","null"]}},"required":["role","projectId"]}}},"required":["email","roles"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/projects":{"get":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin","developer","auditor"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"createdAt":{"type":"string"},"environments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["staging","production"]},"status":{"type":"string","enum":["active","disabled"]},"allowedOrigins":{"type":"array","items":{"type":"string"}},"webhookUrl":{"type":["string","null"]},"webhookSecretConfigured":{"type":"boolean"},"livekitKeyRef":{"type":"string"},"pushCredentialRef":{"type":["string","null"]},"features":{"type":"object","properties":{"calls":{"type":"boolean","default":true},"livestream":{"type":"boolean","default":false},"messaging":{"type":"boolean","default":false},"presence":{"type":"boolean","default":false},"attachments":{"type":"boolean","default":false},"singleDeviceCalls":{"type":"boolean","default":false},"push":{"type":"boolean","default":false},"recording":{"type":"boolean","default":false}}},"limits":{"type":"object","properties":{"maxRoomSize":{"type":"integer","minimum":2,"maximum":1000,"default":50},"maxConcurrentRooms":{"type":"integer","minimum":1,"maximum":100000,"default":100},"tokensPerMinute":{"type":"integer","minimum":1,"maximum":100000,"default":600}}},"messagingPolicy":{"type":"object","properties":{"allowDms":{"type":"boolean","default":true},"allowGroups":{"type":"boolean","default":true},"allowAttachments":{"type":"boolean","default":false},"allowThreads":{"type":"boolean","default":false},"allowReactions":{"type":"boolean","default":true},"maxAttachmentBytes":{"type":"integer","minimum":1,"maximum":5368709120,"default":26214400},"allowedAttachmentTypes":{"type":"array","items":{"type":"string","pattern":"^[a-z]+\\/[a-z0-9.+*-]+$/i"},"maxItems":50,"default":["image/*","video/mp4","application/pdf"]},"retentionDays":{"type":["integer","null"],"minimum":1,"maximum":36500,"default":null}}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","projectId","environment","status","allowedOrigins","webhookUrl","webhookSecretConfigured","livekitKeyRef","pushCredentialRef","features","limits","messagingPolicy","createdAt","updatedAt"]}}},"required":["id","slug","name","status","createdAt","environments"]}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z][a-z0-9-]{1,30}$"},"name":{"type":"string","minLength":1,"maxLength":100}},"required":["slug","name"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"createdAt":{"type":"string"},"environments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["staging","production"]},"status":{"type":"string","enum":["active","disabled"]},"allowedOrigins":{"type":"array","items":{"type":"string"}},"webhookUrl":{"type":["string","null"]},"webhookSecretConfigured":{"type":"boolean"},"livekitKeyRef":{"type":"string"},"pushCredentialRef":{"type":["string","null"]},"features":{"type":"object","properties":{"calls":{"type":"boolean","default":true},"livestream":{"type":"boolean","default":false},"messaging":{"type":"boolean","default":false},"presence":{"type":"boolean","default":false},"attachments":{"type":"boolean","default":false},"singleDeviceCalls":{"type":"boolean","default":false},"push":{"type":"boolean","default":false},"recording":{"type":"boolean","default":false}}},"limits":{"type":"object","properties":{"maxRoomSize":{"type":"integer","minimum":2,"maximum":1000,"default":50},"maxConcurrentRooms":{"type":"integer","minimum":1,"maximum":100000,"default":100},"tokensPerMinute":{"type":"integer","minimum":1,"maximum":100000,"default":600}}},"messagingPolicy":{"type":"object","properties":{"allowDms":{"type":"boolean","default":true},"allowGroups":{"type":"boolean","default":true},"allowAttachments":{"type":"boolean","default":false},"allowThreads":{"type":"boolean","default":false},"allowReactions":{"type":"boolean","default":true},"maxAttachmentBytes":{"type":"integer","minimum":1,"maximum":5368709120,"default":26214400},"allowedAttachmentTypes":{"type":"array","items":{"type":"string","pattern":"^[a-z]+\\/[a-z0-9.+*-]+$/i"},"maxItems":50,"default":["image/*","video/mp4","application/pdf"]},"retentionDays":{"type":["integer","null"],"minimum":1,"maximum":36500,"default":null}}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","projectId","environment","status","allowedOrigins","webhookUrl","webhookSecretConfigured","livekitKeyRef","pushCredentialRef","features","limits","messagingPolicy","createdAt","updatedAt"]}}},"required":["id","slug","name","status","createdAt","environments"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/projects/{projectId}":{"get":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin","developer","auditor"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"createdAt":{"type":"string"},"environments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["staging","production"]},"status":{"type":"string","enum":["active","disabled"]},"allowedOrigins":{"type":"array","items":{"type":"string"}},"webhookUrl":{"type":["string","null"]},"webhookSecretConfigured":{"type":"boolean"},"livekitKeyRef":{"type":"string"},"pushCredentialRef":{"type":["string","null"]},"features":{"type":"object","properties":{"calls":{"type":"boolean","default":true},"livestream":{"type":"boolean","default":false},"messaging":{"type":"boolean","default":false},"presence":{"type":"boolean","default":false},"attachments":{"type":"boolean","default":false},"singleDeviceCalls":{"type":"boolean","default":false},"push":{"type":"boolean","default":false},"recording":{"type":"boolean","default":false}}},"limits":{"type":"object","properties":{"maxRoomSize":{"type":"integer","minimum":2,"maximum":1000,"default":50},"maxConcurrentRooms":{"type":"integer","minimum":1,"maximum":100000,"default":100},"tokensPerMinute":{"type":"integer","minimum":1,"maximum":100000,"default":600}}},"messagingPolicy":{"type":"object","properties":{"allowDms":{"type":"boolean","default":true},"allowGroups":{"type":"boolean","default":true},"allowAttachments":{"type":"boolean","default":false},"allowThreads":{"type":"boolean","default":false},"allowReactions":{"type":"boolean","default":true},"maxAttachmentBytes":{"type":"integer","minimum":1,"maximum":5368709120,"default":26214400},"allowedAttachmentTypes":{"type":"array","items":{"type":"string","pattern":"^[a-z]+\\/[a-z0-9.+*-]+$/i"},"maxItems":50,"default":["image/*","video/mp4","application/pdf"]},"retentionDays":{"type":["integer","null"],"minimum":1,"maximum":36500,"default":null}}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","projectId","environment","status","allowedOrigins","webhookUrl","webhookSecretConfigured","livekitKeyRef","pushCredentialRef","features","limits","messagingPolicy","createdAt","updatedAt"]}}},"required":["id","slug","name","status","createdAt","environments"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}},"patch":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"status":{"type":"string","enum":["active","disabled"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"createdAt":{"type":"string"},"environments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["staging","production"]},"status":{"type":"string","enum":["active","disabled"]},"allowedOrigins":{"type":"array","items":{"type":"string"}},"webhookUrl":{"type":["string","null"]},"webhookSecretConfigured":{"type":"boolean"},"livekitKeyRef":{"type":"string"},"pushCredentialRef":{"type":["string","null"]},"features":{"type":"object","properties":{"calls":{"type":"boolean","default":true},"livestream":{"type":"boolean","default":false},"messaging":{"type":"boolean","default":false},"presence":{"type":"boolean","default":false},"attachments":{"type":"boolean","default":false},"singleDeviceCalls":{"type":"boolean","default":false},"push":{"type":"boolean","default":false},"recording":{"type":"boolean","default":false}}},"limits":{"type":"object","properties":{"maxRoomSize":{"type":"integer","minimum":2,"maximum":1000,"default":50},"maxConcurrentRooms":{"type":"integer","minimum":1,"maximum":100000,"default":100},"tokensPerMinute":{"type":"integer","minimum":1,"maximum":100000,"default":600}}},"messagingPolicy":{"type":"object","properties":{"allowDms":{"type":"boolean","default":true},"allowGroups":{"type":"boolean","default":true},"allowAttachments":{"type":"boolean","default":false},"allowThreads":{"type":"boolean","default":false},"allowReactions":{"type":"boolean","default":true},"maxAttachmentBytes":{"type":"integer","minimum":1,"maximum":5368709120,"default":26214400},"allowedAttachmentTypes":{"type":"array","items":{"type":"string","pattern":"^[a-z]+\\/[a-z0-9.+*-]+$/i"},"maxItems":50,"default":["image/*","video/mp4","application/pdf"]},"retentionDays":{"type":["integer","null"],"minimum":1,"maximum":36500,"default":null}}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","projectId","environment","status","allowedOrigins","webhookUrl","webhookSecretConfigured","livekitKeyRef","pushCredentialRef","features","limits","messagingPolicy","createdAt","updatedAt"]}}},"required":["id","slug","name","status","createdAt","environments"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/projects/{projectId}/environments":{"post":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"environment":{"type":"string","enum":["staging","production"]},"allowedOrigins":{"type":"array","items":{"type":"string","format":"uri"},"maxItems":50,"default":[]},"webhookUrl":{"type":["string","null"],"format":"uri","default":null},"livekitKeyRef":{"type":"string","minLength":1,"maxLength":100},"pushCredentialRef":{"type":["string","null"],"minLength":1,"maxLength":100,"default":null},"features":{"type":"object","properties":{"calls":{"type":"boolean","default":true},"livestream":{"type":"boolean","default":false},"messaging":{"type":"boolean","default":false},"presence":{"type":"boolean","default":false},"attachments":{"type":"boolean","default":false},"singleDeviceCalls":{"type":"boolean","default":false},"push":{"type":"boolean","default":false},"recording":{"type":"boolean","default":false}},"default":{}},"limits":{"type":"object","properties":{"maxRoomSize":{"type":"integer","minimum":2,"maximum":1000,"default":50},"maxConcurrentRooms":{"type":"integer","minimum":1,"maximum":100000,"default":100},"tokensPerMinute":{"type":"integer","minimum":1,"maximum":100000,"default":600}},"default":{}},"messagingPolicy":{"type":"object","properties":{"allowDms":{"type":"boolean","default":true},"allowGroups":{"type":"boolean","default":true},"allowAttachments":{"type":"boolean","default":false},"allowThreads":{"type":"boolean","default":false},"allowReactions":{"type":"boolean","default":true},"maxAttachmentBytes":{"type":"integer","minimum":1,"maximum":5368709120,"default":26214400},"allowedAttachmentTypes":{"type":"array","items":{"type":"string","pattern":"^[a-z]+\\/[a-z0-9.+*-]+$/i"},"maxItems":50,"default":["image/*","video/mp4","application/pdf"]},"retentionDays":{"type":["integer","null"],"minimum":1,"maximum":36500,"default":null}},"default":{}}},"required":["environment","livekitKeyRef"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["staging","production"]},"status":{"type":"string","enum":["active","disabled"]},"allowedOrigins":{"type":"array","items":{"type":"string"}},"webhookUrl":{"type":["string","null"]},"webhookSecretConfigured":{"type":"boolean"},"livekitKeyRef":{"type":"string"},"pushCredentialRef":{"type":["string","null"]},"features":{"type":"object","properties":{"calls":{"type":"boolean","default":true},"livestream":{"type":"boolean","default":false},"messaging":{"type":"boolean","default":false},"presence":{"type":"boolean","default":false},"attachments":{"type":"boolean","default":false},"singleDeviceCalls":{"type":"boolean","default":false},"push":{"type":"boolean","default":false},"recording":{"type":"boolean","default":false}}},"limits":{"type":"object","properties":{"maxRoomSize":{"type":"integer","minimum":2,"maximum":1000,"default":50},"maxConcurrentRooms":{"type":"integer","minimum":1,"maximum":100000,"default":100},"tokensPerMinute":{"type":"integer","minimum":1,"maximum":100000,"default":600}}},"messagingPolicy":{"type":"object","properties":{"allowDms":{"type":"boolean","default":true},"allowGroups":{"type":"boolean","default":true},"allowAttachments":{"type":"boolean","default":false},"allowThreads":{"type":"boolean","default":false},"allowReactions":{"type":"boolean","default":true},"maxAttachmentBytes":{"type":"integer","minimum":1,"maximum":5368709120,"default":26214400},"allowedAttachmentTypes":{"type":"array","items":{"type":"string","pattern":"^[a-z]+\\/[a-z0-9.+*-]+$/i"},"maxItems":50,"default":["image/*","video/mp4","application/pdf"]},"retentionDays":{"type":["integer","null"],"minimum":1,"maximum":36500,"default":null}}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","projectId","environment","status","allowedOrigins","webhookUrl","webhookSecretConfigured","livekitKeyRef","pushCredentialRef","features","limits","messagingPolicy","createdAt","updatedAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/projects/{projectId}/environments/{envId}":{"patch":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"envId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","disabled"]},"allowedOrigins":{"type":"array","items":{"type":"string","format":"uri"},"maxItems":50},"webhookUrl":{"type":["string","null"],"format":"uri"},"livekitKeyRef":{"type":"string","minLength":1,"maxLength":100},"pushCredentialRef":{"type":["string","null"],"minLength":1,"maxLength":100},"features":{"type":"object","properties":{"calls":{"type":"boolean"},"livestream":{"type":"boolean"},"messaging":{"type":"boolean"},"presence":{"type":"boolean"},"attachments":{"type":"boolean"},"singleDeviceCalls":{"type":"boolean"},"push":{"type":"boolean"},"recording":{"type":"boolean"}}},"limits":{"type":"object","properties":{"maxRoomSize":{"type":"integer","minimum":2,"maximum":1000},"maxConcurrentRooms":{"type":"integer","minimum":1,"maximum":100000},"tokensPerMinute":{"type":"integer","minimum":1,"maximum":100000}}},"messagingPolicy":{"type":"object","properties":{"allowDms":{"type":"boolean"},"allowGroups":{"type":"boolean"},"allowAttachments":{"type":"boolean"},"allowThreads":{"type":"boolean"},"allowReactions":{"type":"boolean"},"maxAttachmentBytes":{"type":"integer","minimum":1,"maximum":5368709120},"allowedAttachmentTypes":{"type":"array","items":{"type":"string","pattern":"^[a-z]+\\/[a-z0-9.+*-]+$/i"},"maxItems":50},"retentionDays":{"type":["integer","null"],"minimum":1,"maximum":36500}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["staging","production"]},"status":{"type":"string","enum":["active","disabled"]},"allowedOrigins":{"type":"array","items":{"type":"string"}},"webhookUrl":{"type":["string","null"]},"webhookSecretConfigured":{"type":"boolean"},"livekitKeyRef":{"type":"string"},"pushCredentialRef":{"type":["string","null"]},"features":{"type":"object","properties":{"calls":{"type":"boolean","default":true},"livestream":{"type":"boolean","default":false},"messaging":{"type":"boolean","default":false},"presence":{"type":"boolean","default":false},"attachments":{"type":"boolean","default":false},"singleDeviceCalls":{"type":"boolean","default":false},"push":{"type":"boolean","default":false},"recording":{"type":"boolean","default":false}}},"limits":{"type":"object","properties":{"maxRoomSize":{"type":"integer","minimum":2,"maximum":1000,"default":50},"maxConcurrentRooms":{"type":"integer","minimum":1,"maximum":100000,"default":100},"tokensPerMinute":{"type":"integer","minimum":1,"maximum":100000,"default":600}}},"messagingPolicy":{"type":"object","properties":{"allowDms":{"type":"boolean","default":true},"allowGroups":{"type":"boolean","default":true},"allowAttachments":{"type":"boolean","default":false},"allowThreads":{"type":"boolean","default":false},"allowReactions":{"type":"boolean","default":true},"maxAttachmentBytes":{"type":"integer","minimum":1,"maximum":5368709120,"default":26214400},"allowedAttachmentTypes":{"type":"array","items":{"type":"string","pattern":"^[a-z]+\\/[a-z0-9.+*-]+$/i"},"maxItems":50,"default":["image/*","video/mp4","application/pdf"]},"retentionDays":{"type":["integer","null"],"minimum":1,"maximum":36500,"default":null}}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","projectId","environment","status","allowedOrigins","webhookUrl","webhookSecretConfigured","livekitKeyRef","pushCredentialRef","features","limits","messagingPolicy","createdAt","updatedAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/projects/{projectId}/environments/{envId}/webhook-secret":{"post":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin"],"summary":"Rotate the product webhook signing secret. The secret is shown once.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"envId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string"},"version":{"type":"integer"}},"required":["secret","version"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/projects/{projectId}/keys":{"get":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin","developer","auditor"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"environmentId":{"type":"string","format":"uuid"},"mode":{"type":"string","enum":["live","test"]},"displayName":{"type":"string"},"prefix":{"type":"string"},"suffix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"expiresAt":{"type":["string","null"]},"revokedAt":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","environmentId","mode","displayName","prefix","suffix","scopes","expiresAt","revokedAt","lastUsedAt","createdBy","createdAt"]}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin"],"summary":"Create a service key. The secret is returned once and never again.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"environmentId":{"type":"string","format":"uuid"},"displayName":{"type":"string","minLength":1,"maxLength":100},"scopes":{"type":"array","items":{"type":"string","enum":["calls:write","messaging:write","users:write"]},"minItems":1,"default":["calls:write","messaging:write","users:write"]},"expiresAt":{"type":["string","null"],"format":"date-time","default":null}},"required":["environmentId","displayName"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"object","properties":{"id":{"type":"string"},"environmentId":{"type":"string","format":"uuid"},"mode":{"type":"string","enum":["live","test"]},"displayName":{"type":"string"},"prefix":{"type":"string"},"suffix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"expiresAt":{"type":["string","null"]},"revokedAt":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","environmentId","mode","displayName","prefix","suffix","scopes","expiresAt","revokedAt","lastUsedAt","createdBy","createdAt"]},"secret":{"type":"string"}},"required":["key","secret"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/projects/{projectId}/keys/{id}/rotate":{"post":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin"],"summary":"Create a replacement key; the old key stays active until revoked (zero-downtime rotation)","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","pattern":"^[A-Za-z0-9]{12}$"},"required":true,"name":"id","in":"path"}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"object","properties":{"id":{"type":"string"},"environmentId":{"type":"string","format":"uuid"},"mode":{"type":"string","enum":["live","test"]},"displayName":{"type":"string"},"prefix":{"type":"string"},"suffix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"expiresAt":{"type":["string","null"]},"revokedAt":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]},"createdBy":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","environmentId","mode","displayName","prefix","suffix","scopes","expiresAt","revokedAt","lastUsedAt","createdBy","createdAt"]},"secret":{"type":"string"}},"required":["key","secret"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/projects/{projectId}/keys/{id}":{"delete":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin"],"summary":"Revoke a service key (effective on the next request)","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","pattern":"^[A-Za-z0-9]{12}$"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/projects/{projectId}/usage":{"get":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin","developer","auditor"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"env","in":"query"},{"schema":{"type":"string","format":"date"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"environmentId":{"type":"string","format":"uuid"},"date":{"type":"string"},"callCount":{"type":"number"},"participantMinutes":{"type":"number"},"peakParticipants":{"type":"number"},"apiRequests":{"type":"number"},"apiErrors":{"type":"number"},"tokensIssued":{"type":"number"},"messagesSent":{"type":"number"}},"required":["environmentId","date","callCount","participantMinutes","peakParticipants","apiRequests","apiErrors","tokensIssued","messagesSent"]}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/projects/{projectId}/usage/export":{"get":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin","developer","auditor"],"summary":"Daily usage as CSV (at most 400 days). Built on the server and recorded in the audit log.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"env","in":"query"},{"schema":{"type":"string","format":"date"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"CSV","content":{"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/projects/{projectId}/webhook-deliveries":{"get":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin","developer","auditor"],"summary":"Pending or dead-lettered outbound webhook deliveries","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","enum":["pending","dead"],"default":"dead"},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"environmentId":{"type":"string","format":"uuid"},"type":{"type":"string"},"attempts":{"type":"integer"},"lastError":{"type":["string","null"]},"createdAt":{"type":"string"},"availableAt":{"type":"string"},"deliveredAt":{"type":["string","null"]},"deadAt":{"type":["string","null"]}},"required":["id","environmentId","type","attempts","lastError","createdAt","availableAt","deliveredAt","deadAt"]}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/projects/{projectId}/operations":{"get":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin","developer","auditor"],"summary":"Recent push deliveries, recordings and attachment scan results (no secrets or content)","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"pushDeliveries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"environmentId":{"type":"string","format":"uuid"},"provider":{"type":"string","enum":["fcm","apns","apns_voip"]},"kind":{"type":"string"},"status":{"type":"string","enum":["pending","sent","failed","dead"]},"attempts":{"type":"integer"},"lastError":{"type":["string","null"]},"createdAt":{"type":"string"},"sentAt":{"type":["string","null"]}},"required":["id","environmentId","provider","kind","status","attempts","lastError","createdAt","sentAt"]}},"recordings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"callId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["room_composite","participant","audio_only"]},"outputs":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["starting","active","ending","complete","failed","aborted","deleted"]},"files":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"size":{"type":["integer","null"]},"durationMs":{"type":["integer","null"]}},"required":["name","size","durationMs"]}},"error":{"type":["string","null"]},"startedAt":{"type":["string","null"]},"endedAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["id","callId","kind","outputs","status","files","error","startedAt","endedAt","expiresAt","createdAt"]}},"scans":{"type":"object","properties":{"counts":{"type":"object","additionalProperties":{"type":"integer"}},"recent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"environmentId":{"type":"string","format":"uuid"},"scanStatus":{"type":"string"},"detectedType":{"type":["string","null"]},"scanDetail":{"type":["string","null"]},"size":{"type":"integer"},"scannedAt":{"type":["string","null"]}},"required":["id","environmentId","scanStatus","detectedType","scanDetail","size","scannedAt"]}}},"required":["counts","recent"]}},"required":["pushDeliveries","recordings","scans"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/projects/{projectId}/webhook-deliveries/{eventId}/retry":{"post":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"eventId","in":"path"}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/audit-logs":{"get":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin","auditor"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":false,"name":"projectId","in":"query"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"action","in":"query"},{"schema":{"type":"string","maxLength":320},"required":false,"name":"actor","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"to","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"before","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"actor":{"type":"string"},"projectId":{"type":["string","null"]},"action":{"type":"string"},"targetType":{"type":"string"},"targetId":{"type":["string","null"]},"ip":{"type":["string","null"]},"userAgent":{"type":["string","null"]},"requestId":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string"}},"required":["id","actor","projectId","action","targetType","targetId","ip","userAgent","requestId","metadata","createdAt"]}},"nextBefore":{"type":["string","null"]}},"required":["items","nextBefore"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/roles":{"get":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin","auditor"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","developer","auditor"]},"projectId":{"type":["string","null"]},"createdAt":{"type":"string"},"lastActivityAt":{"type":["string","null"]}},"required":["id","email","role","projectId","createdAt"]}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["owner","admin","developer","auditor"]},"projectId":{"type":["string","null"],"format":"uuid","default":null}},"required":["email","role"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","developer","auditor"]},"projectId":{"type":["string","null"]},"createdAt":{"type":"string"},"lastActivityAt":{"type":["string","null"]}},"required":["id","email","role","projectId","createdAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/roles/{id}":{"delete":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/me/sessions":{"get":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin","developer","auditor"],"summary":"The signed-in user's active console sessions","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"current":{"type":"boolean"},"createdAt":{"type":"string"},"lastSeenAt":{"type":"string"},"expiresAt":{"type":"string"},"ip":{"type":["string","null"]},"userAgent":{"type":["string","null"]}},"required":["id","current","createdAt","lastSeenAt","expiresAt","ip","userAgent"]}}},"required":["items"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/me/sessions/{id}":{"delete":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin","developer","auditor"],"summary":"End one of the signed-in user's own sessions (signs that browser out)","parameters":[{"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/me/activity":{"get":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin","developer","auditor"],"summary":"The signed-in user's recent sign-ins, failed sign-ins, sign-outs and revocations","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"actor":{"type":"string"},"projectId":{"type":["string","null"]},"action":{"type":"string"},"targetType":{"type":"string"},"targetId":{"type":["string","null"]},"ip":{"type":["string","null"]},"userAgent":{"type":["string","null"]},"requestId":{"type":["string","null"]},"metadata":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string"}},"required":["id","actor","projectId","action","targetType","targetId","ip","userAgent","requestId","metadata","createdAt"]}}},"required":["items"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/usage":{"get":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin","developer","auditor"],"summary":"Usage over time for every readable project (or one project or environment), in hourly (up to 7 days, last 35 days) or daily (up to 400 days) buckets, with per-project totals","parameters":[{"schema":{"type":"string","enum":["hour","day"],"default":"day"},"required":false,"name":"bucket","in":"query"},{"schema":{"type":"string","maxLength":40},"required":true,"name":"from","in":"query"},{"schema":{"type":"string","maxLength":40},"required":true,"name":"to","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"project","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"env","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"bucket":{"type":"string","enum":["hour","day"]},"from":{"type":"string"},"to":{"type":"string"},"since":{"type":["string","null"]},"points":{"type":"array","items":{"type":"object","properties":{"callCount":{"type":"number"},"participantMinutes":{"type":"number"},"peakParticipants":{"type":"number"},"messagesSent":{"type":"number"},"tokensIssued":{"type":"number"},"apiRequests":{"type":"number"},"apiErrors":{"type":"number"},"bucket":{"type":"string"}},"required":["callCount","participantMinutes","peakParticipants","messagesSent","tokensIssued","apiRequests","apiErrors","bucket"]}},"totals":{"type":"object","properties":{"callCount":{"type":"number"},"participantMinutes":{"type":"number"},"peakParticipants":{"type":"number"},"messagesSent":{"type":"number"},"tokensIssued":{"type":"number"},"apiRequests":{"type":"number"},"apiErrors":{"type":"number"}},"required":["callCount","participantMinutes","peakParticipants","messagesSent","tokensIssued","apiRequests","apiErrors"]},"byProject":{"type":"array","items":{"type":"object","properties":{"callCount":{"type":"number"},"participantMinutes":{"type":"number"},"peakParticipants":{"type":"number"},"messagesSent":{"type":"number"},"tokensIssued":{"type":"number"},"apiRequests":{"type":"number"},"apiErrors":{"type":"number"},"projectId":{"type":"string","format":"uuid"}},"required":["callCount","participantMinutes","peakParticipants","messagesSent","tokensIssued","apiRequests","apiErrors","projectId"]}}},"required":["bucket","from","to","since","points","totals","byProject"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/live":{"get":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin","developer","auditor"],"summary":"Current activity per readable project: active calls and livestreams, connected participants, livestream audience, possibly stale calls and webhook backlog","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"generatedAt":{"type":"string"},"projects":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid"},"activeCalls":{"type":"integer"},"livestreams":{"type":"integer"},"connectedParticipants":{"type":"integer"},"livestreamAudience":{"type":"integer"},"staleCalls":{"type":"integer"},"webhooksPending":{"type":"integer"},"webhooksDead":{"type":"integer"}},"required":["projectId","activeCalls","livestreams","connectedParticipants","livestreamAudience","staleCalls","webhooksPending","webhooksDead"]}}},"required":["generatedAt","projects"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/projects/{projectId}/calls":{"get":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin","developer","auditor"],"summary":"Calls and livestreams, newest first, with connected and total participant counts","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","enum":["active","ended","all"],"default":"active"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["one_to_one","group","livestream"]},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"env","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"environmentId":{"type":"string","format":"uuid"},"tenantId":{"type":"string"},"productCallId":{"type":"string"},"type":{"type":"string","enum":["one_to_one","group","livestream"]},"status":{"type":"string","enum":["active","ended"]},"maxParticipants":{"type":"integer"},"e2ee":{"type":"boolean"},"startedAt":{"type":"string"},"endedAt":{"type":["string","null"]},"durationSeconds":{"type":"integer"},"connected":{"type":"integer"},"participantSessions":{"type":"integer"},"stale":{"type":"boolean"}},"required":["id","environmentId","tenantId","productCallId","type","status","maxParticipants","e2ee","startedAt","endedAt","durationSeconds","connected","participantSessions","stale"]}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/projects/{projectId}/calls/{callId}":{"get":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin","developer","auditor"],"summary":"One call with its participant sessions (identities only; no media or messages)","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"callId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"call":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"environmentId":{"type":"string","format":"uuid"},"tenantId":{"type":"string"},"productCallId":{"type":"string"},"type":{"type":"string","enum":["one_to_one","group","livestream"]},"status":{"type":"string","enum":["active","ended"]},"maxParticipants":{"type":"integer"},"e2ee":{"type":"boolean"},"startedAt":{"type":"string"},"endedAt":{"type":["string","null"]},"durationSeconds":{"type":"integer"},"connected":{"type":"integer"},"participantSessions":{"type":"integer"},"stale":{"type":"boolean"}},"required":["id","environmentId","tenantId","productCallId","type","status","maxParticipants","e2ee","startedAt","endedAt","durationSeconds","connected","participantSessions","stale"]},"participants":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"string"},"userId":{"type":"string"},"deviceId":{"type":"string"},"joinedAt":{"type":"string"},"leftAt":{"type":["string","null"]},"durationSeconds":{"type":"integer"}},"required":["identity","userId","deviceId","joinedAt","leftAt","durationSeconds"]}},"participantTotal":{"type":"integer"}},"required":["call","participants","participantTotal"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/projects/{projectId}/calls/{callId}/end":{"post":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin"],"summary":"End a call for everyone: disconnects participants, stops new join tokens and sends call.ended (reason ended_by_console)","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"callId","in":"path"}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/projects/{projectId}/calls/{callId}/participants/{identity}/remove":{"post":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin"],"summary":"Disconnect one participant device from an active call","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"callId","in":"path"},{"schema":{"type":"string","minLength":3,"maxLength":400},"required":true,"name":"identity","in":"path"}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/projects/{projectId}/live":{"get":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin","developer","auditor"],"summary":"Current activity per environment: active calls by type, connected participants, livestream audience, possibly stale calls, quota limits and webhook backlog","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"projectId","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"generatedAt":{"type":"string"},"environments":{"type":"array","items":{"type":"object","properties":{"environmentId":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["staging","production"]},"activeCalls":{"type":"object","properties":{"total":{"type":"integer"},"one_to_one":{"type":"integer"},"group":{"type":"integer"},"livestream":{"type":"integer"}},"required":["total","one_to_one","group","livestream"]},"connectedParticipants":{"type":"integer"},"livestreamAudience":{"type":"integer"},"staleCalls":{"type":"integer"},"limits":{"type":"object","properties":{"maxRoomSize":{"type":"integer","minimum":2,"maximum":1000,"default":50},"maxConcurrentRooms":{"type":"integer","minimum":1,"maximum":100000,"default":100},"tokensPerMinute":{"type":"integer","minimum":1,"maximum":100000,"default":600}}},"webhooks":{"type":"object","properties":{"pending":{"type":"integer"},"dead":{"type":"integer"},"oldestPendingAt":{"type":["string","null"]}},"required":["pending","dead","oldestPendingAt"]}},"required":["environmentId","environment","activeCalls","connectedParticipants","livestreamAudience","staleCalls","limits","webhooks"]}}},"required":["generatedAt","environments"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/admin/projects/{projectId}/webhook-events":{"get":{"tags":["Admin"],"security":[{"consoleSession":[]}],"x-console-roles":["owner","admin","developer","auditor"],"summary":"Outbound webhook deliveries by status (pending, dead or delivered), newest first, paginated. Payloads and secrets are never returned.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"projectId","in":"path"},{"schema":{"type":"string","enum":["pending","dead","delivered"],"default":"dead"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"env","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"environmentId":{"type":"string","format":"uuid"},"type":{"type":"string"},"attempts":{"type":"integer"},"lastError":{"type":["string","null"]},"createdAt":{"type":"string"},"availableAt":{"type":"string"},"deliveredAt":{"type":["string","null"]},"deadAt":{"type":["string","null"]}},"required":["id","environmentId","type","attempts","lastError","createdAt","availableAt","deliveredAt","deadAt"]}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"404":{"description":"Not found (including resources of other projects)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Rate limit or quota exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]}}}}}}}},"webhooks":{}}