{
  "openapi": "3.1.0",
  "info": {
    "title": "RankYa WordPress API",
    "description": "API for searching and retrieving RankYa's technical SEO guides, tutorials, WordPress optimization articles, and submitting project inquiries.",
    "version": "1.1.0",
    "contact": {
      "name": "RankYa",
      "url": "https://www.rankya.com"
    }
  },
  "servers": [
    {
      "url": "https://www.rankya.com/wp-json",
      "description": "RankYa WordPress REST API Root"
    }
  ],
  "paths": {
    "/wp/v2/search": {
      "get": {
        "summary": "Search RankYa Content",
        "description": "Searches published tutorials, technical SEO guides, and WordPress/Shopify optimization articles.",
        "operationId": "searchSite",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "description": "The keyword or phrase to search for.",
            "required": true,
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful search results array.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": { "type": "object" }
                }
              }
            }
          }
        }
      }
    },
    "/wp/v2/posts": {
      "get": {
        "summary": "Get Published Posts Feed",
        "description": "Retrieves the latest technical articles and tutorials.",
        "operationId": "getPosts",
        "parameters": [
          {
            "name": "_fields",
            "in": "query",
            "description": "Comma-separated list of fields to include in the response to optimize payload size.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "id,date,title,link,excerpt"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of recent blog posts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": { "type": "object" }
                }
              }
            }
          }
        }
      }
    },
    "/rankya/v1/contact": {
      "post": {
        "summary": "Submit Contact Inquiry",
        "description": "Submit a website audit, review, optimization request, or project scope to RankYa.",
        "operationId": "submit_contact_inquiry",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "your-name": {
                    "type": "string",
                    "description": "Full name of the person or business representative"
                  },
                  "your-email": {
                    "type": "string",
                    "description": "Valid return email address for response and quote"
                  },
                  "your-site": {
                    "type": "string",
                    "description": "The website domain or URL that requires optimization, audit, or review"
                  },
                  "service-type": {
					"type": "string",
					"description": "Category of service requested. You must select the most appropriate option from the list.",
					"enum": [
					"Expert SEO Optimization",
					"Agentic Optimization",
					"Live Video Consultation",
					"Google related",
					"Other Inquiry"
					]
				  },
                  "your-message": {
                    "type": "string",
                    "description": "Detailed description of the specific website issue, questions, or project scope"
                  }
                },
                "required": ["your-name", "your-email", "service-type", "your-message"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful submission.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string" },
                    "message": { "type": "string" }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error or missing fields."
          }
        }
      }
    }
  }
}