{
    "openapi": "3.1.0",
    "info": {
        "title": "Next Level Insurance Agency USA API",
        "version": "1.0.0",
        "description": "Official API and machine-readable endpoints for Next Level Insurance Agency USA. Supports agent discovery, plan guidance, and LLM function calling for Health Insurance (ACA/Obamacare), Medicare, and Life Insurance (IUL with Living Benefits)."
    },
    "servers": [
        {
            "url": "https://nextlevelagencyusa.com",
            "description": "Production Server"
        }
    ],
    "paths": {
        "/wp-json/wp/v2/pages": {
            "get": {
                "summary": "List Published Insurance Pages",
                "description": "Retrieves canonical informational pages detailing ACA Obamacare, Medicare, and Life Insurance services.",
                "operationId": "listPublishedPages",
                "parameters": [
                    {
                        "name": "slug",
                        "in": "query",
                        "required": false,
                        "description": "Filter by page slug (e.g. services-and-insurances-at-next-level-agency)",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of WordPress page objects with rendered content and metadata.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "integer"
                                            },
                                            "title": {
                                                "type": "object",
                                                "properties": {
                                                    "rendered": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "content": {
                                                "type": "object",
                                                "properties": {
                                                    "rendered": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "link": {
                                                "type": "string",
                                                "format": "uri"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/wp-json/wp/v2/posts": {
            "get": {
                "summary": "List Health & Life Insurance Articles",
                "description": "Returns educational articles covering Obamacare tax credits, Medicare enrollment deadlines, and IUL cash-value growth.",
                "operationId": "listInsuranceArticles",
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Maximum number of articles to return",
                        "schema": {
                            "type": "integer",
                            "default": 10
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of insurance blog posts.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "object"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/.well-known/agent.json": {
            "get": {
                "summary": "Retrieve Agency Machine Spec",
                "description": "Returns JSON specification of carrier appointments, founders, addresses, and available languages.",
                "operationId": "getAgentMetadata",
                "responses": {
                    "200": {
                        "description": "Complete agent schema declaration.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "ErrorResponse": {
                "type": "object",
                "properties": {
                    "error": {
                        "type": "string",
                        "example": "not_found"
                    },
                    "code": {
                        "type": "integer",
                        "example": 404
                    },
                    "message": {
                        "type": "string"
                    },
                    "resolution_hint": {
                        "type": "string"
                    },
                    "links": {
                        "type": "object"
                    }
                }
            }
        }
    }
}