{
 "openapi": "3.1.0",
 "info": {
  "title": "Restelys agent API",
  "version": "2026-11-16",
  "description": "Requests confirmed by a person: free trial box, quote, recommended set, question. Ordering opens in 2027.",
  "contact": {
   "email": "contact@restelys.com"
  }
 },
 "servers": [
  {
   "url": "https://restelys.com"
  }
 ],
 "paths": {
  "/api/demande.php": {
   "post": {
    "operationId": "sendRequest",
    "summary": "Send a request on behalf of a property; a person confirms it by email",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "https://restelys.com/agents/demande.schema.json"
       }
      }
     }
    },
    "responses": {
     "202": {
      "description": "Received",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "const": true
          },
          "reference": {
           "type": "string"
          },
          "status": {
           "const": "received"
          },
          "estimate": {
           "type": "object"
          },
          "next_step": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "description": "Invalid request, with the list of errors"
     },
     "429": {
      "description": "Too many requests from this address"
     },
     "503": {
      "description": "Not sent; email contact@restelys.com instead"
     }
    }
   }
  }
 }
}
