{"openapi":"3.1.0","info":{"title":"EventPad Muse Connector API","version":"1.0.0","description":"Create and manage no-login EventPad coordination pages. EventPad stores structured responses; the calling agent provides any natural-language planning or summaries."},"servers":[{"url":"https://ganji.site-ai-gateway.com"}],"paths":{"/api/muse/events":{"post":{"operationId":"createEvent","summary":"Create an EventPad event","description":"Create a shareable EventPad page for collecting RSVPs, availability, choices and answers from people who do not need a Muse or EventPad account.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title","date_options"],"additionalProperties":false,"properties":{"title":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":500},"date_options":{"type":"array","minItems":1,"maxItems":10,"items":{"type":"string","minLength":1,"maxLength":100}},"location_options":{"type":"array","maxItems":10,"items":{"type":"string","minLength":1,"maxLength":100}},"questions":{"type":"array","items":{"type":"object","required":["id","label","type","options"],"properties":{"id":{"type":"string","example":"food"},"label":{"type":"string","example":"What would you like to eat?"},"type":{"type":"string","enum":["single_choice"]},"options":{"type":"array","items":{"type":"string"},"example":["Sushi","Italian","Yakiniku"]}}}},"language":{"type":"string","enum":["en","ja","zh","ko","vi","es","pt"],"default":"en"},"location":{"type":"string","maxLength":200},"expected_participant_count":{"type":"integer","minimum":1,"maximum":1000}}},"example":{"title":"Dinner this weekend","description":"Choose a time and preference","date_options":["2026-09-27T18:00:00+09:00","2026-09-28T18:00:00+09:00"],"location_options":["Shibuya","Shinjuku"],"questions":[{"id":"food","label":"What would you like to eat?","type":"single_choice","options":["Sushi","Italian","Yakiniku"]}],"language":"en"}}}},"responses":{"201":{"description":"Created. The organizer_token and organizer_url are sensitive and must not be shared with participants.","content":{"application/json":{"schema":{"type":"object","required":["event_id","public_url","organizer_url","organizer_token","status"],"properties":{"event_id":{"type":"string","example":"8h4m2p7q"},"public_url":{"type":"string","format":"uri"},"organizer_url":{"type":"string","format":"uri","description":"Sensitive organizer-only URL."},"organizer_token":{"type":"string","writeOnly":true,"description":"Sensitive event-scoped Bearer token. Store it securely."},"status":{"type":"string","enum":["open","closed","locked","expired"]}}}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST","EVENT_NOT_FOUND","EVENT_CLOSED","UNAUTHORIZED","OPTION_IN_USE","RATE_LIMITED","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST","EVENT_NOT_FOUND","EVENT_CLOSED","UNAUTHORIZED","OPTION_IN_USE","RATE_LIMITED","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}}}}},"/api/muse/events/{id}":{"get":{"operationId":"getEvent","summary":"Get an EventPad event","description":"Get the current configuration and status of an EventPad event.","parameters":[{"name":"id","in":"path","required":true,"description":"The public EventPad event ID returned by createEvent.","schema":{"type":"string","pattern":"^[23456789a-z]{8}$"}}],"responses":{"200":{"description":"Public event configuration.","content":{"application/json":{"schema":{"type":"object","required":["event_id","title","description","status","date_options","location_options","questions","location","response_count","public_url","created_at","updated_at"],"properties":{"event_id":{"type":"string","example":"8h4m2p7q"},"title":{"type":"string","example":"Dinner this weekend"},"description":{"type":"string","example":"Choose a time and preference"},"status":{"type":"string","enum":["open","closed","locked","expired"]},"date_options":{"type":"array","items":{"type":"string"},"example":["2026-09-27T18:00:00+09:00","2026-09-28T18:00:00+09:00"]},"location_options":{"type":"array","items":{"type":"string"},"example":["Shibuya","Shinjuku"]},"questions":{"type":"array","items":{"type":"object","required":["id","label","type","options"],"properties":{"id":{"type":"string","example":"food"},"label":{"type":"string","example":"What would you like to eat?"},"type":{"type":"string","enum":["single_choice"]},"options":{"type":"array","items":{"type":"string"},"example":["Sushi","Italian","Yakiniku"]}}}},"location":{"type":"string","nullable":true,"example":"Shibuya Station"},"response_count":{"type":"integer","minimum":0},"public_url":{"type":"string","format":"uri"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}},"404":{"description":"Event not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST","EVENT_NOT_FOUND","EVENT_CLOSED","UNAUTHORIZED","OPTION_IN_USE","RATE_LIMITED","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST","EVENT_NOT_FOUND","EVENT_CLOSED","UNAUTHORIZED","OPTION_IN_USE","RATE_LIMITED","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}}}},"patch":{"operationId":"updateEvent","summary":"Update an EventPad event","description":"Update an EventPad event while preserving existing participant responses whenever possible.","parameters":[{"name":"id","in":"path","required":true,"description":"The public EventPad event ID returned by createEvent.","schema":{"type":"string","pattern":"^[23456789a-z]{8}$"}},{"name":"X-EventPad-Organizer-Token","in":"header","required":true,"description":"The sensitive event-scoped organizer_token returned by createEvent. Send it only to EventPad over HTTPS.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","minProperties":1,"additionalProperties":false,"properties":{"title":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":500},"date_options":{"type":"array","minItems":1,"maxItems":10,"items":{"type":"string","minLength":1,"maxLength":100}},"location_options":{"type":"array","maxItems":10,"items":{"type":"string","minLength":1,"maxLength":100}},"questions":{"type":"array","items":{"type":"object","required":["id","label","type","options"],"properties":{"id":{"type":"string","example":"food"},"label":{"type":"string","example":"What would you like to eat?"},"type":{"type":"string","enum":["single_choice"]},"options":{"type":"array","items":{"type":"string"},"example":["Sushi","Italian","Yakiniku"]}}}},"language":{"type":"string","enum":["en","ja","zh","ko","vi","es","pt"],"default":"en"},"location":{"type":"string","maxLength":200},"expected_participant_count":{"type":"integer","minimum":1,"maximum":1000},"status":{"type":"string","enum":["open","closed"]}}}}}},"responses":{"200":{"description":"Updated event configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"event_id":{"type":"string","example":"8h4m2p7q"},"title":{"type":"string","example":"Dinner this weekend"},"description":{"type":"string","example":"Choose a time and preference"},"status":{"type":"string","enum":["open","closed","locked","expired"]},"date_options":{"type":"array","items":{"type":"string"},"example":["2026-09-27T18:00:00+09:00","2026-09-28T18:00:00+09:00"]},"location_options":{"type":"array","items":{"type":"string"},"example":["Shibuya","Shinjuku"]},"questions":{"type":"array","items":{"type":"object","required":["id","label","type","options"],"properties":{"id":{"type":"string","example":"food"},"label":{"type":"string","example":"What would you like to eat?"},"type":{"type":"string","enum":["single_choice"]},"options":{"type":"array","items":{"type":"string"},"example":["Sushi","Italian","Yakiniku"]}}}},"location":{"type":"string","nullable":true,"example":"Shibuya Station"},"response_count":{"type":"integer","minimum":0},"public_url":{"type":"string","format":"uri"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Invalid request or an option with responses would be removed.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST","EVENT_NOT_FOUND","EVENT_CLOSED","UNAUTHORIZED","OPTION_IN_USE","RATE_LIMITED","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}},"401":{"description":"Missing or invalid organizer token.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST","EVENT_NOT_FOUND","EVENT_CLOSED","UNAUTHORIZED","OPTION_IN_USE","RATE_LIMITED","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}},"404":{"description":"Event not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST","EVENT_NOT_FOUND","EVENT_CLOSED","UNAUTHORIZED","OPTION_IN_USE","RATE_LIMITED","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST","EVENT_NOT_FOUND","EVENT_CLOSED","UNAUTHORIZED","OPTION_IN_USE","RATE_LIMITED","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}}}}},"/api/muse/events/{id}/responses":{"get":{"operationId":"getEventResponses","summary":"Get event responses and deterministic vote counts","description":"Get structured participant responses, availability and vote counts for an EventPad event.","parameters":[{"name":"id","in":"path","required":true,"description":"The public EventPad event ID returned by createEvent.","schema":{"type":"string","pattern":"^[23456789a-z]{8}$"}},{"name":"X-EventPad-Organizer-Token","in":"header","required":true,"description":"The sensitive event-scoped organizer_token returned by createEvent. Send it only to EventPad over HTTPS.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Structured participant responses and deterministic aggregation.","content":{"application/json":{"schema":{"type":"object","required":["event_id","status","response_count","responses","summary"],"properties":{"event_id":{"type":"string","example":"8h4m2p7q"},"status":{"type":"string","enum":["open","closed","locked","expired"]},"response_count":{"type":"integer","minimum":0},"missing_response_count":{"type":"integer","minimum":0,"nullable":true},"responses":{"type":"array","items":{"type":"object"}},"summary":{"type":"object"}}}}}},"401":{"description":"Missing or invalid organizer token.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST","EVENT_NOT_FOUND","EVENT_CLOSED","UNAUTHORIZED","OPTION_IN_USE","RATE_LIMITED","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}},"404":{"description":"Event not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST","EVENT_NOT_FOUND","EVENT_CLOSED","UNAUTHORIZED","OPTION_IN_USE","RATE_LIMITED","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST","EVENT_NOT_FOUND","EVENT_CLOSED","UNAUTHORIZED","OPTION_IN_USE","RATE_LIMITED","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}}}}},"/api/muse/events/{id}/close":{"post":{"operationId":"closeEvent","summary":"Close an EventPad event","description":"Close an EventPad event so it stops accepting new responses while preserving existing results.","parameters":[{"name":"id","in":"path","required":true,"description":"The public EventPad event ID returned by createEvent.","schema":{"type":"string","pattern":"^[23456789a-z]{8}$"}},{"name":"X-EventPad-Organizer-Token","in":"header","required":true,"description":"The sensitive event-scoped organizer_token returned by createEvent. Send it only to EventPad over HTTPS.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Event closed; existing responses remain available.","content":{"application/json":{"schema":{"type":"object","properties":{"event_id":{"type":"string","example":"8h4m2p7q"},"status":{"type":"string","const":"closed"}}}}}},"401":{"description":"Missing or invalid organizer token.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST","EVENT_NOT_FOUND","EVENT_CLOSED","UNAUTHORIZED","OPTION_IN_USE","RATE_LIMITED","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}},"404":{"description":"Event not found.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST","EVENT_NOT_FOUND","EVENT_CLOSED","UNAUTHORIZED","OPTION_IN_USE","RATE_LIMITED","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST","EVENT_NOT_FOUND","EVENT_CLOSED","UNAUTHORIZED","OPTION_IN_USE","RATE_LIMITED","INTERNAL_ERROR"]},"message":{"type":"string"}}}}}}}}}}}}}