{
 "openapi": "3.1.0",
 "info": {
  "title": "Youmoir agent API",
  "version": "1.0.0",
  "description": "Read-only info and order start for Youmoir: custom browser video games about one real person, as a gift. MCP endpoint: POST https://youmoir.com/mcp"
 },
 "servers": [
  {
   "url": "https://youmoir.com"
  }
 ],
 "paths": {
  "/api/agent/examples": {
   "get": {
    "operationId": "listExamples",
    "summary": "Free sample games",
    "parameters": [
     {
      "name": "assistant",
      "in": "query",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Sample games with links"
     }
    }
   }
  },
  "/api/agent/pricing": {
   "get": {
    "operationId": "getPricing",
    "summary": "Prices: $49 story, then the game at 5 days ($999 total) / 72 hours ($1,999) / 24 hours ($4,999); $999 gift certificate",
    "parameters": [
     {
      "name": "speed",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "5_days",
        "72_hours",
        "24_hours"
       ]
      }
     },
     {
      "name": "assistant",
      "in": "query",
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Pricing"
     }
    }
   }
  },
  "/api/agent/gift": {
   "get": {
    "operationId": "giftCertificate",
    "summary": "Link to buy a $999 gift certificate",
    "responses": {
     "200": {
      "description": "Certificate link"
     }
    }
   }
  },
  "/api/agent/order": {
   "post": {
    "operationId": "startOrder",
    "summary": "Start an order; with buyer email + explicit consent returns a Stripe link for the $49 story, otherwise the brief link",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "recipient_name": {
          "type": "string",
          "description": "Name of the person the game is about."
         },
         "relationship": {
          "type": "string",
          "enum": [
           "partner",
           "child",
           "family",
           "parents",
           "grandparents",
           "friends",
           "friend",
           "work",
           "coworkers",
           "boss",
           "self",
           "other"
          ],
          "description": "Who the game is for, from the buyer's view."
         },
         "occasion": {
          "type": "string",
          "description": "Optional: anniversary, birthday, Christmas, retirement, proposal..."
         },
         "facts": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "maxItems": 10,
          "description": "Optional: a few things about the person (habits, places, inside jokes)."
         },
         "buyer_email": {
          "type": "string",
          "description": "Buyer's email, only if the buyer gave it to you for this order."
         },
         "buyer_agreed_to_terms": {
          "type": "boolean",
          "description": "True only if the buyer explicitly confirmed they are 18+ and agree to youmoir.com/terms and youmoir.com/privacy."
         },
         "language": {
          "type": "string",
          "enum": [
           "en",
           "ru",
           "ar"
          ]
         },
         "assistant": {
          "type": "string"
         }
        },
        "required": [
         "recipient_name",
         "relationship"
        ],
        "additionalProperties": false
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Order status and links"
     }
    }
   }
  }
 }
}