{
    "openapi": "3.1.0",
    "info": {
        "title": "MSW AI Exchange Public Directory API",
        "version": "1.0.0",
        "description": "Read-only public API for approved organizations. No private Telegram, client data, or credential access. MCP endpoint is separately documented."
    },
    "servers": [
        {
            "url": "https://mobilny-serwis-warszawa.pl/wp-json"
        }
    ],
    "paths": {
        "/msw-ai-exchange/v1/directory": {
            "get": {
                "operationId": "searchMswExchangeProfiles",
                "summary": "Search approved organization profiles",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 120
                        }
                    },
                    {
                        "name": "category",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 50
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Public approved data, application/json",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/msw-ai-exchange/v1/profile/{slug}": {
            "get": {
                "operationId": "getMswExchangeProfile",
                "summary": "Get a single approved profile",
                "parameters": [
                    {
                        "name": "slug",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^[a-z0-9-]+$"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Public approved data, application/json",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Unapproved or unknown profile"
                    }
                }
            }
        },
        "/msw-ai-exchange-io/v1/manifest": {
            "get": {
                "operationId": "getMswInteropManifest",
                "summary": "Discover 50 file formats and templates",
                "responses": {
                    "200": {
                        "description": "Public approved data, application/json",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/msw-ai-exchange-io/v1/health": {
            "get": {
                "operationId": "getMswInteropHealth",
                "summary": "Read public plugin readiness",
                "responses": {
                    "200": {
                        "description": "Public approved data, application/json",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Profile": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "$id": "https://mobilny-serwis-warszawa.pl/ai-exchange/io/api/profile.schema.json",
                "title": "MSW AI Exchange Public Profile",
                "type": "object",
                "description": "Public information, only for approved profiles. Contact email is intentionally excluded.",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "website": {
                        "type": "string"
                    },
                    "category": {
                        "type": "string"
                    },
                    "category_label": {
                        "type": "string"
                    },
                    "region": {
                        "type": "string"
                    },
                    "services": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "phone": {
                        "type": "string"
                    },
                    "profile_url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "training_opt_in": {
                        "type": "boolean"
                    },
                    "attribution_requested": {
                        "type": "boolean"
                    },
                    "domain_verified": {
                        "type": "boolean"
                    },
                    "last_modified": {
                        "type": "string"
                    },
                    "source_type": {
                        "type": "string"
                    }
                },
                "required": [
                    "slug",
                    "name",
                    "description",
                    "website",
                    "services",
                    "profile_url",
                    "domain_verified",
                    "training_opt_in"
                ],
                "additionalProperties": true
            },
            "Directory": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "$id": "https://mobilny-serwis-warszawa.pl/ai-exchange/io/api/directory.schema.json",
                "title": "MSW AI Exchange Directory API",
                "type": "object",
                "properties": {
                    "items": {
                        "type": "array",
                        "items": {
                            "$ref": "https://mobilny-serwis-warszawa.pl/ai-exchange/io/api/profile.schema.json"
                        }
                    },
                    "total": {
                        "type": "integer"
                    },
                    "page": {
                        "type": "integer"
                    },
                    "per_page": {
                        "type": "integer"
                    },
                    "total_pages": {
                        "type": "integer"
                    }
                },
                "required": [
                    "items",
                    "total",
                    "page",
                    "per_page",
                    "total_pages"
                ]
            }
        }
    },
    "externalDocs": {
        "description": "50 machine-readable public files, feed formats and read-only MCP",
        "url": "https://mobilny-serwis-warszawa.pl/ai-exchange/io/api/manifest.json"
    }
}