{
  "openapi": "3.1.0",
  "info": {
    "title": "Let’s Relax Thai Wellness agent booking",
    "version": "1.0.0",
    "description": "A2A 0.3.0 JSON-RPC message/send endpoint. Reads are public; request creation requires explicit customer approval and consent, and is limited to five new requests per hour per IP. Staff access is never exposed. get_request requires a receipt Bearer token. Not an instant-availability or payment service."
  },
  "servers": [
    {
      "url": "https://letsrelaxnyc.com"
    }
  ],
  "paths": {
    "/api/agent": {
      "post": {
        "operationId": "sendBookingAgentMessage",
        "summary": "Send one structured booking-agent message",
        "security": [
          {},
          {
            "receipt": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "jsonrpc",
                  "id",
                  "method",
                  "params"
                ],
                "properties": {
                  "jsonrpc": {
                    "const": "2.0"
                  },
                  "id": {
                    "type": [
                      "string",
                      "integer"
                    ]
                  },
                  "method": {
                    "const": "message/send"
                  },
                  "params": {
                    "type": "object",
                    "required": [
                      "message"
                    ],
                    "properties": {
                      "message": {
                        "type": "object",
                        "required": [
                          "kind",
                          "role",
                          "messageId",
                          "parts"
                        ],
                        "properties": {
                          "kind": {
                            "const": "message"
                          },
                          "role": {
                            "const": "user"
                          },
                          "messageId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "parts": {
                            "type": "array",
                            "minItems": 1,
                            "maxItems": 1,
                            "items": {
                              "type": "object",
                              "required": [
                                "kind",
                                "data"
                              ],
                              "properties": {
                                "kind": {
                                  "const": "data"
                                },
                                "data": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "required": [
                                        "action"
                                      ],
                                      "properties": {
                                        "action": {
                                          "const": "list_services"
                                        }
                                      },
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "action",
                                        "selection"
                                      ],
                                      "properties": {
                                        "action": {
                                          "const": "quote"
                                        },
                                        "selection": {
                                          "type": "object",
                                          "required": [
                                            "serviceId",
                                            "minutes"
                                          ],
                                          "properties": {
                                            "serviceId": {
                                              "type": "string",
                                              "enum": [
                                                "signature-thai-massage",
                                                "traditional-thai-massage",
                                                "thai-combination",
                                                "deep-tissue-massage",
                                                "swedish-massage",
                                                "aromatherapy-massage",
                                                "hot-stone-massage",
                                                "sports-massage",
                                                "couples-massage",
                                                "four-hand-massage",
                                                "harmony",
                                                "urban-wellness",
                                                "celebration-for-two",
                                                "facial-massage",
                                                "brazilian-wax",
                                                "bridal-makeup",
                                                "bridal-makeup-preview",
                                                "bridal-party-makeup",
                                                "event-makeup",
                                                "soft-glam-makeup",
                                                "special-occasion-makeup",
                                                "full-glam-makeup"
                                              ]
                                            },
                                            "minutes": {
                                              "type": [
                                                "integer",
                                                "null"
                                              ],
                                              "enum": [
                                                null,
                                                60,
                                                75,
                                                90,
                                                120
                                              ]
                                            },
                                            "guests": {
                                              "type": "integer",
                                              "minimum": 1,
                                              "maximum": 6,
                                              "default": 1
                                            },
                                            "lashes": {
                                              "type": "boolean",
                                              "default": false
                                            },
                                            "seriesTreatment": {
                                              "type": "string",
                                              "enum": [
                                                "",
                                                "Traditional Thai Massage",
                                                "Thai Combination",
                                                "Swedish Massage"
                                              ]
                                            }
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "action",
                                        "selection",
                                        "date"
                                      ],
                                      "properties": {
                                        "action": {
                                          "const": "request_times"
                                        },
                                        "selection": {
                                          "type": "object",
                                          "required": [
                                            "serviceId",
                                            "minutes"
                                          ],
                                          "properties": {
                                            "serviceId": {
                                              "type": "string",
                                              "enum": [
                                                "signature-thai-massage",
                                                "traditional-thai-massage",
                                                "thai-combination",
                                                "deep-tissue-massage",
                                                "swedish-massage",
                                                "aromatherapy-massage",
                                                "hot-stone-massage",
                                                "sports-massage",
                                                "couples-massage",
                                                "four-hand-massage",
                                                "harmony",
                                                "urban-wellness",
                                                "celebration-for-two",
                                                "facial-massage",
                                                "brazilian-wax",
                                                "bridal-makeup",
                                                "bridal-makeup-preview",
                                                "bridal-party-makeup",
                                                "event-makeup",
                                                "soft-glam-makeup",
                                                "special-occasion-makeup",
                                                "full-glam-makeup"
                                              ]
                                            },
                                            "minutes": {
                                              "type": [
                                                "integer",
                                                "null"
                                              ],
                                              "enum": [
                                                null,
                                                60,
                                                75,
                                                90,
                                                120
                                              ]
                                            },
                                            "guests": {
                                              "type": "integer",
                                              "minimum": 1,
                                              "maximum": 6,
                                              "default": 1
                                            },
                                            "lashes": {
                                              "type": "boolean",
                                              "default": false
                                            },
                                            "seriesTreatment": {
                                              "type": "string",
                                              "enum": [
                                                "",
                                                "Traditional Thai Massage",
                                                "Thai Combination",
                                                "Swedish Massage"
                                              ]
                                            }
                                          },
                                          "additionalProperties": false
                                        },
                                        "date": {
                                          "type": "string",
                                          "format": "date"
                                        }
                                      },
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "action",
                                        "customerAuthorization",
                                        "booking"
                                      ],
                                      "properties": {
                                        "action": {
                                          "const": "request_appointment"
                                        },
                                        "customerAuthorization": {
                                          "const": true
                                        },
                                        "booking": {
                                          "type": "object",
                                          "required": [
                                            "serviceId",
                                            "minutes",
                                            "date",
                                            "time",
                                            "name",
                                            "phone",
                                            "consent",
                                            "idempotencyKey"
                                          ],
                                          "properties": {
                                            "serviceId": {
                                              "type": "string",
                                              "enum": [
                                                "signature-thai-massage",
                                                "traditional-thai-massage",
                                                "thai-combination",
                                                "deep-tissue-massage",
                                                "swedish-massage",
                                                "aromatherapy-massage",
                                                "hot-stone-massage",
                                                "sports-massage",
                                                "couples-massage",
                                                "four-hand-massage",
                                                "harmony",
                                                "urban-wellness",
                                                "celebration-for-two",
                                                "facial-massage",
                                                "brazilian-wax",
                                                "bridal-makeup",
                                                "bridal-makeup-preview",
                                                "bridal-party-makeup",
                                                "event-makeup",
                                                "soft-glam-makeup",
                                                "special-occasion-makeup",
                                                "full-glam-makeup"
                                              ]
                                            },
                                            "minutes": {
                                              "type": [
                                                "integer",
                                                "null"
                                              ],
                                              "enum": [
                                                null,
                                                60,
                                                75,
                                                90,
                                                120
                                              ]
                                            },
                                            "guests": {
                                              "type": "integer",
                                              "minimum": 1,
                                              "maximum": 6,
                                              "default": 1
                                            },
                                            "lashes": {
                                              "type": "boolean",
                                              "default": false
                                            },
                                            "seriesTreatment": {
                                              "type": "string",
                                              "enum": [
                                                "",
                                                "Traditional Thai Massage",
                                                "Thai Combination",
                                                "Swedish Massage"
                                              ]
                                            },
                                            "date": {
                                              "type": "string",
                                              "format": "date",
                                              "description": "New York local date, today through 90 days ahead."
                                            },
                                            "time": {
                                              "type": "string",
                                              "pattern": "^([01][0-9]|2[0-3]):(00|30)$",
                                              "description": "New York local start time; treatment must finish by midnight."
                                            },
                                            "name": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 100
                                            },
                                            "phone": {
                                              "type": "string",
                                              "minLength": 10,
                                              "maxLength": 32
                                            },
                                            "email": {
                                              "type": "string",
                                              "maxLength": 254
                                            },
                                            "notes": {
                                              "type": "string",
                                              "maxLength": 500
                                            },
                                            "consent": {
                                              "const": true,
                                              "description": "Customer agrees to contact about this appointment. This is not marketing consent."
                                            },
                                            "idempotencyKey": {
                                              "type": "string",
                                              "format": "uuid",
                                              "description": "A new random UUID per customer-approved request. Preserve the UUID and identical payload for network retries; never share it publicly."
                                            }
                                          },
                                          "additionalProperties": false
                                        }
                                      },
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "required": [
                                        "action"
                                      ],
                                      "properties": {
                                        "action": {
                                          "const": "get_request"
                                        }
                                      },
                                      "additionalProperties": false
                                    }
                                  ]
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A2A Message containing data, or a JSON-RPC protocol error. Inspect error before treating a request as successful."
          },
          "400": {
            "description": "Invalid input or missing customer authorization/consent; no request created."
          },
          "403": {
            "description": "Cross-origin browser request rejected."
          },
          "404": {
            "description": "Receipt token not found."
          },
          "409": {
            "description": "Idempotency key reused with changed request details."
          },
          "413": {
            "description": "Request body exceeds 8192 bytes."
          },
          "429": {
            "description": "Request rate limit reached."
          },
          "503": {
            "description": "Booking service temporarily unavailable."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "receipt": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}