{"openapi":"3.1.0","info":{"title":"Mochi agent booking API","version":"1.0.0","description":"Lets an AI assistant book a meeting on a Mochi booking page for the person it works for. Read the page, get its free times, then ask for one: the guest gets an email and the meeting is booked only when they confirm it. No API key is needed. Rate limited per caller and per guest email.","contact":{"email":"support@mochimeet.com","url":"https://www.mochimeet.com/developers"}},"servers":[{"url":"https://www.mochimeet.com"}],"paths":{"/api/agent/booking-pages/{slug}":{"get":{"operationId":"getBookingPage","summary":"Who the page books with, its durations and the questions it asks","parameters":[{"name":"slug","in":"path","required":true,"description":"The booking page's address, as in mochimeet.com/<slug>.","schema":{"type":"string"}}],"responses":{"200":{"description":"The booking page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingPage"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agent/booking-pages/{slug}/slots":{"get":{"operationId":"getFreeSlots","summary":"Free start times","parameters":[{"name":"slug","in":"path","required":true,"description":"The booking page's address, as in mochimeet.com/<slug>.","schema":{"type":"string"}},{"name":"duration","in":"query","description":"Minutes; one of the page's durationsMinutes.","schema":{"type":"integer"}},{"name":"timezone","in":"query","description":"The guest's IANA time zone, e.g. Asia/Jerusalem.","schema":{"type":"string"}},{"name":"days","in":"query","description":"How many days ahead (1–60, default 14).","schema":{"type":"integer"}}],"responses":{"200":{"description":"Free slots","content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"},"durationMinutes":{"type":"integer"},"timezone":{"type":"string"},"slots":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"}}}}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/agent/booking-pages/{slug}/requests":{"post":{"operationId":"requestMeeting","summary":"Ask for a meeting; the guest confirms it by email","parameters":[{"name":"slug","in":"path","required":true,"description":"The booking page's address, as in mochimeet.com/<slug>.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingRequest"}}}},"responses":{"202":{"description":"The guest was emailed a link to confirm","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"const":"confirmation_sent"},"message":{"type":"string"},"start":{"type":"string"},"durationMinutes":{"type":"integer"}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"}}},"Question":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"required":{"type":"boolean"},"type":{"type":"string"}}},"BookingPage":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"headline":{"type":["string","null"]},"url":{"type":"string"},"timezone":{"type":"string"},"durationsMinutes":{"type":"array","items":{"type":"integer"}},"defaultDurationMinutes":{"type":"integer"},"reasons":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"suggestedDurationMinutes":{"type":["integer","null"]},"questions":{"type":"array","items":{"$ref":"#/components/schemas/Question"}}}}},"customFields":{"type":"array","items":{"$ref":"#/components/schemas/Question"}},"howToBook":{"type":"string"}}},"MeetingRequest":{"type":"object","required":["guestName","guestEmail","timezone","durationMinutes","start"],"properties":{"guestName":{"type":"string"},"guestEmail":{"type":"string","format":"email","description":"Where the confirmation goes; the meeting is booked when this person confirms."},"timezone":{"type":"string","description":"IANA time zone"},"durationMinutes":{"type":"integer"},"start":{"type":"string","format":"date-time","description":"One of the start times from /slots."},"locale":{"type":"string","enum":["en","he"]},"reasonKey":{"type":"string","description":"One of the page's reasons, if it has any."},"answers":{"type":"object","additionalProperties":{"type":"string"},"description":"Answers keyed by question key: the reason's questions and the custom fields."}}}}}}