{
 "openapi": "3.1.0",
 "info": {
  "title": "OpenAdManager public website endpoints",
  "version": "1.0.0",
  "summary": "The few public HTTP endpoints of openadmanager.com. Ad management is not a REST API: AI apps use the MCP server.",
  "description": "OpenAdManager does not offer a REST API for ads. Everything runs through the OpenAdManager MCP server at https://mcp.openadmanager.com/mcp (Streamable HTTP, OAuth 2.1). Docs: https://openadmanager.com/docs/mcp (reference) and https://openadmanager.com/docs/api (API and MCP overview).\n\nThere is no OpenAdManager command-line tool. In a terminal, use the OpenAdManager MCP server from an MCP-capable command-line AI tool: Claude Code (https://openadmanager.com/docs/ai/claude-code), Codex (https://openadmanager.com/docs/ai/codex), Gemini CLI (https://openadmanager.com/docs/ai/gemini-cli).\n\nScripts and automation use a personal token with the same MCP server: https://openadmanager.com/docs/automation.\n\nThis file describes two of the public website endpoints, below.\n\nVersioning: ad management is not a versioned REST API. The MCP protocol version is negotiated when a client connects, as the MCP specification describes. The paths below carry no version prefix and the server sends no Deprecation or Sunset headers. info.version labels this description.",
  "contact": {
   "name": "CloudWish LLC",
   "email": "support@openadmanager.com",
   "url": "https://openadmanager.com/contact"
  },
  "termsOfService": "https://openadmanager.com/terms"
 },
 "externalDocs": {
  "description": "MCP server reference: scopes, errors, limits, tools and skills",
  "url": "https://openadmanager.com/docs/mcp"
 },
 "x-mcp": {
  "url": "https://mcp.openadmanager.com/mcp",
  "transport": "streamable-http",
  "protectedResourceMetadata": "https://mcp.openadmanager.com/.well-known/oauth-protected-resource"
 },
 "servers": [
  {
   "url": "https://app.openadmanager.com"
  },
  {
   "url": "https://openadmanager.com"
  }
 ],
 "paths": {
  "/api/public/site-config": {
   "servers": [
    {
     "url": "https://app.openadmanager.com"
    }
   ],
   "get": {
    "operationId": "getSiteConfig",
    "summary": "Public plans, prices, limits and flags",
    "description": "What the website bakes in at build time. Cached for 60 seconds. Rate limit: 60 requests per 60 seconds per IP, reported in the RateLimit-Policy, RateLimit and X-RateLimit-* response headers.",
    "responses": {
     "200": {
      "description": "Site configuration",
      "headers": {
       "X-RateLimit-Limit": {
        "description": "Requests allowed in the window.",
        "schema": {
         "type": "integer"
        }
       },
       "X-RateLimit-Remaining": {
        "description": "Requests left in the window.",
        "schema": {
         "type": "integer"
        }
       },
       "RateLimit-Policy": {
        "description": "Quota policy (IETF draft-ietf-httpapi-ratelimit-headers): q is the requests allowed, w the window in seconds.",
        "schema": {
         "type": "string"
        },
        "example": "\"default\";q=60;w=60"
       },
       "RateLimit": {
        "description": "Current state (same draft): r is the requests left, t the seconds until the window resets.",
        "schema": {
         "type": "string"
        },
        "example": "\"default\";r=59;t=60"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/SiteConfig"
        }
       }
      }
     },
     "429": {
      "description": "Too many requests. Wait for Retry-After seconds.",
      "headers": {
       "Retry-After": {
        "schema": {
         "type": "integer"
        }
       },
       "X-RateLimit-Limit": {
        "description": "Requests allowed in the window.",
        "schema": {
         "type": "integer"
        }
       },
       "X-RateLimit-Remaining": {
        "description": "Requests left in the window.",
        "schema": {
         "type": "integer"
        }
       },
       "RateLimit-Policy": {
        "description": "Quota policy (IETF draft-ietf-httpapi-ratelimit-headers): q is the requests allowed, w the window in seconds.",
        "schema": {
         "type": "string"
        },
        "example": "\"default\";q=60;w=60"
       },
       "RateLimit": {
        "description": "Current state (same draft): r is the requests left, t the seconds until the window resets.",
        "schema": {
         "type": "string"
        },
        "example": "\"default\";r=59;t=60"
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "500": {
      "description": "Server error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/api/web/waitlist": {
   "post": {
    "operationId": "joinWaitlist",
    "summary": "Ask to be told when a plan opens",
    "description": "Used by the Agency Plus interest form. One row per email and topic. Rate limit: 10 requests per 60 seconds per IP.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WaitlistRequest"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Saved",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "required": [
          "ok"
         ],
         "properties": {
          "ok": {
           "const": true
          }
         }
        }
       }
      }
     },
     "422": {
      "description": "Some fields are not valid. The body has error and errors by field.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Too many requests. Wait for Retry-After seconds.",
      "headers": {
       "Retry-After": {
        "schema": {
         "type": "integer"
        }
       },
       "X-RateLimit-Limit": {
        "description": "Requests allowed in the window.",
        "schema": {
         "type": "integer"
        }
       },
       "X-RateLimit-Remaining": {
        "description": "Requests left in the window.",
        "schema": {
         "type": "integer"
        }
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "500": {
      "description": "Server error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "securitySchemes": {
   "mcpOAuth": {
    "type": "oauth2",
    "description": "Used by the MCP server only, not by the endpoints above.",
    "flows": {
     "authorizationCode": {
      "authorizationUrl": "https://app.openadmanager.com/oauth/authorize",
      "tokenUrl": "https://app.openadmanager.com/oauth/token",
      "scopes": {
       "oam:read": "Read ad accounts and reports",
       "oam:write": "Make changes. What changes is set in your AI permissions.",
       "oam:spend": "Money changes (turn ads on, raise budgets, delete). Follows your AI permissions; not asked on sign-in.",
       "oam:customer_data": "Read customer lists and contact details (personal data)"
      }
     }
    }
   }
  },
  "schemas": {
   "Error": {
    "type": "object",
    "required": [
     "error"
    ],
    "properties": {
     "error": {
      "type": "object",
      "required": [
       "code",
       "message"
      ],
      "properties": {
       "code": {
        "type": "string",
        "enum": [
         "bad_request",
         "unauthenticated",
         "forbidden",
         "not_found",
         "method_not_allowed",
         "gone",
         "payload_too_large",
         "validation_failed",
         "rate_limited",
         "server_error",
         "unavailable"
        ]
       },
       "message": {
        "type": "string"
       },
       "hint": {
        "type": "string"
       },
       "docs": {
        "type": "string",
        "format": "uri"
       }
      }
     },
     "errors": {
      "type": "object",
      "additionalProperties": {
       "type": "array",
       "items": {
        "type": "string"
       }
      }
     },
     "reference": {
      "type": "string",
      "description": "Quote this when you write to support about a server error."
     }
    }
   },
   "WaitlistRequest": {
    "type": "object",
    "required": [
     "email",
     "topic"
    ],
    "properties": {
     "email": {
      "type": "string",
      "format": "email",
      "maxLength": 190
     },
     "topic": {
      "type": "string",
      "enum": [
       "managed",
       "agency_plus"
      ]
     },
     "spend": {
      "type": "string",
      "enum": [
       "lt_1000",
       "1000_2500",
       "2500_5000",
       "5000_10000",
       "10000_20000",
       "20000_30000",
       "gt_30000",
       "lt_3500",
       "3500_9000",
       "9000_18000",
       "18000_35000",
       "35000_70000",
       "70000_100000",
       "gt_100000",
       "lt_800",
       "800_2000",
       "2000_4000",
       "4000_10000",
       "lt_1500",
       "1500_5000",
       "5000_15000",
       "15000_30000"
      ]
     },
     "platforms": {
      "type": "string",
      "description": "One of the values the server accepts at runtime (for platforms: an ad platform key, or multi)."
     },
     "note": {
      "type": "string",
      "maxLength": 600
     }
    }
   },
   "SiteConfig": {
    "description": "Plans, prices, limits, flags and company details. Typed from the live response; a key that is null today is left untyped.",
    "type": "object",
    "properties": {
     "entity": {
      "type": "object",
      "properties": {
       "name": {
        "type": "string"
       },
       "address": {
        "type": "string"
       },
       "local": {
        "type": "string"
       },
       "support": {
        "type": "string"
       },
       "social": {
        "type": "object",
        "properties": {
         "facebook": {
          "type": "string"
         },
         "linkedin": {
          "type": "string"
         },
         "x": {
          "type": "string"
         },
         "youtube": {
          "type": "string"
         }
        }
       }
      }
     },
     "urls": {
      "type": "object",
      "properties": {
       "site": {
        "type": "string"
       },
       "app": {
        "type": "string"
       },
       "mcp": {
        "type": "string"
       },
       "status": {}
      }
     },
     "registration_open": {
      "type": "boolean"
     },
     "managed_sales": {
      "type": "boolean"
     },
     "tracking_sales": {
      "type": "boolean"
     },
     "flags": {
      "type": "object",
      "properties": {
       "google": {
        "type": "object",
        "properties": {
         "enabled": {
          "type": "boolean"
         },
         "writes": {
          "type": "boolean"
         }
        }
       },
       "higgsfield": {
        "type": "object",
        "properties": {
         "enabled": {
          "type": "boolean"
         }
        }
       },
       "status": {
        "type": "object",
        "properties": {
         "public": {
          "type": "boolean"
         }
        }
       },
       "meta": {
        "type": "object",
        "properties": {
         "enabled": {
          "type": "boolean"
         }
        }
       },
       "tiktok": {
        "type": "object",
        "properties": {
         "enabled": {
          "type": "boolean"
         }
        }
       },
       "linkedin": {
        "type": "object",
        "properties": {
         "enabled": {
          "type": "boolean"
         },
         "writes": {
          "type": "boolean"
         }
        }
       },
       "reddit": {
        "type": "object",
        "properties": {
         "enabled": {
          "type": "boolean"
         },
         "writes": {
          "type": "boolean"
         }
        }
       },
       "x": {
        "type": "object",
        "properties": {
         "enabled": {
          "type": "boolean"
         },
         "writes": {
          "type": "boolean"
         }
        }
       },
       "packs": {
        "type": "object",
        "properties": {
         "enabled": {
          "type": "boolean"
         }
        }
       },
       "leads_meta": {
        "type": "object",
        "properties": {
         "enabled": {
          "type": "boolean"
         }
        }
       }
      }
     },
     "currency": {
      "type": "string"
     },
     "billing": {
      "type": "object",
      "properties": {
       "annual_off": {
        "type": "integer"
       },
       "monthly_auto_off": {
        "type": "integer"
       },
       "monthly_auto_off_scope": {
        "type": "string"
       },
       "annual_off_scope": {
        "type": "string"
       },
       "quarterly_off": {
        "type": "integer"
       },
       "semiannual_off": {
        "type": "integer"
       },
       "quarterly_enabled": {
        "type": "boolean"
       }
      }
     },
     "backup_retention_days": {
      "type": "integer"
     },
     "deletion_job_hours": {
      "type": "integer"
     },
     "audit_retention_months": {
      "type": "integer"
     },
     "deletion_cancel_hours": {
      "type": "integer"
     },
     "token_days": {
      "type": "array",
      "items": {
       "type": "integer"
      }
     },
     "token_default_days": {
      "type": "integer"
     },
     "plans": {
      "type": "array",
      "items": {}
     },
     "plan_help": {
      "type": "object",
      "properties": {
       "fit": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {}
        }
       },
       "fit_free": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {}
        }
       },
       "mcp": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {
          "type": "string"
         }
        }
       },
       "accounts": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {}
        }
       },
       "unified": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {
          "type": "string"
         }
        }
       },
       "leads": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {
          "type": "string"
         }
        }
       },
       "changes_off": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {}
        }
       },
       "team": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {
          "type": "string"
         }
        }
       },
       "workspaces": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {
          "type": "string"
         }
        }
       },
       "ai": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {}
        }
       },
       "history": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {}
        }
       },
       "audit": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {}
        }
       },
       "tracking": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {}
        }
       },
       "tiktok_calls": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {}
        }
       },
       "trk_first": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {}
        }
       },
       "trk_extra": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {
          "type": "string"
         }
        }
       },
       "trk_events": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {}
        }
       },
       "trk_setup": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {}
        }
       },
       "trk_managed": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {}
        }
       },
       "trk_b_must": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {
          "type": "string"
         }
        }
       },
       "trk_b_easy": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {
          "type": "string"
         }
        }
       },
       "trk_b_setup": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {
          "type": "string"
         }
        }
       },
       "trk_b_managed": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {
          "type": "string"
         }
        }
       },
       "trk_b_accurate": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {
          "type": "string"
         }
        }
       },
       "trk_b_catch": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {
          "type": "string"
         }
        }
       },
       "trk_b_roas": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {
          "type": "string"
         }
        }
       },
       "trk_b_seamless": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {
          "type": "string"
         }
        }
       },
       "trk_b_events": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {
          "type": "string"
         }
        }
       },
       "trk_b_ai": {
        "type": "object",
        "properties": {
         "title": {
          "type": "string"
         },
         "body": {
          "type": "string"
         },
         "example": {
          "type": "string"
         }
        }
       }
      }
     },
     "packs": {
      "type": "array"
     },
     "managed": {
      "type": "object",
      "properties": {
       "name": {
        "type": "string"
       },
       "tagline": {
        "type": "string"
       },
       "cta": {
        "type": "string"
       },
       "on_sale": {
        "type": "boolean"
       },
       "billing_options": {
        "type": "array",
        "items": {
         "type": "string"
        }
       },
       "yearly_off": {
        "type": "integer"
       },
       "proof_line": {
        "type": "string"
       },
       "proof": {
        "type": "object",
        "properties": {
         "spend": {
          "type": "string"
         },
         "roas": {
          "type": "string"
         },
         "line": {
          "type": "string"
         },
         "note": {
          "type": "string"
         }
        }
       },
       "whatsapp_number": {
        "type": "string"
       },
       "whatsapp_message_he": {
        "type": "string"
       },
       "whatsapp_message_he_generic": {
        "type": "string"
       },
       "whatsapp_message_he_custom": {
        "type": "string"
       },
       "he_proof": {
        "type": "object",
        "properties": {
         "spend": {
          "type": "string"
         },
         "customers": {
          "type": "string"
         }
        }
       },
       "rules": {
        "type": "object",
        "properties": {
         "upgrade_at_pct": {
          "type": "integer"
         }
        }
       },
       "currencies": {
        "type": "object",
        "properties": {
         "USD": {
          "type": "object"
         },
         "ILS": {
          "type": "object"
         }
        }
       }
      }
     },
     "tracking": {
      "type": "object",
      "properties": {
       "currencies": {
        "type": "object",
        "properties": {
         "USD": {
          "type": "object"
         },
         "ILS": {
          "type": "object"
         }
        }
       },
       "cta": {
        "type": "string"
       }
      }
     },
     "ai_clients": {
      "type": "object",
      "properties": {
       "nav_label": {
        "type": "string"
       },
       "mcp_url": {
        "type": "string"
       },
       "other_clients": {
        "type": "array",
        "items": {
         "type": "string"
        }
       },
       "apps": {
        "type": "array",
        "items": {
         "type": "object"
        }
       }
      }
     },
     "rec_model": {
      "type": "object",
      "properties": {
       "enabled": {
        "type": "boolean"
       },
       "name": {
        "type": "string"
       },
       "maker": {
        "type": "string"
       },
       "why": {
        "type": "array",
        "items": {
         "type": "object"
        }
       },
       "uses": {
        "type": "array",
        "items": {
         "type": "object"
        }
       },
       "apps": {
        "type": "array",
        "items": {
         "type": "string"
        }
       },
       "video_tip": {
        "type": "boolean"
       },
       "version": {
        "type": "string"
       },
       "updated_at": {}
      }
     },
     "hubs": {
      "type": "object",
      "properties": {
       "pages": {
        "type": "array"
       },
       "items": {
        "type": "integer"
       }
      }
     },
     "meta": {
      "type": "object",
      "properties": {
       "contract": {
        "type": "string"
       },
       "generated_at": {
        "type": "string"
       },
       "hash": {
        "type": "string"
       },
       "source": {
        "type": "string"
       },
       "fetched_from": {
        "type": "string"
       },
       "fetched_at": {
        "type": "string"
       }
      }
     }
    }
   }
  }
 }
}
