{
  "openapi": "3.1.0",
  "info": {
    "title": "YoungNana public API",
    "version": "1.1.0",
    "summary": "Read-only facts about YoungNana, a pre-launch phone-help service for older adults and their families.",
    "description": "Open API: no key, no sign-in, no personal data. GET only. Every answer comes from the facts published on www.youngnana.com. YoungNana is not medical, nursing, home care, monitoring or an emergency service. Errors are JSON: {\"error\": {\"code\", \"message\", \"hint\", \"docs\"}}. Free: no key, no signup; read-only, so testing against production is safe (no sandbox needed). Rate limit: 60 requests per 60 seconds per client, best effort, with RateLimit-Policy and RateLimit headers; 429 with Retry-After when exceeded. Changelog: https://www.youngnana.com/developers/#changelog. Version policy: this is v1; breaking changes would go to /api/v2/ and v1 would be announced as deprecated on /developers/ first.",
    "contact": {
      "name": "YoungNana",
      "email": "hello@youngnana.com",
      "url": "https://www.youngnana.com/developers/"
    }
  },
  "servers": [
    {
      "url": "https://www.youngnana.com/api/v1"
    }
  ],
  "security": [],
  "paths": {
    "/service": {
      "get": {
        "operationId": "getServiceOverview",
        "summary": "What YoungNana does",
        "description": "What YoungNana helps with, who it is for, what it does not do, its pre-launch status and contact details.",
        "responses": {
          "200": {
            "description": "Service overview",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Overview"
                }
              }
            },
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/faq": {
      "get": {
        "operationId": "searchFaq",
        "summary": "Search questions and answers",
        "description": "Search the published questions and answers by keyword. Without q, returns all of them. Cursor pagination: pass next_cursor from one page as cursor for the next; next_cursor is null on the last page.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Words to look for, for example: cost, smartphone, medical.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Answers per page, 1 to 50. Default 20.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor: next_cursor from the previous page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching answers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FaqResult"
                }
              }
            },
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/pricing": {
      "get": {
        "operationId": "getPricing",
        "summary": "Founding price",
        "description": "The founding-family price and its terms. Nothing is charged during the pre-launch pilot.",
        "responses": {
          "200": {
            "description": "Price and terms",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pricing"
                }
              }
            },
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/contact": {
      "get": {
        "operationId": "getContactInfo",
        "summary": "Contact details",
        "description": "Phone number, phone hours, email and service area.",
        "responses": {
          "200": {
            "description": "Contact details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            },
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/signup": {
      "get": {
        "operationId": "getSignupSteps",
        "summary": "How to join the pilot",
        "description": "Steps and link for reserving a founding spot. A person must tick consent, pass the security check and submit the form themselves.",
        "responses": {
          "200": {
            "description": "Signup steps",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Signup"
                }
              }
            },
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/status": {
      "get": {
        "operationId": "getStatus",
        "summary": "API health and version",
        "description": "Returns ok when the API is up, with the current version and the latest changelog entry.",
        "responses": {
          "200": {
            "description": "Status",
            "headers": {
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "Error": {
        "description": "Error (400 bad parameter, 404 unknown endpoint, 405 not GET, 429 rate limited)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait (429 only).",
            "schema": {
              "type": "integer"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "hint"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "not_found",
                  "method_not_allowed",
                  "invalid_parameter",
                  "rate_limited"
                ],
                "description": "Machine-readable error code."
              },
              "message": {
                "type": "string",
                "description": "What went wrong."
              },
              "hint": {
                "type": "string",
                "description": "How to fix it."
              },
              "docs": {
                "type": "string",
                "format": "uri",
                "description": "Developer guide."
              }
            }
          }
        }
      },
      "Contact": {
        "type": "object",
        "required": [
          "phone",
          "phoneE164",
          "hours",
          "email",
          "area"
        ],
        "properties": {
          "phone": {
            "type": "string",
            "description": "Phone number as shown on the site."
          },
          "phoneE164": {
            "type": "string",
            "description": "Phone number in E.164 format."
          },
          "hours": {
            "type": "string",
            "description": "When the phone is answered."
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Contact email."
          },
          "area": {
            "type": "string",
            "description": "Service area."
          }
        }
      },
      "Overview": {
        "type": "object",
        "required": [
          "name",
          "url",
          "summary",
          "status",
          "audience",
          "services",
          "notOffered",
          "disclaimer",
          "contact"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Brand name."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Website."
          },
          "summary": {
            "type": "string",
            "description": "What YoungNana is."
          },
          "status": {
            "type": "string",
            "description": "Launch status."
          },
          "audience": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Who it is for."
          },
          "services": {
            "type": "array",
            "description": "What gets done.",
            "items": {
              "type": "object",
              "required": [
                "title",
                "description"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              }
            }
          },
          "notOffered": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What YoungNana does not do."
          },
          "disclaimer": {
            "type": "string",
            "description": "Legal disclaimer."
          },
          "contact": {
            "$ref": "#/components/schemas/Contact"
          }
        }
      },
      "FaqItem": {
        "type": "object",
        "required": [
          "question",
          "answer"
        ],
        "properties": {
          "question": {
            "type": "string"
          },
          "answer": {
            "type": "string"
          }
        }
      },
      "FaqResult": {
        "type": "object",
        "required": [
          "query",
          "total",
          "count",
          "items",
          "next_cursor"
        ],
        "properties": {
          "query": {
            "type": "string",
            "description": "The search words used."
          },
          "count": {
            "type": "integer",
            "description": "Number of answers returned."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FaqItem"
            }
          },
          "total": {
            "type": "integer",
            "description": "Matching answers in all pages."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cursor for the next page, or null on the last page."
          }
        }
      },
      "Pricing": {
        "type": "object",
        "required": [
          "name",
          "price",
          "currency",
          "period",
          "summary",
          "notes"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Plan name."
          },
          "price": {
            "type": "number",
            "description": "Price per period."
          },
          "currency": {
            "type": "string",
            "description": "ISO 4217 currency code."
          },
          "period": {
            "type": "string",
            "description": "Billing period."
          },
          "summary": {
            "type": "string",
            "description": "Plain-language summary."
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Terms."
          }
        }
      },
      "Signup": {
        "type": "object",
        "required": [
          "url",
          "steps",
          "agentNote"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Signup form."
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Steps for the person."
          },
          "agentNote": {
            "type": "string",
            "description": "What an agent may and may not do."
          }
        }
      },
      "Status": {
        "type": "object",
        "required": [
          "status",
          "version",
          "time",
          "changelog"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok"
            ],
            "description": "ok when the API answers."
          },
          "version": {
            "type": "string",
            "description": "API version."
          },
          "time": {
            "type": "string",
            "format": "date-time",
            "description": "Server time."
          },
          "changelog": {
            "type": "object",
            "description": "Latest changelog entry.",
            "required": [
              "version",
              "date",
              "changes"
            ],
            "properties": {
              "version": {
                "type": "string"
              },
              "date": {
                "type": "string",
                "format": "date"
              },
              "changes": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "headers": {
      "RateLimit-Policy": {
        "description": "Rate-limit policy, for example \"default\";q=60;w=60.",
        "schema": {
          "type": "string"
        }
      },
      "RateLimit": {
        "description": "Requests left and seconds until reset, for example \"default\";r=59;t=60.",
        "schema": {
          "type": "string"
        }
      }
    }
  }
}
