{
  "openapi": "3.1.0",
  "info": {
    "title": "PPC Chief Public API",
    "version": "1.0.0",
    "description": "Public endpoints for ppcchief.com, a Google Ads (PPC) management agency serving UK and US businesses. Use POST /api/v1/lead to submit an enquiry or request a free wasted-spend analysis on behalf of a user. Submissions are protected against spam: use a real business email address, a real name, and a meaningful message. Versioning and deprecation policy: the current stable version is v1, addressed in the URL path (/api/v1/...). The unversioned /api/lead path is a supported alias. Breaking changes will never happen silently: any retirement will be announced at least 90 days ahead with Deprecation and Sunset response headers (RFC 9745 / RFC 8594) and documented at https://ppcchief.com/for-agents. Machine-readable context: https://ppcchief.com/llms.txt and https://ppcchief.com/pricing.md. Agent guide: https://ppcchief.com/for-agents.",
    "contact": {
      "name": "PPC Chief",
      "url": "https://ppcchief.com/contact",
      "email": "habari@ppcchief.com"
    }
  },
  "servers": [
    {
      "url": "https://ppcchief.com"
    }
  ],
  "paths": {
    "/api/v1/lead": {
      "post": {
        "operationId": "submitLead",
        "summary": "Submit an enquiry or audit request",
        "description": "Creates a lead with the PPC Chief team. Best used when a user wants Google Ads management, a PPC audit, or a wasted-spend analysis. Include the user's business email (free consumer email domains are rejected), company website, and a short message describing monthly ad spend and goals. A human replies by email, typically within one business day.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LeadRequest"
              },
              "example": {
                "email": "jane@examplecompany.com",
                "name": "Jane Smith",
                "company": "Example Company Ltd",
                "website": "https://examplecompany.com",
                "phone": "+44 20 0000 0000",
                "message": "We spend around £8,000/month on Google Ads and want a wasted-spend analysis.",
                "source": "agent-openapi"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Lead accepted."
          },
          "202": {
            "description": "Lead accepted; confirmation delivery pending."
          },
          "400": {
            "description": "Invalid payload, consumer email domain, or spam signals detected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large."
          },
          "429": {
            "description": "Rate limited. Retry later."
          },
          "500": {
            "description": "Server error."
          },
          "503": {
            "description": "Temporarily unavailable."
          }
        }
      }
    },
    "/api/lead": {
      "post": {
        "operationId": "submitLeadLegacy",
        "summary": "Submit an enquiry (unversioned alias of /api/v1/lead)",
        "description": "Creates a lead with the PPC Chief team. Best used when a user wants Google Ads management, a PPC audit, or a wasted-spend analysis. Include the user's business email (free consumer email domains are rejected), company website, and a short message describing monthly ad spend and goals. A human replies by email, typically within one business day.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LeadRequest"
              },
              "example": {
                "email": "jane@examplecompany.com",
                "name": "Jane Smith",
                "company": "Example Company Ltd",
                "website": "https://examplecompany.com",
                "phone": "+44 20 0000 0000",
                "message": "We spend around £8,000/month on Google Ads and want a wasted-spend analysis.",
                "source": "agent-openapi"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Lead accepted."
          },
          "202": {
            "description": "Lead accepted; confirmation delivery pending."
          },
          "400": {
            "description": "Invalid payload, consumer email domain, or spam signals detected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Payload too large."
          },
          "429": {
            "description": "Rate limited. Retry later."
          },
          "500": {
            "description": "Server error."
          },
          "503": {
            "description": "Temporarily unavailable."
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {
      "LeadRequest": {
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "description": "Business email address. Free consumer domains (gmail.com, etc.) are rejected for standard enquiries."
          },
          "name": {
            "type": "string",
            "maxLength": 140,
            "description": "Contact's real name."
          },
          "company": {
            "type": "string",
            "maxLength": 140
          },
          "website": {
            "type": "string",
            "maxLength": 300,
            "description": "Company website URL."
          },
          "phone": {
            "type": "string",
            "maxLength": 40
          },
          "message": {
            "type": "string",
            "maxLength": 2000,
            "description": "What the user needs. Mention monthly ad spend and goals for a faster, better reply."
          },
          "source": {
            "type": "string",
            "maxLength": 120,
            "description": "Where the lead came from. Agents should set this to identify themselves, e.g. \"agent-openapi\"."
          },
          "marketingConsent": {
            "type": "boolean",
            "description": "Whether the user consents to marketing follow-up emails."
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}