{
  "openapi": "3.1.0",
  "info": {
    "title": "elide.dev website API",
    "version": "1.0.0",
    "summary": "Newsletter signup, enterprise contact, and site consent endpoints for elide.dev.",
    "description": "Small public API behind the elide.dev marketing site. It is not the Elide runtime itself: to install or use Elide, see https://elide.dev/llms.txt and the documentation at https://elide.help. All errors use RFC 9457 problem+json with a stable `code`.",
    "contact": {
      "name": "Elide Technologies, Inc.",
      "email": "support@elide.dev",
      "url": "https://elide.dev"
    },
    "termsOfService": "https://elide.dev/legal/terms"
  },
  "servers": [
    {
      "url": "https://elide.dev"
    }
  ],
  "externalDocs": {
    "description": "Elide documentation",
    "url": "https://elide.help"
  },
  "paths": {
    "/api/subscribe": {
      "post": {
        "operationId": "subscribeToNewsletter",
        "summary": "Subscribe an email address to the Elide newsletter",
        "description": "Adds the address to the Elide release and product-updates newsletter. Idempotent: subscribing an address that is already on the list also returns ok.",
        "tags": [
          "newsletter"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "Subscriber email address."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Malformed body (`invalid_request`) or invalid email (`validation_failed`).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "Server misconfigured (`server_misconfigured`).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "502": {
            "description": "Newsletter provider error (`upstream_error`); retry later.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/contact-sales": {
      "post": {
        "operationId": "contactSales",
        "summary": "Send an enterprise sales inquiry",
        "description": "Submits an enterprise contact request (priority support, license management, custom integrations). The Elide team replies within one business day.",
        "tags": [
          "enterprise"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "email",
                  "company",
                  "job_title"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Full name."
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "Work email address."
                  },
                  "company": {
                    "type": "string",
                    "description": "Company name."
                  },
                  "job_title": {
                    "type": "string",
                    "description": "Job title."
                  },
                  "team_size": {
                    "type": "string",
                    "description": "Approximate team size, e.g. \"11-50\"."
                  },
                  "use_case": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Use cases of interest."
                  },
                  "other_detail": {
                    "type": "string",
                    "description": "Free-text detail for an \"other\" use case."
                  },
                  "notes": {
                    "type": "string",
                    "description": "Anything else the team should know."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Malformed body (`invalid_request`) or a missing/invalid field (`validation_failed`).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "500": {
            "description": "Server misconfigured (`server_misconfigured`).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "502": {
            "description": "Upstream CRM error (`upstream_error`); retry later.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/consent": {
      "get": {
        "operationId": "getConsentStatus",
        "summary": "Get the privacy jurisdiction and stored cookie consent for the caller",
        "tags": [
          "consent"
        ],
        "responses": {
          "200": {
            "description": "Consent requirements for the caller's location, plus any stored choice.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentStatus"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "setConsent",
        "summary": "Store the caller's cookie consent choice",
        "description": "Sets the `elide_consent` cookie (about 13 months).",
        "tags": [
          "consent"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "analytics": {
                    "type": "boolean",
                    "description": "Allow analytics cookies."
                  },
                  "advertising": {
                    "type": "boolean",
                    "description": "Allow advertising cookies."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Unsupported method (`method_not_allowed`).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/live-status": {
      "get": {
        "operationId": "getLiveStreamStatus",
        "summary": "Check whether an Elide live stream is currently on air",
        "tags": [
          "media"
        ],
        "responses": {
          "200": {
            "description": "Current live-stream state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "isStreaming"
                  ],
                  "properties": {
                    "isStreaming": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "description": "RFC 9457 problem details.",
        "required": [
          "type",
          "title",
          "status",
          "code",
          "detail"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "code": {
            "type": "string",
            "enum": [
              "invalid_request",
              "validation_failed",
              "not_found",
              "method_not_allowed",
              "payload_too_large",
              "forbidden",
              "upstream_error",
              "server_misconfigured"
            ]
          },
          "detail": {
            "type": "string"
          },
          "hint": {
            "type": "string",
            "description": "How to resolve the error."
          },
          "error": {
            "type": "string",
            "description": "Same as `detail` (kept for older clients)."
          }
        }
      },
      "ConsentStatus": {
        "type": "object",
        "required": [
          "required",
          "jurisdiction",
          "country",
          "scrollConsent",
          "consent"
        ],
        "properties": {
          "required": {
            "type": "boolean",
            "description": "Whether consent is required before advertising cookies."
          },
          "jurisdiction": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "gdpr",
              "ccpa",
              "lgpd",
              null
            ]
          },
          "country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code, or empty when unknown."
          },
          "scrollConsent": {
            "type": "boolean"
          },
          "consent": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "analytics": {
                "type": "boolean"
              },
              "advertising": {
                "type": "boolean"
              },
              "jurisdiction": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "ts": {
                "type": "integer",
                "description": "Unix epoch milliseconds."
              }
            }
          }
        }
      }
    }
  }
}