{"openapi":"3.1.0","info":{"title":"Pearl River Design Lead Intake API","version":"1.0.0","description":"Public lead-intake endpoints for Pearl River Design, a web design agency for contractors and local businesses in Rockland County, NY. These endpoints accept contact-form and onboarding submissions. No authentication is required. Versioning: the current API version is 1, returned on every response via the API-Version header. Breaking changes will ship as a new version; deprecated versions will be announced on https://pearlriverdesign.dev/developers with at least 90 days' notice and a Deprecation/Sunset response header during the transition window.","contact":{"name":"Jackson O'Hara","email":"jackson@pearlriverdesign.dev","url":"https://pearlriverdesign.dev/developers"}},"servers":[{"url":"https://pearlriverdesign.dev"}],"paths":{"/api/submit":{"post":{"operationId":"submitLead","summary":"Submit a contact-form lead","description":"Submits the homepage/niche-page contact form. Forwarded to the business owner's lead pipeline. Rate limited to 5 requests per 10 minutes per IP; RateLimit-* headers are returned on every response.","parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","business_name","business_type","phone","email"],"properties":{"name":{"type":"string","description":"Full name of the person submitting the lead."},"business_name":{"type":"string","description":"Name of the lead's business."},"business_type":{"type":"string","description":"Trade or business category.","enum":["Plumber","Electrician","Roofer","HVAC","Painter","Landscaper","Contractor (General)","Barbershop / Salon","Restaurant / Food","Retailer","Other"]},"phone":{"type":"string","description":"Callback phone number."},"email":{"type":"string","format":"email","description":"Contact email address."}}}}}},"responses":{"200":{"description":"Lead accepted and forwarded.","headers":{"API-Version":{"$ref":"#/components/headers/ApiVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"400":{"description":"Request body was not valid JSON.","headers":{"API-Version":{"$ref":"#/components/headers/ApiVersion"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded for this IP. See RateLimit-* and Retry-After headers.","headers":{"API-Version":{"$ref":"#/components/headers/ApiVersion"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server misconfiguration.","headers":{"API-Version":{"$ref":"#/components/headers/ApiVersion"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream webhook unreachable or returned an error.","headers":{"API-Version":{"$ref":"#/components/headers/ApiVersion"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/onboarding":{"post":{"operationId":"submitOnboarding","summary":"Submit the client onboarding intake form","description":"Submits the full onboarding intake form for a client whose site is being built. Triggers an email notification and forwards the submission to the deploy pipeline.","parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["businessName","ownerFirstName","phone","email"],"properties":{"businessName":{"type":"string"},"ownerFirstName":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string","format":"email"},"businessType":{"type":"string"},"businessLocation":{"type":"string"},"yearsInBusiness":{"type":"string"},"towns":{"type":"array","items":{"type":"string"}},"services":{"type":"array","items":{"type":"string"}},"notes":{"type":"string"},"reviews":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"name":{"type":"string"}}}},"logoUrl":{"type":"string","format":"uri"},"smsOptIn":{"type":"boolean","description":"Whether the client opted in to SMS updates."},"desired_domain":{"type":"string","description":"Domain the client wants registered."},"existing_domain":{"type":"string","description":"Domain the client already owns, if any."}}}}}},"responses":{"200":{"description":"Onboarding submission accepted and forwarded to the deploy pipeline. Response body mirrors the upstream deploy service's JSON response.","headers":{"API-Version":{"$ref":"#/components/headers/ApiVersion"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Request body was not valid JSON.","headers":{"API-Version":{"$ref":"#/components/headers/ApiVersion"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream deploy service unreachable.","headers":{"API-Version":{"$ref":"#/components/headers/ApiVersion"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/inquiry":{"post":{"operationId":"submitInquiry","summary":"Log a lead into the CRM","description":"Fire-and-forget duplicate of a contact-form submission, logged into the internal CRM for follow-up tracking. Accepts the same payload shape as /api/submit.","parameters":[{"$ref":"#/components/parameters/ApiVersion"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"business_name":{"type":"string"},"business_type":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string","format":"email"}}}}}},"responses":{"200":{"description":"Forwarded to the CRM; status mirrors the upstream response.","headers":{"API-Version":{"$ref":"#/components/headers/ApiVersion"}},"content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"400":{"description":"Request body was not valid JSON.","headers":{"API-Version":{"$ref":"#/components/headers/ApiVersion"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream CRM unreachable.","headers":{"API-Version":{"$ref":"#/components/headers/ApiVersion"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Machine-readable error identifier."},"message":{"type":"string","description":"Human-readable explanation of what went wrong."},"hint":{"type":"string","description":"Suggested next step to resolve the error."}}}}}},"parameters":{"ApiVersion":{"name":"API-Version","in":"header","required":false,"description":"Optional. Pins the request to a specific API version. Current version is 1; omitting this header uses the latest version. Reserved for future use once a v2 is published.","schema":{"type":"string","example":"1"}}},"headers":{"ApiVersion":{"description":"The API version that served this response.","schema":{"type":"string","example":"1"}}}}}