{
    "info": {
        "description": "External API for reading rooms.",
        "title": "Talque Room API",
        "version": "1.0.0"
    },
    "paths": {
        "/api/v1/room/read": {
            "post": {
                "summary": "Read rooms by ID",
                "description": "Looks up one or more rooms by their IDs.",
                "parameters": [
                    {
                        "name": "X-TQ-CLIENT-ID",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "The API client ID for authentication."
                    },
                    {
                        "name": "X-TQ-SECRET",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "The API client secret for authentication."
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "orgId": {
                                        "type": "string",
                                        "description": "The unique identifier of the organization."
                                    },
                                    "roomIdList": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "description": "List of room IDs to look up."
                                    }
                                },
                                "required": [
                                    "orgId",
                                    "roomIdList"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Lookup completed (individual rooms may still be not found)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "orgId": {
                                            "type": "string",
                                            "description": "The unique identifier of the organization."
                                        },
                                        "roomById": {
                                            "type": "object",
                                            "additionalProperties": {
                                                "type": "object",
                                                "properties": {
                                                    "success": {
                                                        "type": "boolean",
                                                        "description": "Whether the room was found."
                                                    },
                                                    "reason": {
                                                        "type": "string",
                                                        "description": "Machine-readable result code."
                                                    },
                                                    "model": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "roomId": {
                                                                "type": "string",
                                                                "description": "The unique identifier of the room."
                                                            },
                                                            "mtime": {
                                                                "type": "integer",
                                                                "description": "Last modification time of the room (milliseconds since epoch)."
                                                            },
                                                            "order": {
                                                                "type": "integer",
                                                                "description": "Sort key for ordering rooms in the UI."
                                                            },
                                                            "name": {
                                                                "$schema": "http://json-schema.org/draft-04/schema",
                                                                "type": "object",
                                                                "properties": {
                                                                    "DE_DE": {
                                                                        "type": "string"
                                                                    },
                                                                    "EN_US": {
                                                                        "type": "string"
                                                                    },
                                                                    "FR_FR": {
                                                                        "type": "string"
                                                                    },
                                                                    "ES_ES": {
                                                                        "type": "string"
                                                                    },
                                                                    "PT_PT": {
                                                                        "type": "string"
                                                                    },
                                                                    "ZH_CN": {
                                                                        "type": "string"
                                                                    },
                                                                    "UK_UA": {
                                                                        "type": "string"
                                                                    },
                                                                    "AR_EG": {
                                                                        "type": "string"
                                                                    },
                                                                    "RU_RU": {
                                                                        "type": "string"
                                                                    },
                                                                    "FA_IR": {
                                                                        "type": "string"
                                                                    },
                                                                    "NL_NL": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "additionalProperties": false,
                                                                "description": "Internal name of the room."
                                                            },
                                                            "pubName": {
                                                                "$schema": "http://json-schema.org/draft-04/schema",
                                                                "type": "object",
                                                                "properties": {
                                                                    "DE_DE": {
                                                                        "type": "string"
                                                                    },
                                                                    "EN_US": {
                                                                        "type": "string"
                                                                    },
                                                                    "FR_FR": {
                                                                        "type": "string"
                                                                    },
                                                                    "ES_ES": {
                                                                        "type": "string"
                                                                    },
                                                                    "PT_PT": {
                                                                        "type": "string"
                                                                    },
                                                                    "ZH_CN": {
                                                                        "type": "string"
                                                                    },
                                                                    "UK_UA": {
                                                                        "type": "string"
                                                                    },
                                                                    "AR_EG": {
                                                                        "type": "string"
                                                                    },
                                                                    "RU_RU": {
                                                                        "type": "string"
                                                                    },
                                                                    "FA_IR": {
                                                                        "type": "string"
                                                                    },
                                                                    "NL_NL": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "additionalProperties": false,
                                                                "description": "Public-facing name of the room shown to participants."
                                                            },
                                                            "color": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ],
                                                                "description": "HTML color code for the room."
                                                            },
                                                            "capacity": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ],
                                                                "description": "Maximum occupancy of the room."
                                                            },
                                                            "extId": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ],
                                                                "description": "Optional external identifier."
                                                            }
                                                        },
                                                        "required": [
                                                            "roomId",
                                                            "mtime",
                                                            "order",
                                                            "name",
                                                            "pubName"
                                                        ],
                                                        "description": "The room data, or null if not found."
                                                    }
                                                },
                                                "required": [
                                                    "success",
                                                    "reason",
                                                    "model"
                                                ]
                                            },
                                            "description": "Map from room ID to its result."
                                        }
                                    },
                                    "required": [
                                        "orgId",
                                        "roomById"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request (e.g., missing or invalid fields)"
                    },
                    "403": {
                        "description": "Forbidden"
                    },
                    "404": {
                        "description": "Organization not found"
                    }
                }
            }
        },
        "/api/v1/room/list": {
            "post": {
                "summary": "List rooms in an organization",
                "description": "Returns all rooms in the organization.",
                "parameters": [
                    {
                        "name": "X-TQ-CLIENT-ID",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "The API client ID for authentication."
                    },
                    {
                        "name": "X-TQ-SECRET",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "The API client secret for authentication."
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "orgId": {
                                        "type": "string",
                                        "description": "The unique identifier of the organization."
                                    }
                                },
                                "required": [
                                    "orgId"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "List of rooms",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "orgId": {
                                            "type": "string",
                                            "description": "The unique identifier of the organization."
                                        },
                                        "rooms": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "roomId": {
                                                        "type": "string",
                                                        "description": "The unique identifier of the room."
                                                    },
                                                    "mtime": {
                                                        "type": "integer",
                                                        "description": "Last modification time of the room (milliseconds since epoch)."
                                                    },
                                                    "order": {
                                                        "type": "integer",
                                                        "description": "Sort key for ordering rooms in the UI."
                                                    },
                                                    "name": {
                                                        "$schema": "http://json-schema.org/draft-04/schema",
                                                        "type": "object",
                                                        "properties": {
                                                            "DE_DE": {
                                                                "type": "string"
                                                            },
                                                            "EN_US": {
                                                                "type": "string"
                                                            },
                                                            "FR_FR": {
                                                                "type": "string"
                                                            },
                                                            "ES_ES": {
                                                                "type": "string"
                                                            },
                                                            "PT_PT": {
                                                                "type": "string"
                                                            },
                                                            "ZH_CN": {
                                                                "type": "string"
                                                            },
                                                            "UK_UA": {
                                                                "type": "string"
                                                            },
                                                            "AR_EG": {
                                                                "type": "string"
                                                            },
                                                            "RU_RU": {
                                                                "type": "string"
                                                            },
                                                            "FA_IR": {
                                                                "type": "string"
                                                            },
                                                            "NL_NL": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "additionalProperties": false,
                                                        "description": "Internal name of the room."
                                                    },
                                                    "pubName": {
                                                        "$schema": "http://json-schema.org/draft-04/schema",
                                                        "type": "object",
                                                        "properties": {
                                                            "DE_DE": {
                                                                "type": "string"
                                                            },
                                                            "EN_US": {
                                                                "type": "string"
                                                            },
                                                            "FR_FR": {
                                                                "type": "string"
                                                            },
                                                            "ES_ES": {
                                                                "type": "string"
                                                            },
                                                            "PT_PT": {
                                                                "type": "string"
                                                            },
                                                            "ZH_CN": {
                                                                "type": "string"
                                                            },
                                                            "UK_UA": {
                                                                "type": "string"
                                                            },
                                                            "AR_EG": {
                                                                "type": "string"
                                                            },
                                                            "RU_RU": {
                                                                "type": "string"
                                                            },
                                                            "FA_IR": {
                                                                "type": "string"
                                                            },
                                                            "NL_NL": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "additionalProperties": false,
                                                        "description": "Public-facing name of the room shown to participants."
                                                    },
                                                    "color": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "description": "HTML color code for the room."
                                                    },
                                                    "capacity": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ],
                                                        "description": "Maximum occupancy of the room."
                                                    },
                                                    "extId": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "description": "Optional external identifier."
                                                    }
                                                },
                                                "required": [
                                                    "roomId",
                                                    "mtime",
                                                    "order",
                                                    "name",
                                                    "pubName"
                                                ]
                                            },
                                            "description": "All rooms in the organization."
                                        }
                                    },
                                    "required": [
                                        "orgId",
                                        "rooms"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request (e.g., missing or invalid fields)"
                    },
                    "403": {
                        "description": "Forbidden"
                    },
                    "404": {
                        "description": "Organization not found"
                    }
                }
            }
        }
    },
    "openapi": "3.0.3"
}