{
    "openapi": "3.1.0",
    "info": {
        "title": "I am Paula Agent Discovery API",
        "version": "1.1.0",
        "description": "Public SEO health, summary, markdown, freshness, and discovery endpoints exposed by NX SEO for AI agents and search assistants."
    },
    "servers": [
        {
            "url": "https://iampaula.eu/"
        }
    ],
    "paths": {
        "/wp-json/nx-seo/v1/agent-discovery/snapshot": {
            "get": {
                "operationId": "getSeoHealthSnapshot",
                "summary": "Get the versioned read-only SEO health snapshot",
                "responses": {
                    "200": {
                        "description": "SEO health and agent-readiness snapshot",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/HealthSnapshot"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Agent Discovery is disabled",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/wp-json/nx-seo/v1/llm/summaries": {
            "get": {
                "operationId": "listPublicSummaries",
                "summary": "List public content summaries",
                "responses": {
                    "200": {
                        "description": "Summary collection",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Collection"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/wp-json/nx-seo/v1/llm/summaries/{id}": {
            "get": {
                "operationId": "getPublicSummary",
                "summary": "Get one public content summary",
                "responses": {
                    "200": {
                        "description": "Summary item",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Summary unavailable",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/wp-json/nx-seo/v1/agent-discovery/recent-updates": {
            "get": {
                "operationId": "listRecentUpdates",
                "summary": "List recently updated public content",
                "responses": {
                    "200": {
                        "description": "Recent updates payload",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/wp-json/nx-seo/v1/agent-discovery/manifest": {
            "get": {
                "operationId": "getAgentManifest",
                "summary": "Get the NX SEO agent manifest",
                "responses": {
                    "200": {
                        "description": "Manifest payload",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/wp-json/nx-seo/v1/agent-discovery/markdown/{id}": {
            "get": {
                "operationId": "getPostMarkdown",
                "summary": "Get post or page markdown export",
                "responses": {
                    "200": {
                        "description": "Markdown content",
                        "content": {
                            "text/markdown": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/wp-json/nx-seo/v1/agent-discovery/products": {
            "get": {
                "operationId": "searchWooCommerceProducts",
                "summary": "Search the public WooCommerce product catalog",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 200
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 50,
                            "default": 10
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Public product collection",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Collection"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/wp-json/nx-seo/v1/agent-discovery/products/{id}": {
            "get": {
                "operationId": "getWooCommerceProduct",
                "summary": "Get one public WooCommerce product",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Public product metadata",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Product unavailable"
                    }
                }
            }
        },
        "/": {
            "get": {
                "operationId": "getHomepageAgentView",
                "summary": "Get machine-readable homepage view",
                "responses": {
                    "200": {
                        "description": "Agent-mode homepage payload",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Object"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "HealthSnapshot": {
                "type": "object",
                "required": [
                    "snapshot_id",
                    "schema_version",
                    "generated_at",
                    "site",
                    "scores",
                    "status",
                    "metrics",
                    "issues",
                    "constraints",
                    "data_hash"
                ],
                "properties": {
                    "snapshot_id": {
                        "type": "string"
                    },
                    "schema_version": {
                        "type": "string",
                        "const": "1.0"
                    },
                    "generated_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "expires_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "site": {
                        "$ref": "#/components/schemas/Object"
                    },
                    "scores": {
                        "$ref": "#/components/schemas/Object"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "healthy",
                            "needs_attention",
                            "critical"
                        ]
                    },
                    "metrics": {
                        "$ref": "#/components/schemas/Object"
                    },
                    "issue_counts": {
                        "$ref": "#/components/schemas/Object"
                    },
                    "issues": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/HealthIssue"
                        }
                    },
                    "resources": {
                        "$ref": "#/components/schemas/Object"
                    },
                    "constraints": {
                        "$ref": "#/components/schemas/Object"
                    },
                    "data_hash": {
                        "type": "string",
                        "pattern": "^sha256:[a-f0-9]{64}$"
                    }
                }
            },
            "HealthIssue": {
                "type": "object",
                "required": [
                    "id",
                    "code",
                    "priority",
                    "title",
                    "evidence",
                    "recommendation",
                    "read_only"
                ],
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "code": {
                        "type": "string"
                    },
                    "priority": {
                        "type": "string",
                        "enum": [
                            "critical",
                            "high",
                            "medium",
                            "low"
                        ]
                    },
                    "title": {
                        "type": "string"
                    },
                    "evidence": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Object"
                        }
                    },
                    "recommendation": {
                        "type": "string"
                    },
                    "read_only": {
                        "type": "boolean",
                        "const": true
                    }
                }
            },
            "Object": {
                "type": "object",
                "additionalProperties": true
            },
            "Collection": {
                "type": "object",
                "additionalProperties": true
            },
            "ErrorResponse": {
                "type": "object",
                "properties": {
                    "error": {
                        "type": "string"
                    },
                    "hint": {
                        "type": "string"
                    }
                }
            }
        }
    }
}