openapi: 3.1.0
info:
  title: darknetian bookings
  version: 1.0.0
  description: |
    Plain-HTTPS face of the bookings agent. For richer protocols see the
    A2A AgentCard at /.well-known/agent-card.json or the MCP server card
    at /.well-known/mcp/server-card.json.
servers:
  - url: https://bookings.darknetian.com
paths:
  /ask:
    post:
      summary: Send a message to the bookings agent
      operationId: ask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [message]
              properties:
                message:
                  type: string
                  description: Natural-language request, e.g. "book 30 min with Nic next Tuesday afternoon — my email is alice@example.com"
                requester_email:
                  type: string
                  format: email
                  description: Optional. If omitted, the agent will ask for it before proposing a time.
                requester_name:
                  type: string
                  description: Optional. Used as the invite recipient's display name.
      responses:
        "200":
          description: Final reply from the agent.
          content:
            application/json:
              schema:
                type: object
                properties:
                  reply:
                    type: string
                  invite_sent:
                    type: boolean
                  slot:
                    type: object
                    properties:
                      start: { type: string, format: date-time }
                      end:   { type: string, format: date-time }
            text/event-stream:
              schema:
                type: string
                description: SSE event stream when Accept is text/event-stream.
        "429":
          description: Rate limit exceeded.
        "5XX":
          description: Upstream error (Anthropic or Google).
