{
  "openapi": "3.1.0",
  "info": {
    "title": "SignalFoundry API — B2B Lead, Hiring & SaaS Pricing Intelligence API",
    "version": "1.0.0",
    "description": "Unified REST API for Clay, n8n, Make, and AI SDR workflows: enrich SMB domains with ad pixels & booking tech stacks, extract live ATS hiring/tech intent signals, and monitor competitor SaaS pricing diffs."
  },
  "servers": [
    {
      "url": "https://signal-suite-api.signalfoundry-labs.workers.dev"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    },
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/v1/enrich/domain": {
      "post": {
        "operationId": "enrichSmbDomain",
        "summary": "Enrich SMB domain(s) with ad pixels, booking stack, contacts & pitch angles",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string",
                    "description": "Single domain or URL"
                  },
                  "domains": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 10,
                    "description": "Batch of up to 10 domains"
                  },
                  "maxInternalPages": {
                    "type": "integer",
                    "default": 2,
                    "minimum": 0,
                    "maximum": 4
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Enriched domain signal payload"
          }
        }
      }
    },
    "/v1/signals/hiring": {
      "post": {
        "operationId": "getCompanyHiringSignals",
        "summary": "Extract live tech stack, salary & buying signals from Greenhouse, Lever, Ashby, or Workable",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "target"
                ],
                "properties": {
                  "target": {
                    "type": "string",
                    "example": "ashby:linear",
                    "description": "ATS board URL or shorthand (greenhouse:<slug>, lever:<slug>, ashby:<slug>, workable:<slug>)"
                  },
                  "keywords": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "techFilter": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "remoteOnly": {
                    "type": "boolean",
                    "default": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Company hiring summary and normalized job list"
          }
        }
      }
    },
    "/v1/monitor/pricing": {
      "post": {
        "operationId": "monitorSaasPricing",
        "summary": "Extract SaaS pricing tiers and compute plan-level diffs against saved or supplied snapshot",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "example": "https://linear.app/pricing"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Structured pricing snapshot and diff events"
          }
        }
      }
    },
    "/v1/audit/ai-readiness": {
      "post": {
        "operationId": "auditAiSearchReadiness",
        "summary": "Audit domain(s) for AI-search (GEO) readiness, AI crawler robots.txt rules, llms.txt & auto-generate suggested llms.txt",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "example": "https://cloudflare.com"
                  },
                  "urls": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 10
                  },
                  "generateDraft": {
                    "type": "boolean",
                    "default": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "AI SEO audit score, bot policies, pitch angles & suggested llms.txt"
          }
        }
      }
    },
    "/v1/audit/compliance": {
      "post": {
        "operationId": "auditCompanyCompliance",
        "summary": "Audit company website for SOC 2, ISO 27001, HIPAA certs, Trust Centers & security.txt",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string",
                    "description": "Company domain or website URL"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Compliance badges, Trust Center details, security.txt & compliance gaps"
          }
        }
      }
    },
    "/v1/validate/email": {
      "post": {
        "operationId": "validateEmailDeliverability",
        "summary": "Validate email syntax, check 5,000+ disposable domains, verify Cloudflare DoH MX records, detect typos, and score deliverability",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "example": "alex@company.com"
                  },
                  "emails": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 20,
                    "description": "Batch of up to 20 emails"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Email deliverability, DoH MX records, and quality score payload"
          }
        }
      }
    },
    "/v1/account/usage": {
      "get": {
        "operationId": "getAccountUsage",
        "summary": "Inspect active API key status and remaining monthly credit quota",
        "responses": {
          "200": {
            "description": "Current billing period credit consumption"
          }
        }
      }
    }
  }
}