{"openapi":"3.1.0","info":{"title":"TogetherMeals API","version":"1.0.0"},"servers":[{"url":"https://api.togethermeals.app"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A first-party Supabase session JWT, an API key (`tm_live_…` or `tm_test_…`) or an OAuth access token (`tm_mcp_…`). Each operation's `x-credential-surface` says which it accepts."}},"schemas":{"TransitionResult":{"type":"object","properties":{"meal_space_id":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000001"},"availability":{"$ref":"#/components/schemas/MealSpaceAvailability"},"membership_id":{"type":["string","null"],"format":"uuid","example":"3f1a0000-0000-4000-8000-000000000002"},"invitation_id":{"type":["string","null"],"format":"uuid"},"request_id":{"type":["string","null"],"format":"uuid"}},"required":["meal_space_id","availability","membership_id","invitation_id","request_id"],"additionalProperties":false},"MealSpaceAvailability":{"type":"string","enum":["writable","paid_grace","read_only","deletion_pending"],"example":"writable"},"Meta":{"type":"object","properties":{"request_id":{"type":"string","minLength":1,"example":"0f0b0000-0000-4000-8000-0000000000ff"},"timestamp":{"type":"string","format":"date-time","example":"2026-09-01T12:00:00.000Z"}},"required":["request_id","timestamp"],"additionalProperties":false},"ErrorEnvelope":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorObject"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["error","meta"],"additionalProperties":false},"ErrorObject":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/PublicErrorCode"},"message":{"type":"string","example":"This Meal Space is read only."},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["code","message"],"additionalProperties":false},"PublicErrorCode":{"type":"string","enum":["manifest_changed","cursor_expired","snapshot_expired","scope_changed","scope_revoked","protocol_incompatible","projection_too_large","invalid_cursor","trial_confirmation_changed","trial_unavailable","validation_error","unauthorized","forbidden","not_found","conflict","precondition_failed","rate_limited","payload_too_large","internal_error","registration_disabled","provider_retryable","provider_rejected","possession_rejected","active_installation_limit","api_key_limit_reached","promo_code_invalid","promo_code_expired","promo_code_exhausted","promo_code_already_redeemed","promo_paid_active","account_deletion_pending","owner_required","pro_required","sponsorship_required","meal_space_read_only","meal_space_deletion_pending","recent_reauthentication_required","service_unavailable"],"example":"not_found"},"CreateSharedMealSpaceRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"example":"Weeknights"},"kind":{"$ref":"#/components/schemas/SharedMealSpaceKind"},"color":{"$ref":"#/components/schemas/MealSpaceColor"},"planning_timezone":{"$ref":"#/components/schemas/PlanningTimezone"},"enabled_slots":{"type":"array","items":{"type":"string","enum":["breakfast","lunch","dinner","snack","dessert"]},"minItems":1,"maxItems":5}},"required":["name","kind","color"],"additionalProperties":false},"SharedMealSpaceKind":{"type":"string","enum":["family","couple","roommates","trip","other"],"example":"family"},"MealSpaceColor":{"type":"string","enum":["ruby","coral","amber","lime","emerald","teal","sky","indigo","violet","pink"],"example":"teal"},"PlanningTimezone":{"type":"string","example":"America/Denver"},"MealSpaceAccessSummary":{"type":"object","properties":{"meal_space_id":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000001"},"availability":{"$ref":"#/components/schemas/MealSpaceAvailability"},"effective_role":{"$ref":"#/components/schemas/EffectiveRole"},"owner":{"$ref":"#/components/schemas/MemberReference"},"sponsor":{"allOf":[{"$ref":"#/components/schemas/MemberReference"},{"type":["object","null"]}]},"grace_ends_at":{"type":["string","null"],"format":"date-time","example":"2026-09-30T00:00:00.000Z"},"deletion_finalize_after":{"type":["string","null"],"format":"date-time","example":"2026-09-30T00:00:00.000Z"},"actions":{"type":"array","items":{"$ref":"#/components/schemas/AccessRecoveryAction"}}},"required":["meal_space_id","availability","effective_role","owner","sponsor","grace_ends_at","actions"],"additionalProperties":false},"EffectiveRole":{"type":"string","enum":["owner","admin","editor","viewer"],"example":"admin"},"MemberReference":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000002"},"display_name":{"type":"string","example":"Ada"}},"required":["membership_id","display_name"],"additionalProperties":false},"AccessRecoveryAction":{"type":"string","enum":["invite_member","change_role","remove_member","leave","request_ownership_transfer","request_sponsorship_handoff","volunteer_sponsorship","relinquish_sponsorship","copy_out","export","request_deletion","cancel_deletion"],"example":"invite_member"},"MealSpaceMembershipPage":{"type":"object","properties":{"memberships":{"type":"array","items":{"$ref":"#/components/schemas/MealSpaceMembership"},"maxItems":100},"next_cursor":{"type":["string","null"],"format":"uuid"}},"required":["memberships","next_cursor"],"additionalProperties":false},"MealSpaceMembership":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000002"},"display_name":{"type":"string","example":"Ada"},"avatar_path":{"type":["string","null"],"pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\\.webp$"},"effective_role":{"$ref":"#/components/schemas/EffectiveRole"},"is_self":{"type":"boolean"}},"required":["membership_id","display_name","effective_role","is_self"],"additionalProperties":false},"MealSpacePage":{"type":"object","properties":{"meal_spaces":{"type":"array","items":{"$ref":"#/components/schemas/MealSpaceListItem"},"maxItems":100},"next_cursor":{"type":["string","null"],"format":"uuid"}},"required":["meal_spaces","next_cursor"],"additionalProperties":false},"MealSpaceListItem":{"type":"object","properties":{"meal_space_id":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000001"},"membership_id":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000002"},"name":{"type":"string","minLength":1,"example":"Family"},"space_type":{"type":"string","enum":["personal","family","couple","roommates","trip","other"],"example":"family"},"effective_role":{"$ref":"#/components/schemas/EffectiveRole"},"availability":{"$ref":"#/components/schemas/MealSpaceAvailability"},"planning_timezone":{"type":"string","example":"America/Denver"},"enabled_slots":{"type":"array","items":{"type":"string","enum":["breakfast","lunch","dinner","snack","dessert"]},"minItems":1,"maxItems":5,"example":["breakfast","dinner"]},"is_primary":{"type":"boolean"}},"required":["meal_space_id","membership_id","name","space_type","effective_role","availability","planning_timezone","enabled_slots","is_primary"],"additionalProperties":false},"CreateInvitationRequest":{"type":"object","properties":{"email":{"type":"string","format":"email","example":"ada@example.test"},"role":{"$ref":"#/components/schemas/MembershipRole"}},"required":["email","role"],"additionalProperties":false},"MembershipRole":{"type":"string","enum":["admin","editor","viewer"],"example":"editor"},"DeclineInvitationResult":{"type":"object","properties":{"invitation_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["declined"]}},"required":["invitation_id","status"],"additionalProperties":false},"ChangeMembershipRoleRequest":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/MembershipRole"}},"required":["role"],"additionalProperties":false},"SponsorImpactPreview":{"type":"object","properties":{"cause":{"$ref":"#/components/schemas/SponsorImpactCause"},"resulting_availability":{"$ref":"#/components/schemas/MealSpaceAvailability"},"grace_ends_at":{"type":["string","null"],"format":"date-time","example":"2026-09-30T00:00:00.000Z"},"sponsor":{"allOf":[{"$ref":"#/components/schemas/MemberReference"},{"type":["object","null"]}]},"replacement_actions":{"type":"array","items":{"$ref":"#/components/schemas/SponsorshipReplacementAction"}},"blocked_action_families":{"type":"array","items":{"$ref":"#/components/schemas/BlockedActionFamily"}}},"required":["cause","resulting_availability","grace_ends_at","sponsor","replacement_actions","blocked_action_families"],"additionalProperties":false},"SponsorImpactCause":{"type":"string","enum":["leave","removal","relinquish"],"example":"leave"},"SponsorshipReplacementAction":{"type":"string","enum":["request_sponsorship_handoff","volunteer_sponsorship","subscribe"],"example":"volunteer_sponsorship"},"BlockedActionFamily":{"type":"string","enum":["shared_content_writes","member_administration","recurrence","stats"],"example":"shared_content_writes"},"LeaveMealSpaceRequest":{"type":"object","properties":{"pending_write_disposition":{"$ref":"#/components/schemas/PendingWriteDisposition"}},"required":["pending_write_disposition"],"additionalProperties":false},"PendingWriteDisposition":{"type":"string","enum":["synchronized","discarded"],"example":"synchronized"},"InvitationPage":{"type":"object","properties":{"invitations":{"type":"array","items":{"$ref":"#/components/schemas/PendingInvitation"},"maxItems":100},"next_cursor":{"type":["string","null"],"format":"uuid"}},"required":["invitations","next_cursor"],"additionalProperties":false},"PendingInvitation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"role":{"$ref":"#/components/schemas/MembershipRole"},"expires_at":{"type":"string","format":"date-time"},"state":{"type":"string","enum":["pending","expired"]},"delivery":{"type":"string","enum":["pending","sending","sent","cancelled","failed"]}},"required":["id","email","role","expires_at","state","delivery"],"additionalProperties":false},"OwnershipRequestRequest":{"type":"object","properties":{"recipient_membership_id":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000002"}},"required":["recipient_membership_id"],"additionalProperties":false},"SponsorshipRequestRequest":{"type":"object","properties":{"recipient_membership_id":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000002"}},"required":["recipient_membership_id"],"additionalProperties":false},"MealSpaceDeletionPreview":{"type":"object","properties":{"name":{"type":"string"},"counts":{"type":"object","properties":{"members":{"type":"integer","minimum":0},"entries":{"type":"integer","minimum":0},"recipes":{"type":"integer","minimum":0},"ideas":{"type":"integer","minimum":0},"notes":{"type":"integer","minimum":0}},"required":["members","entries","recipes","ideas","notes"],"additionalProperties":false},"finalize_after":{"type":["string","null"],"format":"date-time"}},"required":["name","counts","finalize_after"],"additionalProperties":false},"DeleteMealSpaceRequest":{"type":"object","properties":{"confirm_name":{"type":"string","minLength":1,"maxLength":200}},"required":["confirm_name"],"additionalProperties":false},"TransferRequestPage":{"type":"object","properties":{"requests":{"type":"array","items":{"$ref":"#/components/schemas/TransferRequest"},"maxItems":100},"next_cursor":{"type":["string","null"],"format":"uuid"}},"required":["requests","next_cursor"],"additionalProperties":false},"TransferRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"$ref":"#/components/schemas/TransferKind"},"meal_space":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"requested_by":{"$ref":"#/components/schemas/MemberReference"},"issued_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"acceptance":{"type":"string","enum":["available","pro_required","trial_limit","deletion_pending","unavailable"]}},"required":["id","kind","meal_space","requested_by","issued_at","expires_at","acceptance"],"additionalProperties":false},"TransferKind":{"type":"string","enum":["ownership","sponsorship"]},"SentTransferRequestPage":{"type":"object","properties":{"requests":{"type":"array","items":{"$ref":"#/components/schemas/SentTransferRequest"},"maxItems":100},"next_cursor":{"type":["string","null"],"format":"uuid"}},"required":["requests","next_cursor"],"additionalProperties":false},"SentTransferRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"$ref":"#/components/schemas/TransferKind"},"meal_space":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"recipient":{"$ref":"#/components/schemas/MemberReference"},"issued_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"}},"required":["id","kind","meal_space","recipient","issued_at","expires_at"],"additionalProperties":false},"AccountPreferences":{"type":"object","properties":{"timezone":{"anyOf":[{"$ref":"#/components/schemas/PlanningTimezone"},{"type":"null"}]},"primary_meal_space_id":{"type":["string","null"],"format":"uuid"}},"required":["timezone"],"additionalProperties":false},"UpdatePreferencesRequest":{"anyOf":[{"type":"object","properties":{"timezone":{"$ref":"#/components/schemas/PlanningTimezone"}},"required":["timezone"],"additionalProperties":false},{"type":"object","properties":{"primary_meal_space_id":{"type":["string","null"],"format":"uuid"}},"required":["primary_meal_space_id"],"additionalProperties":false},{"type":"object","properties":{"default_timezone":{"$ref":"#/components/schemas/PlanningTimezone"}},"required":["default_timezone"],"additionalProperties":false}]},"TrialOffer":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["available"]},"ends_on":{"type":"string","format":"date"},"restores_sponsorship":{"type":"boolean"}},"required":["status","ends_on","restores_sponsorship"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["active"]},"started_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"}},"required":["status","started_at","ends_at"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["unavailable"]},"reason":{"type":"string","enum":["already_used","pro_active","sponsorship_limit"]}},"required":["status","reason"],"additionalProperties":false}]},"TrialActivation":{"type":"object","properties":{"started_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"}},"required":["started_at","ends_at"],"additionalProperties":false},"ActivateTrialRequest":{"type":"object","properties":{"confirmed_end_date":{"type":"string","format":"date"}},"required":["confirmed_end_date"],"additionalProperties":false},"SyncAccessPage":{"type":"object","properties":{"protocol_version":{"type":"number","enum":[1]},"projection_version":{"type":"number","enum":[1]},"scan_id":{"type":"string","format":"uuid"},"access_revision":{"$ref":"#/components/schemas/AccessRevision"},"items":{"type":"array","items":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid"},"membership_id":{"type":"string","format":"uuid"}},"required":["group_id","membership_id"],"additionalProperties":false},"maxItems":100},"server_time":{"type":"string","format":"date-time"},"valid_until":{"type":"string","format":"date-time"},"next_cursor":{"$ref":"#/components/schemas/AccessCursor"},"complete":{"type":"boolean"}},"required":["protocol_version","projection_version","scan_id","access_revision","items","server_time","valid_until","next_cursor","complete"],"additionalProperties":false},"AccessRevision":{"type":"string","pattern":"^(0|[1-9][0-9]{0,18})$"},"AccessCursor":{"type":["string","null"],"maxLength":4096,"pattern":"^1\\.[0-9a-f]+\\.[0-9a-f]{64}$"},"SyncView":{"type":"object","properties":{"from":{"$ref":"#/components/schemas/EntryDate"},"until":{"$ref":"#/components/schemas/EntryDate"},"planning_timezone":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z][A-Za-z0-9_+\\-/]*$"}},"required":["from","until","planning_timezone"],"additionalProperties":false},"EntryDate":{"type":"string"},"SnapshotStarted":{"type":"object","properties":{"captured_head":{"$ref":"#/components/schemas/AccessRevision"},"snapshot_cursor":{"$ref":"#/components/schemas/DataCursor"},"delta_cursor":{"$ref":"#/components/schemas/DataCursor"}},"required":["captured_head","snapshot_cursor","delta_cursor"],"additionalProperties":false},"DataCursor":{"type":"string","maxLength":4096,"pattern":"^[1-9][0-9]{0,5}\\.[0-9a-f]+\\.[0-9a-f]{64}$"},"BeginSnapshot":{"anyOf":[{"type":"object","properties":{"protocol_version":{"type":"integer","exclusiveMinimum":0},"projection_version":{"type":"integer","exclusiveMinimum":0},"group_id":{"type":"string","format":"uuid"},"membership_id":{"type":"string","format":"uuid"},"stream":{"type":"string","enum":["shared","actor_private"]},"from":{"$ref":"#/components/schemas/EntryDate"},"until":{"$ref":"#/components/schemas/EntryDate"},"planning_timezone":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z][A-Za-z0-9_+\\-/]*$"}},"required":["protocol_version","projection_version","group_id","membership_id","stream","from","until","planning_timezone"],"additionalProperties":false},{"type":"object","properties":{"protocol_version":{"type":"integer","exclusiveMinimum":0},"projection_version":{"type":"integer","exclusiveMinimum":0},"group_id":{"type":"string","format":"uuid"},"membership_id":{"type":"string","format":"uuid"},"stream":{"type":"string","enum":["library","library_private"]}},"required":["protocol_version","projection_version","group_id","membership_id","stream"],"additionalProperties":false}]},"SnapshotPage":{"type":"object","properties":{"operations":{"type":"array","items":{"$ref":"#/components/schemas/SyncOperation"},"maxItems":200},"observed_through":{"$ref":"#/components/schemas/AccessRevision"},"next_cursor":{"allOf":[{"$ref":"#/components/schemas/DataCursor"},{"type":["string","null"]}]},"scan_complete":{"type":"boolean"}},"required":["operations","observed_through","next_cursor","scan_complete"],"additionalProperties":false},"SyncOperation":{"anyOf":[{"type":"object","properties":{"entity":{"type":"string","enum":["groups"]},"key":{"type":"array","prefixItems":[{"type":"string","format":"uuid"}]},"kind":{"type":"string","enum":["upsert"]},"row":{"$ref":"#/components/schemas/SpacePresentation"}},"required":["entity","key","kind","row"],"additionalProperties":false},{"type":"object","properties":{"entity":{"type":"string","enum":["meal_entries"]},"key":{"type":"array","prefixItems":[{"type":"string","format":"uuid"}]},"kind":{"type":"string","enum":["upsert"]},"row":{"$ref":"#/components/schemas/MealEntry"}},"required":["entity","key","kind","row"],"additionalProperties":false},{"type":"object","properties":{"entity":{"type":"string","enum":["recurring_meals"]},"key":{"type":"array","prefixItems":[{"type":"string","format":"uuid"}]},"kind":{"type":"string","enum":["upsert"]},"row":{"$ref":"#/components/schemas/SyncRecurringMeal"}},"required":["entity","key","kind","row"],"additionalProperties":false},{"type":"object","properties":{"entity":{"type":"string","enum":["user_group_prefs"]},"key":{"type":"array","prefixItems":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"}]},"kind":{"type":"string","enum":["upsert"]},"row":{"$ref":"#/components/schemas/SpacePreferences"}},"required":["entity","key","kind","row"],"additionalProperties":false},{"type":"object","properties":{"entity":{"type":"string","enum":["meal_space_tags"]},"key":{"type":"array","prefixItems":[{"type":"string","format":"uuid"}]},"kind":{"type":"string","enum":["upsert"]},"row":{"$ref":"#/components/schemas/SyncTag"}},"required":["entity","key","kind","row"],"additionalProperties":false},{"type":"object","properties":{"entity":{"type":"string","enum":["meal_ideas"]},"key":{"type":"array","prefixItems":[{"type":"string","format":"uuid"}]},"kind":{"type":"string","enum":["upsert"]},"row":{"$ref":"#/components/schemas/SyncIdea"}},"required":["entity","key","kind","row"],"additionalProperties":false},{"type":"object","properties":{"entity":{"type":"string","enum":["recipes"]},"key":{"type":"array","prefixItems":[{"type":"string","format":"uuid"}]},"kind":{"type":"string","enum":["upsert"]},"row":{"$ref":"#/components/schemas/SyncRecipe"}},"required":["entity","key","kind","row"],"additionalProperties":false},{"type":"object","properties":{"entity":{"type":"string","enum":["recipe_variations"]},"key":{"type":"array","prefixItems":[{"type":"string","format":"uuid"}]},"kind":{"type":"string","enum":["upsert"]},"row":{"$ref":"#/components/schemas/SyncVariation"}},"required":["entity","key","kind","row"],"additionalProperties":false},{"type":"object","properties":{"entity":{"type":"string","enum":["recipe_notes"]},"key":{"type":"array","prefixItems":[{"type":"string","format":"uuid"}]},"kind":{"type":"string","enum":["upsert"]},"row":{"$ref":"#/components/schemas/SyncNote"}},"required":["entity","key","kind","row"],"additionalProperties":false},{"type":"object","properties":{"entity":{"type":"string","enum":["recipe_nutrition"]},"key":{"type":"array","prefixItems":[{"type":"string","format":"uuid"}]},"kind":{"type":"string","enum":["upsert"]},"row":{"$ref":"#/components/schemas/SyncNutrition"}},"required":["entity","key","kind","row"],"additionalProperties":false},{"type":"object","properties":{"entity":{"type":"string","enum":["user_recipe_prefs"]},"key":{"type":"array","prefixItems":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"}]},"kind":{"type":"string","enum":["upsert"]},"row":{"$ref":"#/components/schemas/SyncRecipePref"}},"required":["entity","key","kind","row"],"additionalProperties":false},{"type":"object","properties":{"entity":{"type":"string","enum":["groups","meal_entries","recurring_meals","meal_space_tags","recipes","recipe_variations","recipe_notes","recipe_nutrition","meal_ideas"]},"key":{"type":"array","prefixItems":[{"type":"string","format":"uuid"}]},"kind":{"type":"string","enum":["remove"]}},"required":["entity","key","kind"],"additionalProperties":false},{"type":"object","properties":{"entity":{"type":"string","enum":["user_group_prefs","user_recipe_prefs"]},"key":{"type":"array","prefixItems":[{"type":"string","format":"uuid"},{"type":"string","format":"uuid"}]},"kind":{"type":"string","enum":["remove"]}},"required":["entity","key","kind"],"additionalProperties":false}]},"SpacePresentation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["personal","family","couple","roommates","trip","other"]},"name":{"type":"string","minLength":1},"color":{"$ref":"#/components/schemas/MealSpaceColor"},"planning_timezone":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z][A-Za-z0-9_+\\-/]*$"},"enabled_slots":{"type":"array","items":{"type":"string","enum":["breakfast","lunch","dinner","snack","dessert"]},"minItems":1,"maxItems":5}},"required":["id","type","name","color","planning_timezone","enabled_slots"],"additionalProperties":false},"MealEntry":{"type":"object","properties":{"entry_type":{"type":"string","enum":["simple","recipe","leftovers","eating_out","placeholder","prep"]},"slot":{"type":["string","null"],"enum":["breakfast","lunch","dinner","snack","dessert",null]},"title":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":"string","maxLength":10000},"leftover_of_entry_id":{"type":["string","null"],"format":"uuid"},"status":{"type":"string","enum":["planned","completed","skipped","replaced"]},"recipe_id":{"type":["string","null"],"format":"uuid"},"variation_id":{"type":["string","null"],"format":"uuid"},"target_yield_quantity":{"type":["number","null"],"exclusiveMinimum":0,"maximum":100000},"target_yield_unit":{"type":["string","null"],"minLength":1,"maxLength":50},"id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"entry_date":{"$ref":"#/components/schemas/EntryDate"},"position_value":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[0-9A-Za-z]+$"},"replaced_by_entry_id":{"type":["string","null"],"format":"uuid"},"created_by":{"type":["string","null"],"format":"uuid"},"updated_by":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"client_updated_at":{"type":"string","format":"date-time"},"revision":{"$ref":"#/components/schemas/AccessRevision"},"variation_name_snapshot":{"type":["string","null"]},"recurring_meal_id":{"type":["string","null"],"format":"uuid"},"recurrence_origin_id":{"type":["string","null"],"format":"uuid"}},"required":["entry_type","slot","title","notes","leftover_of_entry_id","status","id","group_id","entry_date","position_value","replaced_by_entry_id","created_by","updated_by","created_at","updated_at","client_updated_at","revision","recurring_meal_id","recurrence_origin_id"],"additionalProperties":false},"SyncRecurringMeal":{"type":"object","properties":{"entry_type":{"type":"string","enum":["simple","recipe","eating_out","prep"]},"slot":{"type":["string","null"],"enum":["breakfast","lunch","dinner","snack","dessert",null]},"title":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":"string","maxLength":10000},"recipe_id":{"type":["string","null"],"format":"uuid"},"variation_id":{"type":["string","null"],"format":"uuid"},"target_yield_quantity":{"type":["number","null"],"exclusiveMinimum":0,"maximum":100000},"target_yield_unit":{"type":["string","null"],"minLength":1},"id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"interval_unit":{"type":"string","enum":["day","week"]},"interval_count":{"type":"integer"},"starts_on":{"$ref":"#/components/schemas/EntryDate"},"generate_from":{"$ref":"#/components/schemas/EntryDate"},"ends_on":{"allOf":[{"$ref":"#/components/schemas/EntryDate"},{"type":["string","null"]}]},"paused_at":{"type":["string","null"],"format":"date-time"},"entitlement_suspended_at":{"type":["string","null"],"format":"date-time"},"entitlement_suspension_reason":{"type":["string","null"],"enum":["personal_pro_ended"]},"source_entry_id":{"type":["string","null"],"format":"uuid"},"variation_name_snapshot":{"type":["string","null"]},"created_by":{"type":["string","null"],"format":"uuid"},"updated_by":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"skipped_dates":{"type":"array","items":{"$ref":"#/components/schemas/EntryDate"}}},"required":["entry_type","slot","title","notes","recipe_id","variation_id","target_yield_quantity","target_yield_unit","id","group_id","interval_unit","interval_count","starts_on","generate_from","ends_on","paused_at","entitlement_suspended_at","entitlement_suspension_reason","source_entry_id","variation_name_snapshot","created_by","updated_by","created_at","updated_at","skipped_dates"],"additionalProperties":false},"SpacePreferences":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"is_visible":{"type":"boolean"},"sort_order":{"type":"string","pattern":"^[0-9A-Za-z]{1,64}$"}},"required":["user_id","group_id","is_visible","sort_order"],"additionalProperties":false},"SyncTag":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"display_name":{"type":"string"}},"required":["id","group_id","display_name"],"additionalProperties":false},"SyncIdea":{"type":"object","properties":{"title":{"type":"string"},"notes":{"type":"string"},"tags":{"type":"array","items":{"type":"string"},"maxItems":200},"recipe_id":{"type":["string","null"],"format":"uuid"},"variation_id":{"type":["string","null"],"format":"uuid"},"kind":{"$ref":"#/components/schemas/IdeaKind"},"id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"source":{"type":"string","enum":["user","ai"]},"position_value":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[0-9A-Za-z]+$"},"created_by":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"client_updated_at":{"type":"string","format":"date-time"},"archived_at":{"type":["string","null"],"format":"date-time"}},"required":["title","notes","tags","recipe_id","variation_id","kind","id","group_id","source","position_value","created_by","created_at","updated_at","client_updated_at"],"additionalProperties":false},"IdeaKind":{"type":"string","enum":["meal","recipe","eating_out"]},"SyncRecipe":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"ingredients":{"type":"array","items":{"$ref":"#/components/schemas/RecipeIngredientRow"},"maxItems":1000},"instructions":{"type":"array","items":{"$ref":"#/components/schemas/RecipeInstructionRow"},"maxItems":1000},"prep_minutes":{"type":["number","null"]},"cook_minutes":{"type":["number","null"]},"total_minutes":{"type":["number","null"]},"yield_quantity":{"type":["number","null"]},"yield_unit":{"type":["string","null"]},"source_url":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"},"maxItems":200},"category":{"type":["string","null"],"enum":["breakfast","lunch","dinner","dessert","drink","snack","side",null]},"image":{"$ref":"#/components/schemas/RecipeImage"},"id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"source_host":{"type":["string","null"]},"import_source":{"type":"string","enum":["manual","url","paste","ai"]},"created_by":{"type":["string","null"],"format":"uuid"},"updated_by":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"client_updated_at":{"type":"string","format":"date-time"},"revision":{"$ref":"#/components/schemas/AccessRevision"},"last_explicit_use_at":{"type":["string","null"],"format":"date-time"}},"required":["title","description","ingredients","instructions","prep_minutes","cook_minutes","total_minutes","yield_quantity","yield_unit","source_url","tags","image","id","group_id","source_host","import_source","created_by","updated_by","created_at","updated_at","client_updated_at","revision","last_explicit_use_at"],"additionalProperties":false},"RecipeIngredientRow":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["section"]},"heading":{"type":"string"}},"required":["kind","heading"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["ingredient"]},"text":{"type":"string"}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["ingredient"]},"text":{"type":"string"},"quantity_source":{"type":"string","enum":["user"]},"qty":{"type":"number","exclusiveMinimum":0,"maximum":100000},"qty_max":{"type":"number","exclusiveMinimum":0,"maximum":100000},"unit":{"type":"string"},"package_quantity":{"type":"number","exclusiveMinimum":0,"maximum":100000},"package_unit":{"type":"string"}},"required":["kind","text","quantity_source","qty"],"additionalProperties":false}]},"RecipeInstructionRow":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["section"]},"heading":{"type":"string"}},"required":["kind","heading"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["step"]},"text":{"type":"string"},"image":{"$ref":"#/components/schemas/RecipeStepImage"}},"required":["kind","text"],"additionalProperties":false}]},"RecipeStepImage":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"width":{"type":"integer","minimum":1,"maximum":2400},"height":{"type":"integer","minimum":1,"maximum":2400}},"required":["id","width","height"],"additionalProperties":false},"RecipeImage":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"crop":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"zoom":{"type":"number","minimum":1,"maximum":4}},"required":["x","y","zoom"],"additionalProperties":false}},"required":["id"],"additionalProperties":false},"SyncVariation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipe_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"kind":{"$ref":"#/components/schemas/VariationKind"},"owner_membership_id":{"type":["string","null"],"format":"uuid"},"overrides":{"$ref":"#/components/schemas/VariationOverrides"},"tags_override_state":{"type":"string","enum":["inherit","replace","clear"]},"tags":{"type":"array","items":{"type":"string"}},"archived_at":{"type":["string","null"],"format":"date-time"},"created_by":{"type":["string","null"],"format":"uuid"},"updated_by":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"client_updated_at":{"type":"string","format":"date-time"}},"required":["id","recipe_id","group_id","name","kind","owner_membership_id","overrides","tags_override_state","tags","archived_at","created_by","updated_by","created_at","updated_at","client_updated_at"],"additionalProperties":false},"VariationKind":{"type":"string","enum":["version","trial"]},"VariationOverrides":{"type":"object","properties":{"description":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["clear"]}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","enum":["replace"]},"value":{"type":"string"}},"required":["state","value"],"additionalProperties":false}]},"ingredients":{"anyOf":[{"$ref":"#/components/schemas/VariationIngredientsPatch"},{"type":"object","properties":{"state":{"type":"string","enum":["clear"]}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","enum":["replace"]},"value":{"type":"array","items":{"$ref":"#/components/schemas/RecipeIngredientRow"},"maxItems":1000}},"required":["state","value"],"additionalProperties":false}]},"instructions":{"anyOf":[{"$ref":"#/components/schemas/VariationInstructionsPatch"},{"type":"object","properties":{"state":{"type":"string","enum":["clear"]}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","enum":["replace"]},"value":{"type":"array","items":{"$ref":"#/components/schemas/RecipeInstructionRow"},"maxItems":1000}},"required":["state","value"],"additionalProperties":false}]},"prep_minutes":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["clear"]}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","enum":["replace"]},"value":{"type":"integer","minimum":0}},"required":["state","value"],"additionalProperties":false}]},"cook_minutes":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["clear"]}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","enum":["replace"]},"value":{"type":"integer","minimum":0}},"required":["state","value"],"additionalProperties":false}]},"total_minutes":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["clear"]}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","enum":["replace"]},"value":{"type":"integer","minimum":0}},"required":["state","value"],"additionalProperties":false}]},"yield":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["clear"]}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","enum":["replace"]},"value":{"type":"object","properties":{"quantity":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string"}},"required":["quantity","unit"],"additionalProperties":false}},"required":["state","value"],"additionalProperties":false}]},"image":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["clear"]}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","enum":["replace"]},"value":{"$ref":"#/components/schemas/RecipeImage"}},"required":["state","value"],"additionalProperties":false}]}},"additionalProperties":false},"VariationIngredientsPatch":{"type":"object","properties":{"state":{"type":"string","enum":["patch"]},"changes":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"op":{"type":"string","enum":["change"]},"at":{"$ref":"#/components/schemas/VariationLineTarget"},"after":{"$ref":"#/components/schemas/VariationLineRef"},"row":{"$ref":"#/components/schemas/RecipeIngredientLine"}},"required":["op","at","after","row"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","enum":["remove"]},"at":{"$ref":"#/components/schemas/VariationLineTarget"},"after":{"$ref":"#/components/schemas/VariationLineRef"}},"required":["op","at","after"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","enum":["add"]},"after":{"$ref":"#/components/schemas/VariationLineRef"},"row":{"$ref":"#/components/schemas/RecipeIngredientLine"}},"required":["op","after","row"],"additionalProperties":false}]},"minItems":1,"maxItems":1000}},"required":["state","changes"],"additionalProperties":false},"VariationLineTarget":{"type":"object","properties":{"line":{"type":"string"},"n":{"type":"integer","minimum":1,"maximum":9999}},"required":["line"],"additionalProperties":false},"VariationLineRef":{"anyOf":[{"$ref":"#/components/schemas/VariationLineTarget"},{"type":"object","properties":{"section":{"type":"string"},"n":{"type":"integer","minimum":1,"maximum":9999}},"required":["section"],"additionalProperties":false},{"type":"null"}]},"RecipeIngredientLine":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["ingredient"]},"text":{"type":"string"}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["ingredient"]},"text":{"type":"string"},"quantity_source":{"type":"string","enum":["user"]},"qty":{"type":"number","exclusiveMinimum":0,"maximum":100000},"qty_max":{"type":"number","exclusiveMinimum":0,"maximum":100000},"unit":{"type":"string"},"package_quantity":{"type":"number","exclusiveMinimum":0,"maximum":100000},"package_unit":{"type":"string"}},"required":["kind","text","quantity_source","qty"],"additionalProperties":false}]},"VariationInstructionsPatch":{"type":"object","properties":{"state":{"type":"string","enum":["patch"]},"changes":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"op":{"type":"string","enum":["change"]},"at":{"$ref":"#/components/schemas/VariationLineTarget"},"after":{"$ref":"#/components/schemas/VariationLineRef"},"row":{"$ref":"#/components/schemas/RecipeStep"}},"required":["op","at","after","row"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","enum":["remove"]},"at":{"$ref":"#/components/schemas/VariationLineTarget"},"after":{"$ref":"#/components/schemas/VariationLineRef"}},"required":["op","at","after"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","enum":["add"]},"after":{"$ref":"#/components/schemas/VariationLineRef"},"row":{"$ref":"#/components/schemas/RecipeStep"}},"required":["op","after","row"],"additionalProperties":false}]},"minItems":1,"maxItems":1000}},"required":["state","changes"],"additionalProperties":false},"RecipeStep":{"type":"object","properties":{"kind":{"type":"string","enum":["step"]},"text":{"type":"string"},"image":{"$ref":"#/components/schemas/RecipeStepImage"}},"required":["kind","text"],"additionalProperties":false},"SyncNote":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipe_id":{"type":"string","format":"uuid"},"variation_id":{"type":["string","null"],"format":"uuid"},"scope":{"type":"string","enum":["general","variation"]},"body":{"type":"string"},"attribution_kind":{"type":"string","enum":["member","copied"]},"creator_name":{"type":"string"},"created_by":{"type":["string","null"],"format":"uuid"},"updated_by":{"type":["string","null"],"format":"uuid"},"edited":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"group_id":{"type":"string","format":"uuid"}},"required":["id","recipe_id","variation_id","scope","body","attribution_kind","creator_name","created_by","updated_by","edited","created_at","updated_at","group_id"],"additionalProperties":false},"SyncNutrition":{"type":"object","properties":{"group_id":{"type":"string","format":"uuid"},"recipe_id":{"type":"string","format":"uuid"},"variation_id":{"type":["string","null"],"format":"uuid"},"version":{"type":"integer","minimum":1},"input_key":{"type":"string","pattern":"^[a-f0-9]{64}$"},"algorithm_version":{"type":"string","enum":["ai-usda-v1"]},"totals":{"$ref":"#/components/schemas/Nutrients"},"overrides":{"$ref":"#/components/schemas/NutrientOverrides"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/RecipeNutritionLine"},"maxItems":256},"generated_by":{"type":["string","null"],"format":"uuid"},"generated_at":{"type":"string","format":"date-time"},"edited_by":{"type":["string","null"],"format":"uuid"},"edited_at":{"type":["string","null"],"format":"date-time"},"id":{"type":"string","format":"uuid"}},"required":["group_id","recipe_id","variation_id","version","input_key","algorithm_version","totals","overrides","lines","generated_by","generated_at","edited_by","edited_at","id"],"additionalProperties":false},"Nutrients":{"type":"object","properties":{"calories_kcal":{"type":"number","minimum":0},"protein_g":{"type":"number","minimum":0},"carbohydrate_g":{"type":"number","minimum":0},"fat_g":{"type":"number","minimum":0},"sugar_g":{"type":"number","minimum":0},"fiber_g":{"type":"number","minimum":0},"sodium_mg":{"type":"number","minimum":0}},"required":["calories_kcal","protein_g","carbohydrate_g","fat_g","sugar_g","fiber_g","sodium_mg"],"additionalProperties":false},"NutrientOverrides":{"type":"object","properties":{"calories_kcal":{"type":"number","minimum":0},"protein_g":{"type":"number","minimum":0},"carbohydrate_g":{"type":"number","minimum":0},"fat_g":{"type":"number","minimum":0},"sugar_g":{"type":"number","minimum":0},"fiber_g":{"type":"number","minimum":0},"sodium_mg":{"type":"number","minimum":0}},"additionalProperties":false},"RecipeNutritionLine":{"oneOf":[{"type":"object","properties":{"row_index":{"type":"integer","minimum":0},"kind":{"type":"string","enum":["usda"]},"fdc_id":{"type":"integer","exclusiveMinimum":0},"description":{"type":"string","minLength":1,"maxLength":2048},"grams":{"type":"number","exclusiveMinimum":0,"maximum":5000}},"required":["row_index","kind","fdc_id","description","grams"],"additionalProperties":false},{"type":"object","properties":{"row_index":{"type":"integer","minimum":0},"kind":{"type":"string","enum":["ai_estimate"]},"grams":{"type":"number","exclusiveMinimum":0,"maximum":5000}},"required":["row_index","kind","grams"],"additionalProperties":false},{"type":"object","properties":{"row_index":{"type":"integer","minimum":0},"kind":{"type":"string","enum":["excluded"]},"reason":{"type":"string","enum":["not_food","no_basis","to_taste_only","limit"]}},"required":["row_index","kind","reason"],"additionalProperties":false}]},"SyncRecipePref":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid"},"recipe_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"is_favorite":{"type":"boolean"},"preferred_variation_id":{"type":["string","null"],"format":"uuid"}},"required":["user_id","recipe_id","group_id","is_favorite","preferred_variation_id"],"additionalProperties":false},"DeltaPage":{"type":"object","properties":{"operations":{"type":"array","items":{"$ref":"#/components/schemas/SyncOperation"},"maxItems":200},"observed_through":{"$ref":"#/components/schemas/AccessRevision"},"next_cursor":{"$ref":"#/components/schemas/DataCursor"},"caught_up":{"type":"boolean"}},"required":["operations","observed_through","next_cursor","caught_up"],"additionalProperties":false},"PushResult":{"type":"object","properties":{"accepted":{"type":"array","items":{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"result":{"anyOf":[{"$ref":"#/components/schemas/EntryCommandResult"},{"$ref":"#/components/schemas/IdeaCommandResult"},{"$ref":"#/components/schemas/RecurrenceCommandResult"},{"$ref":"#/components/schemas/RecipeCreateResult"},{"type":"object","properties":{"outcome":{"type":"string","enum":["applied","unchanged"]},"recipe_id":{"type":"string","format":"uuid"},"revision":{"$ref":"#/components/schemas/AccessRevision"}},"required":["outcome","recipe_id","revision"],"additionalProperties":false},{"$ref":"#/components/schemas/RecipeDeleteResult"},{"$ref":"#/components/schemas/VariationCommandResult"},{"$ref":"#/components/schemas/NoteCommandResult"}]}},"required":["operation_id","result"],"additionalProperties":false},"maxItems":50},"rejected":{"type":"array","items":{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"class":{"type":"string","enum":["access_denied","domain_conflict","validation_failed"]},"reason":{"type":"string","enum":["not_found","forbidden","membership_changed","conflict","invalid_input","recipe_conflict","capacity_reached"]},"collisions":{"type":"array","items":{"type":"string","enum":["title","description","prep_minutes","cook_minutes","total_minutes","yield","source_url","ingredients","instructions","tags","image","category"]},"minItems":1}},"required":["operation_id","class","reason"],"additionalProperties":false},"maxItems":50}},"required":["accepted","rejected"],"additionalProperties":false},"EntryCommandResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["applied","unchanged","stale"]},"entry_id":{"type":"string","format":"uuid"},"replacement_id":{"type":["string","null"],"format":"uuid"}},"required":["outcome","entry_id","replacement_id"],"additionalProperties":false},"IdeaCommandResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["applied","unchanged","stale"]},"idea_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"membership_id":{"type":"string","format":"uuid"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["outcome","idea_id","group_id","membership_id","updated_at"],"additionalProperties":false},"RecurrenceCommandResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["applied","unchanged","stale"]},"recurring_meal_id":{"type":"string","format":"uuid"},"updated_at":{"type":["string","null"],"format":"date-time"},"entries":{"$ref":"#/components/schemas/RecurrenceEntryCounts"}},"required":["outcome","recurring_meal_id","updated_at","entries"],"additionalProperties":false},"RecurrenceEntryCounts":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"removed":{"type":"integer","minimum":0},"detached":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0}},"required":["created","updated","removed","detached","skipped"],"additionalProperties":false},"RecipeCreateResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["applied"]},"recipe_id":{"type":"string","format":"uuid"},"revision":{"$ref":"#/components/schemas/AccessRevision"},"source_match_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":20}},"required":["outcome","recipe_id","revision","source_match_ids"],"additionalProperties":false},"RecipeDeleteResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["applied","stale"]},"recipe_id":{"type":"string","format":"uuid"}},"required":["outcome","recipe_id"],"additionalProperties":false},"VariationCommandResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["applied","unchanged","stale","archived","deleted"]},"variation_id":{"type":"string","format":"uuid"}},"required":["outcome","variation_id"],"additionalProperties":false},"NoteCommandResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["applied","unchanged","stale"]},"note_id":{"type":"string","format":"uuid"}},"required":["outcome","note_id"],"additionalProperties":false},"SyncPush":{"type":"object","properties":{"commands":{"type":"array","items":{"$ref":"#/components/schemas/SyncCommand"},"minItems":1,"maxItems":50}},"required":["commands"],"additionalProperties":false},"SyncCommand":{"oneOf":[{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"idea_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["idea_create"]},"input":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"content":{"$ref":"#/components/schemas/IdeaContent"},"recipe_id":{"type":["string","null"],"format":"uuid"},"variation_id":{"type":["string","null"],"format":"uuid"},"kind":{"$ref":"#/components/schemas/IdeaKind"}},"required":["membership_id","client_updated_at","content","recipe_id","variation_id"],"additionalProperties":false}},"required":["operation_id","group_id","idea_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"idea_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["idea_edit"]},"input":{"$ref":"#/components/schemas/EditIdeaRequest"}},"required":["operation_id","group_id","idea_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"idea_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["idea_delete"]},"input":{"$ref":"#/components/schemas/DeleteIdeaRequest"}},"required":["operation_id","group_id","idea_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"idea_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["idea_archive"]},"input":{"$ref":"#/components/schemas/ArchiveIdeaRequest"}},"required":["operation_id","group_id","idea_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"idea_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["idea_restore"]},"input":{"$ref":"#/components/schemas/RestoreIdeaRequest"}},"required":["operation_id","group_id","idea_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"idea_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["idea_link"]},"input":{"$ref":"#/components/schemas/LinkIdeaRequest"}},"required":["operation_id","group_id","idea_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"idea_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["idea_reorder"]},"input":{"$ref":"#/components/schemas/ReorderIdeaRequest"}},"required":["operation_id","group_id","idea_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"recurring_meal_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["recurrence_create"]},"input":{"$ref":"#/components/schemas/CreateRecurringMealRequest"}},"required":["operation_id","group_id","recurring_meal_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"recurring_meal_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["recurrence_edit"]},"input":{"$ref":"#/components/schemas/EditRecurringMealRequest"}},"required":["operation_id","group_id","recurring_meal_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"recurring_meal_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["recurrence_pause"]},"input":{"$ref":"#/components/schemas/PauseRecurringMealRequest"}},"required":["operation_id","group_id","recurring_meal_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"recurring_meal_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["recurrence_resume"]},"input":{"$ref":"#/components/schemas/ResumeRecurringMealRequest"}},"required":["operation_id","group_id","recurring_meal_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"recurring_meal_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["recurrence_end"]},"input":{"$ref":"#/components/schemas/EndRecurringMealRequest"}},"required":["operation_id","group_id","recurring_meal_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"recurring_meal_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["recurrence_delete"]},"input":{"$ref":"#/components/schemas/DeleteRecurringMealRequest"}},"required":["operation_id","group_id","recurring_meal_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"recurring_meal_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["recurrence_skip"]},"input":{"$ref":"#/components/schemas/OccurrenceRequest"}},"required":["operation_id","group_id","recurring_meal_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"recurring_meal_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["recurrence_restore"]},"input":{"$ref":"#/components/schemas/OccurrenceRequest"}},"required":["operation_id","group_id","recurring_meal_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"entry_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["create"]},"input":{"$ref":"#/components/schemas/CreateEntryRequest"}},"required":["operation_id","group_id","entry_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"entry_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["edit"]},"input":{"$ref":"#/components/schemas/EditEntryRequest"}},"required":["operation_id","group_id","entry_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"entry_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["move"]},"input":{"$ref":"#/components/schemas/MoveEntryRequest"}},"required":["operation_id","group_id","entry_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"entry_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["reorder"]},"input":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"entry_date":{"$ref":"#/components/schemas/EntryDate"},"slot":{"type":["string","null"],"enum":["breakfast","lunch","dinner","snack","dessert",null]},"anchor_entry_id":{"type":"string","format":"uuid"},"side":{"type":"string","enum":["before","after"]}},"required":["membership_id","client_updated_at","entry_date","slot","anchor_entry_id","side"],"additionalProperties":false}},"required":["operation_id","group_id","entry_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"entry_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["replace"]},"input":{"$ref":"#/components/schemas/ReplaceEntryRequest"}},"required":["operation_id","group_id","entry_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"entry_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["delete"]},"input":{"$ref":"#/components/schemas/DeleteEntryRequest"}},"required":["operation_id","group_id","entry_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"recipe_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["recipe_create"]},"input":{"$ref":"#/components/schemas/CreateRecipeRequest"}},"required":["operation_id","group_id","recipe_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"recipe_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["recipe_edit"]},"input":{"$ref":"#/components/schemas/EditRecipeRequest"}},"required":["operation_id","group_id","recipe_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"recipe_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["recipe_delete"]},"input":{"$ref":"#/components/schemas/DeleteRecipeRequest"}},"required":["operation_id","group_id","recipe_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"recipe_id":{"type":"string","format":"uuid"},"variation_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["variation_create"]},"input":{"$ref":"#/components/schemas/CreateRecipeVariationRequest"}},"required":["operation_id","group_id","recipe_id","variation_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"variation_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["variation_update"]},"input":{"$ref":"#/components/schemas/UpdateRecipeVariationRequest"}},"required":["operation_id","group_id","variation_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"variation_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["variation_remove"]},"input":{"$ref":"#/components/schemas/RemoveRecipeVariationRequest"}},"required":["operation_id","group_id","variation_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"variation_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["variation_restore"]},"input":{"$ref":"#/components/schemas/VariationLifecycleRequest"}},"required":["operation_id","group_id","variation_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"recipe_id":{"type":"string","format":"uuid"},"note_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["note_create"]},"input":{"$ref":"#/components/schemas/CreateRecipeNoteRequest"}},"required":["operation_id","group_id","recipe_id","note_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"note_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["note_update"]},"input":{"$ref":"#/components/schemas/UpdateRecipeNoteRequest"}},"required":["operation_id","group_id","note_id","kind","input"],"additionalProperties":false},{"type":"object","properties":{"operation_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"note_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["note_delete"]},"input":{"$ref":"#/components/schemas/DeleteRecipeNoteRequest"}},"required":["operation_id","group_id","note_id","kind","input"],"additionalProperties":false}]},"IdeaContent":{"type":"object","properties":{"title":{"type":"string"},"notes":{"type":"string"},"tags":{"type":"array","items":{"type":"string"},"maxItems":200}},"required":["title","notes","tags"],"additionalProperties":false},"EditIdeaRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"content":{"$ref":"#/components/schemas/IdeaContent"},"kind":{"$ref":"#/components/schemas/IdeaKind"}},"required":["membership_id","client_updated_at","content"],"additionalProperties":false},"DeleteIdeaRequest":{"anyOf":[{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"expected_updated_at":{"type":"string","format":"date-time"}},"required":["membership_id","client_updated_at","expected_updated_at"],"additionalProperties":false},{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"expected_command_id":{"type":"string","format":"uuid"}},"required":["membership_id","client_updated_at","expected_command_id"],"additionalProperties":false}]},"ArchiveIdeaRequest":{"anyOf":[{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"expected_updated_at":{"type":"string","format":"date-time"}},"required":["membership_id","client_updated_at","expected_updated_at"],"additionalProperties":false},{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"expected_command_id":{"type":"string","format":"uuid"}},"required":["membership_id","client_updated_at","expected_command_id"],"additionalProperties":false}]},"RestoreIdeaRequest":{"anyOf":[{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"expected_updated_at":{"type":"string","format":"date-time"}},"required":["membership_id","client_updated_at","expected_updated_at"],"additionalProperties":false},{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"expected_command_id":{"type":"string","format":"uuid"}},"required":["membership_id","client_updated_at","expected_command_id"],"additionalProperties":false}]},"LinkIdeaRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"recipe_id":{"type":["string","null"],"format":"uuid"},"variation_id":{"type":["string","null"],"format":"uuid"}},"required":["membership_id","client_updated_at","recipe_id","variation_id"],"additionalProperties":false},"ReorderIdeaRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"anchor_idea_id":{"type":"string","format":"uuid"},"side":{"type":"string","enum":["before","after"]},"context":{"$ref":"#/components/schemas/IdeaOrderContext"}},"required":["membership_id","client_updated_at","anchor_idea_id","side","context"],"additionalProperties":false},"IdeaOrderContext":{"type":"object","properties":{"q":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"complete":{"type":"boolean"}},"required":["q","tags","complete"],"additionalProperties":false},"CreateRecurringMealRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"recurring_meal_id":{"type":"string","format":"uuid"},"source_entry_id":{"type":"string","format":"uuid"},"expected_entry_clock":{"type":"string","format":"date-time"},"interval_unit":{"type":"string","enum":["day","week"]},"interval_count":{"type":"integer"},"skip_dates":{"type":"array","items":{"$ref":"#/components/schemas/EntryDate"},"maxItems":49},"source":{"type":"object","properties":{"entry_type":{"type":"string","enum":["simple","recipe","eating_out","prep"]},"slot":{"type":["string","null"],"enum":["breakfast","lunch","dinner","snack","dessert",null]},"title":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":"string","maxLength":10000},"recipe_id":{"type":["string","null"],"format":"uuid"},"variation_id":{"type":["string","null"],"format":"uuid"},"target_yield_quantity":{"type":["number","null"],"exclusiveMinimum":0,"maximum":100000},"target_yield_unit":{"type":["string","null"],"minLength":1},"entry_date":{"$ref":"#/components/schemas/EntryDate"}},"required":["entry_type","slot","title","notes","recipe_id","variation_id","target_yield_quantity","target_yield_unit","entry_date"],"additionalProperties":false}},"required":["membership_id","recurring_meal_id","source_entry_id","expected_entry_clock","interval_unit","interval_count"],"additionalProperties":false},"EditRecurringMealRequest":{"type":"object","properties":{"entry_type":{"type":"string","enum":["simple","recipe","eating_out","prep"]},"slot":{"type":["string","null"],"enum":["breakfast","lunch","dinner","snack","dessert",null]},"title":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":"string","maxLength":10000},"recipe_id":{"type":["string","null"],"format":"uuid"},"variation_id":{"type":["string","null"],"format":"uuid"},"target_yield_quantity":{"type":["number","null"],"exclusiveMinimum":0,"maximum":100000},"target_yield_unit":{"type":["string","null"],"minLength":1},"membership_id":{"type":"string","format":"uuid"},"expected_updated_at":{"type":"string","format":"date-time"},"schedule":{"$ref":"#/components/schemas/RecurrenceSchedule"},"ends_on":{"allOf":[{"$ref":"#/components/schemas/EntryDate"},{"type":["string","null"]}]},"skip_dates":{"type":"array","items":{"$ref":"#/components/schemas/EntryDate"},"maxItems":49}},"required":["entry_type","slot","title","notes","recipe_id","variation_id","target_yield_quantity","target_yield_unit","membership_id","expected_updated_at"],"additionalProperties":false},"RecurrenceSchedule":{"type":"object","properties":{"interval_unit":{"type":"string","enum":["day","week"]},"interval_count":{"type":"integer"},"starts_on":{"$ref":"#/components/schemas/EntryDate"}},"required":["interval_unit","interval_count","starts_on"],"additionalProperties":false},"PauseRecurringMealRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"}},"required":["membership_id"],"additionalProperties":false},"ResumeRecurringMealRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"resume_on":{"$ref":"#/components/schemas/EntryDate"}},"required":["membership_id"],"additionalProperties":false},"EndRecurringMealRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"ends_on":{"$ref":"#/components/schemas/EntryDate"}},"required":["membership_id"],"additionalProperties":false},"DeleteRecurringMealRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"expected_updated_at":{"type":"string","format":"date-time"}},"required":["membership_id","expected_updated_at"],"additionalProperties":false},"OccurrenceRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"occurrence_date":{"$ref":"#/components/schemas/EntryDate"}},"required":["membership_id","occurrence_date"],"additionalProperties":false},"CreateEntryRequest":{"type":"object","properties":{"source_idea_id":{"type":"string","format":"uuid"},"entry_type":{"type":"string","enum":["simple","recipe","leftovers","eating_out","placeholder","prep"]},"slot":{"type":["string","null"],"enum":["breakfast","lunch","dinner","snack","dessert",null]},"title":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":"string","maxLength":10000},"leftover_of_entry_id":{"type":["string","null"],"format":"uuid"},"status":{"type":"string","enum":["planned","completed","skipped"]},"recipe_id":{"type":["string","null"],"format":"uuid"},"variation_id":{"type":["string","null"],"format":"uuid"},"target_yield_quantity":{"type":["number","null"],"exclusiveMinimum":0,"maximum":100000},"target_yield_unit":{"type":["string","null"],"minLength":1,"maxLength":50},"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"entry_date":{"$ref":"#/components/schemas/EntryDate"},"position_value":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[0-9A-Za-z]+$"}},"required":["entry_type","slot","title","notes","leftover_of_entry_id","status","membership_id","client_updated_at","id","entry_date","position_value"],"additionalProperties":false},"EditEntryRequest":{"type":"object","properties":{"entry_type":{"type":"string","enum":["simple","recipe","leftovers","eating_out","placeholder","prep"]},"slot":{"type":["string","null"],"enum":["breakfast","lunch","dinner","snack","dessert",null]},"title":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":"string","maxLength":10000},"leftover_of_entry_id":{"type":["string","null"],"format":"uuid"},"status":{"type":"string","enum":["planned","completed","skipped","replaced"]},"recipe_id":{"type":["string","null"],"format":"uuid"},"variation_id":{"type":["string","null"],"format":"uuid"},"target_yield_quantity":{"type":["number","null"],"exclusiveMinimum":0,"maximum":100000},"target_yield_unit":{"type":["string","null"],"minLength":1,"maxLength":50},"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"}},"required":["entry_type","slot","title","notes","leftover_of_entry_id","status","membership_id","client_updated_at"],"additionalProperties":false},"MoveEntryRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"entry_date":{"$ref":"#/components/schemas/EntryDate"},"slot":{"type":["string","null"],"enum":["breakfast","lunch","dinner","snack","dessert",null]},"position_value":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[0-9A-Za-z]+$"}},"required":["membership_id","client_updated_at","entry_date","slot","position_value"],"additionalProperties":false},"ReplaceEntryRequest":{"type":"object","properties":{"entry_type":{"type":"string","enum":["simple","recipe","leftovers","eating_out","placeholder","prep"]},"slot":{"type":["string","null"],"enum":["breakfast","lunch","dinner","snack","dessert",null]},"title":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":"string","maxLength":10000},"leftover_of_entry_id":{"type":["string","null"],"format":"uuid"},"status":{"type":"string","enum":["planned","completed","skipped"]},"recipe_id":{"type":["string","null"],"format":"uuid"},"variation_id":{"type":["string","null"],"format":"uuid"},"target_yield_quantity":{"type":["number","null"],"exclusiveMinimum":0,"maximum":100000},"target_yield_unit":{"type":["string","null"],"minLength":1,"maxLength":50},"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"}},"required":["entry_type","slot","title","notes","leftover_of_entry_id","status","membership_id","client_updated_at","id"],"additionalProperties":false},"DeleteEntryRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"confirm_history":{"type":"boolean"}},"required":["membership_id","client_updated_at","confirm_history"],"additionalProperties":false},"CreateRecipeRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"import_source":{"type":"string","enum":["manual","url","paste","ai"]},"content":{"$ref":"#/components/schemas/RecipeContent"}},"required":["membership_id","client_updated_at","id","import_source","content"],"additionalProperties":false},"RecipeContent":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"ingredients":{"type":"array","items":{"$ref":"#/components/schemas/RecipeIngredientRow"},"maxItems":1000},"instructions":{"type":"array","items":{"$ref":"#/components/schemas/RecipeInstructionRow"},"maxItems":1000},"prep_minutes":{"type":["number","null"]},"cook_minutes":{"type":["number","null"]},"total_minutes":{"type":["number","null"]},"yield_quantity":{"type":["number","null"]},"yield_unit":{"type":["string","null"]},"source_url":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"},"maxItems":200},"category":{"type":["string","null"],"enum":["breakfast","lunch","dinner","dessert","drink","snack","side",null]},"image":{"$ref":"#/components/schemas/RecipeImage"}},"required":["title","description","ingredients","instructions","prep_minutes","cook_minutes","total_minutes","yield_quantity","yield_unit","source_url","tags"],"additionalProperties":false},"EditRecipeRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"opening_revision":{"$ref":"#/components/schemas/AccessRevision"},"opening":{"$ref":"#/components/schemas/RecipeContent"},"candidate":{"$ref":"#/components/schemas/RecipeContent"}},"required":["membership_id","client_updated_at","opening_revision","opening","candidate"],"additionalProperties":false},"DeleteRecipeRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"future_entries":{"type":"string","enum":["block","convert_to_simple","remove"]}},"required":["membership_id","client_updated_at"],"additionalProperties":false},"CreateRecipeVariationRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"overrides":{"$ref":"#/components/schemas/VariationOverrides"},"tags_override_state":{"type":"string","enum":["inherit","replace","clear"]},"tags":{"type":"array","items":{"type":"string","maxLength":50},"maxItems":200},"kind":{"$ref":"#/components/schemas/VariationKind"},"owner_membership_id":{"type":["string","null"],"format":"uuid"}},"required":["membership_id","client_updated_at","id","name","overrides","tags_override_state","tags"],"additionalProperties":false},"UpdateRecipeVariationRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"overrides":{"$ref":"#/components/schemas/VariationOverrides"},"tags_override_state":{"type":"string","enum":["inherit","replace","clear"]},"tags":{"type":"array","items":{"type":"string","maxLength":50},"maxItems":200},"kind":{"$ref":"#/components/schemas/VariationKind"},"owner_membership_id":{"type":["string","null"],"format":"uuid"},"variation_updated_at":{"type":"string","format":"date-time"}},"required":["membership_id","client_updated_at","name","overrides","tags_override_state","tags"],"additionalProperties":false},"RemoveRecipeVariationRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"move_notes_to_recipe":{"type":"boolean"}},"required":["membership_id","client_updated_at"],"additionalProperties":false},"VariationLifecycleRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"}},"required":["membership_id","client_updated_at"],"additionalProperties":false},"CreateRecipeNoteRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"body":{"type":"string"},"variation_id":{"type":["string","null"],"format":"uuid"}},"required":["membership_id","client_updated_at","id","body","variation_id"],"additionalProperties":false},"UpdateRecipeNoteRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"variation_id":{"type":["string","null"],"format":"uuid"}},"required":["membership_id","client_updated_at","body","variation_id"],"additionalProperties":false},"DeleteRecipeNoteRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"}},"required":["membership_id","client_updated_at"],"additionalProperties":false},"EntryPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MealEntry"},"maxItems":200},"next_after":{"type":["string","null"],"format":"uuid"}},"required":["items","next_after"],"additionalProperties":false},"ReorderEntryRequest":{"anyOf":[{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"entry_date":{"$ref":"#/components/schemas/EntryDate"},"slot":{"type":["string","null"],"enum":["breakfast","lunch","dinner","snack","dessert",null]},"direction":{"type":"string","enum":["up","down"]}},"required":["membership_id","client_updated_at","entry_date","slot","direction"],"additionalProperties":false},{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"entry_date":{"$ref":"#/components/schemas/EntryDate"},"slot":{"type":["string","null"],"enum":["breakfast","lunch","dinner","snack","dessert",null]},"anchor_entry_id":{"type":"string","format":"uuid"},"side":{"type":"string","enum":["before","after"]}},"required":["membership_id","client_updated_at","entry_date","slot","anchor_entry_id","side"],"additionalProperties":false}]},"PresentationResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["applied","unchanged","stale"]}},"required":["outcome"],"additionalProperties":false},"MoveSpaceOrder":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"direction":{"type":"string","enum":["up","down"]}},"required":["membership_id","client_updated_at","direction"],"additionalProperties":false},"TimelinePresentation":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"space":{"$ref":"#/components/schemas/SpacePresentation"},"preferences":{"$ref":"#/components/schemas/SpacePreferences"},"today":{"$ref":"#/components/schemas/EntryDate"}},"required":["membership_id","space","preferences","today"],"additionalProperties":false},"SetSpacePresentation":{"type":"object","properties":{"name":{"type":"string","minLength":1},"color":{"$ref":"#/components/schemas/MealSpaceColor"},"planning_timezone":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z][A-Za-z0-9_+\\-/]*$"},"enabled_slots":{"type":"array","items":{"type":"string","enum":["breakfast","lunch","dinner","snack","dessert"]},"minItems":1,"maxItems":5},"membership_id":{"type":"string","format":"uuid"}},"required":["name","color","planning_timezone","enabled_slots","membership_id"],"additionalProperties":false},"SetSpacePreferences":{"type":"object","properties":{"is_visible":{"type":"boolean"},"sort_order":{"type":"string","pattern":"^[0-9A-Za-z]{1,64}$"},"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"}},"required":["is_visible","membership_id","client_updated_at"],"additionalProperties":false},"RecipePage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/RecipeSummary"},"maxItems":50},"next_after":{"$ref":"#/components/schemas/OpaqueCursor"}},"required":["items","next_after"],"additionalProperties":false},"RecipeSummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"meal_space":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"color":{"$ref":"#/components/schemas/MealSpaceColor"}},"required":["id","name","color"],"additionalProperties":false},"title":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"category":{"type":["string","null"],"enum":["breakfast","lunch","dinner","dessert","drink","snack","side",null]},"prep_minutes":{"type":["integer","null"]},"cook_minutes":{"type":["integer","null"]},"total_minutes":{"type":["integer","null"]},"yield_quantity":{"type":["number","null"]},"yield_unit":{"type":["string","null"]},"source_host":{"type":["string","null"]},"is_favorite":{"type":"boolean"},"last_explicit_use_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"revision":{"$ref":"#/components/schemas/AccessRevision"},"image":{"$ref":"#/components/schemas/RecipeImage"},"matched_variation":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"variation_count":{"type":"integer","minimum":0},"variation_owners":{"type":"array","items":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["membership_id","name"],"additionalProperties":false}}},"required":["id","group_id","meal_space","title","description","tags","prep_minutes","cook_minutes","total_minutes","yield_quantity","yield_unit","source_host","is_favorite","last_explicit_use_at","updated_at","revision","image","matched_variation"],"additionalProperties":false},"OpaqueCursor":{"type":["string","null"],"maxLength":2048,"pattern":"^[A-Za-z0-9_-]+$"},"Recipe":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"ingredients":{"type":"array","items":{"$ref":"#/components/schemas/RecipeIngredientRow"},"maxItems":1000},"instructions":{"type":"array","items":{"$ref":"#/components/schemas/RecipeInstructionRow"},"maxItems":1000},"prep_minutes":{"type":["number","null"]},"cook_minutes":{"type":["number","null"]},"total_minutes":{"type":["number","null"]},"yield_quantity":{"type":["number","null"]},"yield_unit":{"type":["string","null"]},"source_url":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"},"maxItems":200},"category":{"type":["string","null"],"enum":["breakfast","lunch","dinner","dessert","drink","snack","side",null]},"image":{"$ref":"#/components/schemas/RecipeImage"},"id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"source_host":{"type":["string","null"]},"import_source":{"type":"string","enum":["manual","url","paste","ai"]},"is_favorite":{"type":"boolean"},"preferred_variation_id":{"type":["string","null"],"format":"uuid"},"created_by":{"type":["string","null"],"format":"uuid"},"updated_by":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"client_updated_at":{"type":"string","format":"date-time"},"revision":{"$ref":"#/components/schemas/AccessRevision"},"last_explicit_use_at":{"type":["string","null"],"format":"date-time"},"archive":{"$ref":"#/components/schemas/RecipeArchive"}},"required":["title","description","ingredients","instructions","prep_minutes","cook_minutes","total_minutes","yield_quantity","yield_unit","source_url","tags","id","group_id","source_host","import_source","is_favorite","preferred_variation_id","created_by","updated_by","created_at","updated_at","client_updated_at","revision","last_explicit_use_at","archive"],"additionalProperties":false},"RecipeArchive":{"type":["object","null"],"properties":{"reason":{"type":"string","enum":["allowance"]},"archived_at":{"type":"string","format":"date-time"}},"required":["reason","archived_at"],"additionalProperties":false},"RecipeEditResult":{"anyOf":[{"type":"object","properties":{"outcome":{"type":"string","enum":["applied","unchanged"]},"recipe_id":{"type":"string","format":"uuid"},"revision":{"$ref":"#/components/schemas/AccessRevision"}},"required":["outcome","recipe_id","revision"],"additionalProperties":false},{"type":"object","properties":{"outcome":{"type":"string","enum":["conflict"]},"recipe_id":{"type":"string","format":"uuid"},"revision":{"$ref":"#/components/schemas/AccessRevision"},"collisions":{"type":"array","items":{"type":"string","enum":["title","description","prep_minutes","cook_minutes","total_minutes","yield","source_url","ingredients","instructions","tags","image","category"]},"minItems":1},"merged":{"$ref":"#/components/schemas/RecipeContent"},"current":{"$ref":"#/components/schemas/RecipeContent"}},"required":["outcome","recipe_id","revision","collisions","merged","current"],"additionalProperties":false}]},"RecipeFavoriteResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["applied","unchanged","stale"]},"recipe_id":{"type":"string","format":"uuid"},"is_favorite":{"type":"boolean"}},"required":["outcome","recipe_id","is_favorite"],"additionalProperties":false},"SetRecipeFavoriteRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"is_favorite":{"type":"boolean"}},"required":["membership_id","client_updated_at","is_favorite"],"additionalProperties":false},"MealSpaceTagList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MealSpaceTag"}}},"required":["items"],"additionalProperties":false},"MealSpaceTag":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"display_name":{"type":"string"}},"required":["id","display_name"],"additionalProperties":false},"RecipeDeletionPreview":{"type":"object","properties":{"future_entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"entry_date":{"$ref":"#/components/schemas/EntryDate"},"slot":{"type":"string","enum":["breakfast","lunch","dinner","snack","dessert"]}},"required":["id","entry_date","slot"],"additionalProperties":false}},"past_entry_count":{"type":"integer","minimum":0},"active_recurrences":{"type":"array","items":{"$ref":"#/components/schemas/ActiveRecurrenceReference"},"maxItems":100}},"required":["future_entries","past_entry_count","active_recurrences"],"additionalProperties":false},"ActiveRecurrenceReference":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":200},"entry_type":{"type":"string","enum":["simple","recipe","eating_out","prep"]},"interval_unit":{"type":"string","enum":["day","week"]},"interval_count":{"type":"integer"},"starts_on":{"$ref":"#/components/schemas/EntryDate"},"state":{"type":"string","enum":["active","paused","suspended","ended"]}},"required":["id","title","entry_type","interval_unit","interval_count","starts_on","state"],"additionalProperties":false},"RecipeCopyResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["applied"]},"recipe_id":{"type":"string","format":"uuid"}},"required":["outcome","recipe_id"],"additionalProperties":false},"CopyRecipeRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"target_group_id":{"type":"string","format":"uuid"},"target_membership_id":{"type":"string","format":"uuid"},"title":{"type":"string"}},"required":["membership_id","client_updated_at","id","target_group_id","target_membership_id"],"additionalProperties":false},"TransferRecipeRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"target_group_id":{"type":"string","format":"uuid"},"target_membership_id":{"type":"string","format":"uuid"},"future_entries":{"type":"string","enum":["block","convert_to_simple","remove"]}},"required":["membership_id","client_updated_at","id","target_group_id","target_membership_id","future_entries"],"additionalProperties":false},"HistoryPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/HistoryItem"},"maxItems":100},"next_after":{"$ref":"#/components/schemas/OpaqueCursor"}},"required":["items","next_after"],"additionalProperties":false},"HistoryItem":{"type":"object","properties":{"entry":{"$ref":"#/components/schemas/MealEntry"},"meal_space":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"color":{"$ref":"#/components/schemas/MealSpaceColor"}},"required":["id","name","color"],"additionalProperties":false},"effective_status":{"type":"string","enum":["planned","completed","skipped","replaced"]}},"required":["entry","meal_space","effective_status"],"additionalProperties":false},"MealSpacePastMeals":{"type":"object","properties":{"today":{"$ref":"#/components/schemas/EntryDate"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PastMeal"},"maxItems":200}},"required":["today","items"],"additionalProperties":false},"PastMeal":{"type":"object","properties":{"entry":{"$ref":"#/components/schemas/MealEntry"},"count":{"type":"integer","exclusiveMinimum":0},"last_on":{"$ref":"#/components/schemas/EntryDate"},"recipe_readable":{"type":"boolean"}},"required":["entry","count","last_on","recipe_readable"],"additionalProperties":false},"MealSpaceStats":{"type":"object","properties":{"range":{"type":"string","enum":["30d","90d","1y","all"]},"today":{"$ref":"#/components/schemas/EntryDate"},"range_start":{"allOf":[{"$ref":"#/components/schemas/EntryDate"},{"type":["string","null"]}]},"most_planned":{"type":"array","items":{"$ref":"#/components/schemas/RankedRecipe"},"maxItems":10},"most_cooked":{"type":"array","items":{"$ref":"#/components/schemas/RankedRecipe"},"maxItems":10},"new_recipes_tried":{"type":"array","items":{"type":"object","properties":{"recipe_id":{"type":"string","format":"uuid"},"recipe_readable":{"type":"boolean"},"title":{"type":"string"},"first_made_on":{"$ref":"#/components/schemas/EntryDate"}},"required":["recipe_id","title","first_made_on"],"additionalProperties":false}}},"required":["range","today","range_start","most_planned","most_cooked","new_recipes_tried"],"additionalProperties":false},"RankedRecipe":{"type":"object","properties":{"recipe_id":{"type":"string","format":"uuid"},"recipe_readable":{"type":"boolean"},"title":{"type":"string"},"count":{"type":"integer","exclusiveMinimum":0},"last_on":{"$ref":"#/components/schemas/EntryDate"}},"required":["recipe_id","title","count","last_on"],"additionalProperties":false},"RecipeStats":{"type":"object","properties":{"recipe_id":{"type":"string","format":"uuid"},"last_made_on":{"allOf":[{"$ref":"#/components/schemas/EntryDate"},{"type":["string","null"]}]},"times_made":{"type":"integer","minimum":0},"times_planned":{"type":"integer","minimum":0}},"required":["recipe_id","last_made_on","times_made","times_planned"],"additionalProperties":false},"MealSpaceRegulars":{"type":"object","properties":{"today":{"$ref":"#/components/schemas/EntryDate"},"from":{"$ref":"#/components/schemas/EntryDate"},"items":{"type":"array","items":{"$ref":"#/components/schemas/RegularMeal"},"maxItems":10}},"required":["today","from","items"],"additionalProperties":false},"RegularMeal":{"type":"object","properties":{"entry":{"$ref":"#/components/schemas/MealEntry"},"count":{"type":"integer","minimum":2},"last_on":{"$ref":"#/components/schemas/EntryDate"},"recipe_readable":{"type":"boolean"}},"required":["entry","count","last_on","recipe_readable"],"additionalProperties":false},"RecipeVariationList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/RecipeVariation"}}},"required":["items"],"additionalProperties":false},"RecipeVariation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipe_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"kind":{"$ref":"#/components/schemas/VariationKind"},"owner_membership_id":{"type":["string","null"],"format":"uuid"},"owner_name":{"type":["string","null"]},"overrides":{"$ref":"#/components/schemas/VariationOverrides"},"tags_override_state":{"type":"string","enum":["inherit","replace","clear"]},"tags":{"type":"array","items":{"type":"string"}},"archived_at":{"type":["string","null"],"format":"date-time"},"entry_count":{"type":"integer","minimum":0},"note_count":{"type":"integer","minimum":0},"last_made_on":{"type":["string","null"],"format":"date"},"created_by":{"type":["string","null"],"format":"uuid"},"updated_by":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"client_updated_at":{"type":"string","format":"date-time"}},"required":["id","recipe_id","group_id","name","kind","owner_membership_id","owner_name","overrides","tags_override_state","tags","archived_at","entry_count","note_count","last_made_on","created_by","updated_by","created_at","updated_at","client_updated_at"],"additionalProperties":false},"DuplicateRecipeVariationRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["membership_id","client_updated_at","id","name"],"additionalProperties":false},"VariationRemovalPreview":{"type":"object","properties":{"result":{"type":"string","enum":["archive","delete","blocked"]},"entry_count":{"type":"integer","minimum":0},"note_count":{"type":"integer","minimum":0},"active_recurrences":{"type":"array","items":{"$ref":"#/components/schemas/ActiveRecurrenceReference"},"maxItems":100}},"required":["result","entry_count","note_count","active_recurrences"],"additionalProperties":false},"PromoteRecipeVariationResult":{"anyOf":[{"type":"object","properties":{"outcome":{"type":"string","enum":["applied"]},"variation_id":{"type":"string","format":"uuid"},"recipe_id":{"type":"string","format":"uuid"},"revision":{"$ref":"#/components/schemas/AccessRevision"},"variation":{"type":"string","enum":["archived","deleted"]}},"required":["outcome","variation_id","recipe_id","revision","variation"],"additionalProperties":false},{"type":"object","properties":{"outcome":{"type":"string","enum":["stale"]},"variation_id":{"type":"string","format":"uuid"},"recipe_id":{"type":"string","format":"uuid"},"revision":{"$ref":"#/components/schemas/AccessRevision"}},"required":["outcome","variation_id","recipe_id","revision"],"additionalProperties":false}]},"PromoteRecipeVariationRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"opening_revision":{"$ref":"#/components/schemas/AccessRevision"},"variation_updated_at":{"type":"string","format":"date-time"},"candidate":{"$ref":"#/components/schemas/RecipeContent"}},"required":["membership_id","client_updated_at","opening_revision","variation_updated_at","candidate"],"additionalProperties":false},"PreferredVariationResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["applied","unchanged","stale"]},"recipe_id":{"type":"string","format":"uuid"},"variation_id":{"type":["string","null"],"format":"uuid"}},"required":["outcome","recipe_id","variation_id"],"additionalProperties":false},"SetPreferredVariationRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"variation_id":{"type":["string","null"],"format":"uuid"}},"required":["membership_id","client_updated_at","variation_id"],"additionalProperties":false},"RecipeNoteList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/RecipeNote"}}},"required":["items"],"additionalProperties":false},"RecipeNote":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"recipe_id":{"type":"string","format":"uuid"},"variation_id":{"type":["string","null"],"format":"uuid"},"scope":{"type":"string","enum":["general","variation"]},"body":{"type":"string"},"attribution_kind":{"type":"string","enum":["member","copied"]},"creator_name":{"type":"string"},"created_by":{"type":["string","null"],"format":"uuid"},"updated_by":{"type":["string","null"],"format":"uuid"},"edited":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","recipe_id","variation_id","scope","body","attribution_kind","creator_name","created_by","updated_by","edited","created_at","updated_at"],"additionalProperties":false},"TagCommandResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["applied","unchanged"]},"tag_id":{"type":"string","format":"uuid"}},"required":["outcome","tag_id"],"additionalProperties":false},"RenameMealSpaceTagRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"display_name":{"type":"string"}},"required":["membership_id","client_updated_at","display_name"],"additionalProperties":false},"DeleteMealSpaceTagRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"}},"required":["membership_id","client_updated_at"],"additionalProperties":false},"TagChangePreview":{"type":"object","properties":{"recipe_count":{"type":"integer","minimum":0},"variation_count":{"type":"integer","minimum":0},"idea_count":{"type":"integer","minimum":0}},"required":["recipe_count","variation_count","idea_count"],"additionalProperties":false},"RecipeAllowance":{"type":"object","properties":{"limit":{"type":"integer","exclusiveMinimum":0},"active_count":{"type":"integer","minimum":0},"archived_count":{"type":"integer","minimum":0},"choice_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":5},"keep_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":5}},"required":["limit","active_count","archived_count","choice_ids","keep_ids"],"additionalProperties":false},"ChooseRecipeAllowanceRequest":{"type":"object","properties":{"recipe_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":5}},"required":["recipe_ids"],"additionalProperties":false},"ArchivedRecipePage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ArchivedRecipeSummary"},"maxItems":50},"next_after":{"$ref":"#/components/schemas/OpaqueCursor"}},"required":["items","next_after"],"additionalProperties":false},"ArchivedRecipeSummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"meal_space":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"color":{"$ref":"#/components/schemas/MealSpaceColor"}},"required":["id","name","color"],"additionalProperties":false},"title":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"category":{"type":["string","null"],"enum":["breakfast","lunch","dinner","dessert","drink","snack","side",null]},"archive":{"$ref":"#/components/schemas/RecipeArchive"}},"required":["id","group_id","meal_space","title","tags","archive"],"additionalProperties":false},"EntryRecipe":{"type":"object","properties":{"recipe":{"$ref":"#/components/schemas/Recipe"},"variation":{"allOf":[{"$ref":"#/components/schemas/RecipeVariation"},{"type":["object","null"]}]}},"required":["recipe","variation"],"additionalProperties":false},"RecipeImportResult":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["draft"]},"draft":{"$ref":"#/components/schemas/RecipeImportDraft"},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/ImportWarning"}}},"required":["status","draft","warnings"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["choose"]},"candidates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":false},"minItems":2,"maxItems":50}},"required":["status","candidates"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["assist_required"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["failed"]},"reason":{"type":"string","enum":["invalid_url","blocked","unreachable","timeout","too_large","not_html","http_error","too_many_redirects","candidate_missing","unusable","provider_unavailable"]}},"required":["status","reason"],"additionalProperties":false}]},"RecipeImportDraft":{"type":"object","properties":{"content":{"$ref":"#/components/schemas/RecipeDraftContent"},"image_url":{"type":["string","null"],"maxLength":2048},"extraction":{"type":"string","enum":["structured","llm"]}},"required":["content","image_url","extraction"],"additionalProperties":false},"RecipeDraftContent":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"ingredients":{"type":"array","items":{"$ref":"#/components/schemas/RecipeIngredientRow"},"maxItems":1000},"instructions":{"type":"array","items":{"$ref":"#/components/schemas/RecipeInstructionRow"},"maxItems":1000},"prep_minutes":{"type":["number","null"]},"cook_minutes":{"type":["number","null"]},"total_minutes":{"type":["number","null"]},"yield_quantity":{"type":["number","null"]},"yield_unit":{"type":["string","null"]},"source_url":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"},"maxItems":200},"category":{"type":["string","null"],"enum":["breakfast","lunch","dinner","dessert","drink","snack","side",null]},"image":{"$ref":"#/components/schemas/RecipeImage"}},"required":["title","description","ingredients","instructions","prep_minutes","cook_minutes","total_minutes","yield_quantity","yield_unit","source_url","tags"],"additionalProperties":false},"ImportWarning":{"type":"object","properties":{"code":{"type":"string","enum":["title_required","title_too_long","description_too_long","too_many_ingredients","too_many_instructions","line_too_long","heading_too_long","too_many_sections","orphan_heading","too_many_tags","tag_too_long","invalid_minutes","invalid_yield","invalid_source_url","invalid_quantity","invalid_image","invalid_step_photo","too_many_step_photos","step_photo_text_required","invalid_category","content_too_large"]},"field":{"type":"string"},"index":{"type":"integer","minimum":0}},"required":["code","field"],"additionalProperties":false},"ImportUrlRequest":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2048},"candidate_id":{"type":"string","minLength":1,"maxLength":64},"assisted":{"type":"boolean"}},"required":["url"],"additionalProperties":false},"ImportTextRequest":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":50000}},"required":["text"],"additionalProperties":false},"AiUsage":{"type":"object","properties":{"limit":{"type":"integer","minimum":0},"used":{"type":"integer","minimum":0},"pending":{"type":"integer","minimum":0},"period_start":{"type":["string","null"],"format":"date-time"},"period_end":{"type":["string","null"],"format":"date-time"}},"required":["limit","used","pending","period_start","period_end"],"additionalProperties":false},"RecipeSourceMatches":{"type":"object","properties":{"can_edit":{"type":"boolean"},"source_matches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":false},"maxItems":20},"title_matches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":false},"maxItems":20}},"required":["can_edit","source_matches","title_matches"],"additionalProperties":false},"RecipeImageImportRequest":{"type":"object","properties":{"url":{"type":"string","maxLength":8192,"format":"uri"}},"required":["url"],"additionalProperties":false},"RecipeImageSlot":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"master_path":{"type":"string"},"card_path":{"type":"string"}},"required":["id","master_path","card_path"],"additionalProperties":false},"RecipeImageUploadResult":{"type":"object","properties":{"image_id":{"type":"string","format":"uuid"},"size":{"type":"string","enum":["master","card"]},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"outcome":{"type":"string","enum":["applied","unchanged"]}},"required":["image_id","size","sha256","outcome"],"additionalProperties":false},"RecipeNutrition":{"type":["object","null"],"properties":{"group_id":{"type":"string","format":"uuid"},"recipe_id":{"type":"string","format":"uuid"},"variation_id":{"type":["string","null"],"format":"uuid"},"version":{"type":"integer","minimum":1},"input_key":{"type":"string","pattern":"^[a-f0-9]{64}$"},"algorithm_version":{"type":"string","enum":["ai-usda-v1"]},"totals":{"$ref":"#/components/schemas/Nutrients"},"overrides":{"$ref":"#/components/schemas/NutrientOverrides"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/RecipeNutritionLine"},"maxItems":256},"generated_by":{"type":["string","null"],"format":"uuid"},"generated_at":{"type":"string","format":"date-time"},"edited_by":{"type":["string","null"],"format":"uuid"},"edited_at":{"type":["string","null"],"format":"date-time"}},"required":["group_id","recipe_id","variation_id","version","input_key","algorithm_version","totals","overrides","lines","generated_by","generated_at","edited_by","edited_at"],"additionalProperties":false},"GenerateRecipeNutritionResult":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["saved"]},"nutrition":{"$ref":"#/components/schemas/RecipeNutrition"}},"required":["status","nutrition"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["failed"]},"reason":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","description":"Today one of unusable, provider_unavailable. Treat any other as a failure that charged nothing."}},"required":["status","reason"],"additionalProperties":false}]},"GenerateRecipeNutritionRequest":{"type":"object","properties":{"variation_id":{"type":["string","null"],"format":"uuid"},"expected_input_key":{"type":"string","pattern":"^[a-f0-9]{64}$"},"expected_version":{"type":["integer","null"],"minimum":1}},"required":["variation_id","expected_input_key","expected_version"],"additionalProperties":false},"RecipeNutritionOverridesRequest":{"type":"object","properties":{"variation_id":{"type":["string","null"],"format":"uuid"},"expected_version":{"type":"integer","minimum":1},"overrides":{"type":"object","properties":{"calories_kcal":{"type":["number","null"],"minimum":0},"protein_g":{"type":["number","null"],"minimum":0},"carbohydrate_g":{"type":["number","null"],"minimum":0},"fat_g":{"type":["number","null"],"minimum":0},"sugar_g":{"type":["number","null"],"minimum":0},"fiber_g":{"type":["number","null"],"minimum":0},"sodium_mg":{"type":["number","null"],"minimum":0}},"additionalProperties":false}},"required":["variation_id","expected_version","overrides"],"additionalProperties":false},"AiFeatures":{"type":"object","properties":{"enabled_operations":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},"maxItems":32,"description":"Operation identifiers, today among suggestion, recipe_generate, import_url, import_paste, nutrition. Ignore any you do not know."}},"required":["enabled_operations"],"additionalProperties":false},"RecipeShareLinkState":{"type":"object","properties":{"link":{"$ref":"#/components/schemas/RecipeShareLink"},"links_enabled":{"type":"boolean"}},"required":["link","links_enabled"],"additionalProperties":false},"RecipeShareLink":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"token":{"$ref":"#/components/schemas/RecipeShareToken"},"group_id":{"type":"string","format":"uuid"},"recipe_id":{"type":"string","format":"uuid"},"variation_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"}},"required":["id","token","group_id","recipe_id","variation_id","created_at"],"additionalProperties":false},"RecipeShareToken":{"type":"string","pattern":"^[A-Za-z0-9_-]{32}$"},"CreateRecipeShareLinkRequest":{"type":"object","properties":{"variation_id":{"type":["string","null"],"format":"uuid"}},"required":["variation_id"],"additionalProperties":false},"MyRecipeShareLinks":{"type":"object","properties":{"links_enabled":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/MyRecipeShareLink"},"maxItems":500}},"required":["links_enabled","items"],"additionalProperties":false},"MyRecipeShareLink":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"token":{"$ref":"#/components/schemas/RecipeShareToken"},"group_id":{"type":"string","format":"uuid"},"recipe_id":{"type":"string","format":"uuid"},"variation_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string"},"variation_name":{"type":["string","null"]},"meal_space":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"color":{"$ref":"#/components/schemas/MealSpaceColor"}},"required":["id","name","color"],"additionalProperties":false}},"required":["id","token","group_id","recipe_id","variation_id","created_at","title","variation_name","meal_space"],"additionalProperties":false},"RevokeRecipeShareLinkResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["revoked","unchanged"]}},"required":["outcome"],"additionalProperties":false},"RecipeLinkSharing":{"type":"object","properties":{"links_enabled":{"type":"boolean"}},"required":["links_enabled"],"additionalProperties":false},"ImportSharedRecipeRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"token":{"$ref":"#/components/schemas/RecipeShareToken"}},"required":["membership_id","client_updated_at","id","token"],"additionalProperties":false},"IdeaList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/IdeaRead"},"maxItems":200},"total_count":{"type":"integer","minimum":0},"next_after":{"$ref":"#/components/schemas/OpaqueCursor"}},"required":["items","total_count","next_after"],"additionalProperties":false},"IdeaRead":{"type":"object","properties":{"title":{"type":"string"},"notes":{"type":"string"},"tags":{"type":"array","items":{"type":"string"},"maxItems":200},"recipe_id":{"type":["string","null"],"format":"uuid"},"variation_id":{"type":["string","null"],"format":"uuid"},"kind":{"$ref":"#/components/schemas/IdeaKind"},"id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"source":{"type":"string","enum":["user","ai"]},"position_value":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[0-9A-Za-z]+$"},"created_by":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"client_updated_at":{"type":"string","format":"date-time"},"link_state":{"type":"string","enum":["none","active","allowance_archived"]},"meal_space":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"color":{"$ref":"#/components/schemas/MealSpaceColor"}},"required":["id","name","color"],"additionalProperties":false}},"required":["title","notes","tags","recipe_id","variation_id","kind","id","group_id","source","position_value","created_by","created_at","updated_at","client_updated_at","link_state","meal_space"],"additionalProperties":false},"CreateIdeaRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"content":{"$ref":"#/components/schemas/IdeaContent"},"recipe_id":{"type":["string","null"],"format":"uuid"},"variation_id":{"type":["string","null"],"format":"uuid"},"kind":{"$ref":"#/components/schemas/IdeaKind"}},"required":["membership_id","client_updated_at","id","content","recipe_id","variation_id"],"additionalProperties":false},"IdeaScheduleResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["applied"]},"idea_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"membership_id":{"type":"string","format":"uuid"},"updated_at":{"type":"string","format":"date-time"},"entry_id":{"type":"string","format":"uuid"}},"required":["outcome","idea_id","group_id","membership_id","updated_at","entry_id"],"additionalProperties":false},"ScheduleIdeaRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"expected_updated_at":{"type":"string","format":"date-time"},"entry_id":{"type":"string","format":"uuid"},"entry_date":{"$ref":"#/components/schemas/EntryDate"},"slot":{"type":"string","enum":["breakfast","lunch","dinner","snack","dessert"]},"mode":{"type":"string","enum":["linked","simple"]},"target_yield_quantity":{"type":"number","exclusiveMinimum":0,"maximum":100000},"target_yield_unit":{"type":"string","minLength":1}},"required":["membership_id","client_updated_at","expected_updated_at","entry_id","entry_date","slot","mode"],"additionalProperties":false},"IdeaConvertResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["applied"]},"idea_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"membership_id":{"type":"string","format":"uuid"},"updated_at":{"type":"string","format":"date-time"},"recipe_id":{"type":"string","format":"uuid"}},"required":["outcome","idea_id","group_id","membership_id","updated_at","recipe_id"],"additionalProperties":false},"ConvertIdeaRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"expected_updated_at":{"type":"string","format":"date-time"},"recipe_id":{"type":"string","format":"uuid"},"content":{"$ref":"#/components/schemas/RecipeContent"}},"required":["membership_id","client_updated_at","expected_updated_at","recipe_id","content"],"additionalProperties":false},"IdeaCopyResult":{"type":"object","properties":{"outcome":{"type":"string","enum":["applied"]},"idea_id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"membership_id":{"type":"string","format":"uuid"},"updated_at":{"type":"string","format":"date-time"},"source_idea_id":{"type":"string","format":"uuid"}},"required":["outcome","idea_id","group_id","membership_id","updated_at","source_idea_id"],"additionalProperties":false},"CopyIdeaRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"client_updated_at":{"type":"string","format":"date-time"},"expected_updated_at":{"type":"string","format":"date-time"},"target_group_id":{"type":"string","format":"uuid"},"target_membership_id":{"type":"string","format":"uuid"},"id":{"type":"string","format":"uuid"}},"required":["membership_id","client_updated_at","expected_updated_at","target_group_id","target_membership_id","id"],"additionalProperties":false},"RecurringMealList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/RecurringMealRead"},"maxItems":200},"next_after":{"$ref":"#/components/schemas/OpaqueCursor"}},"required":["items","next_after"],"additionalProperties":false},"RecurringMealRead":{"type":"object","properties":{"entry_type":{"type":"string","enum":["simple","recipe","eating_out","prep"]},"slot":{"type":["string","null"],"enum":["breakfast","lunch","dinner","snack","dessert",null]},"title":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":"string","maxLength":10000},"recipe_id":{"type":["string","null"],"format":"uuid"},"variation_id":{"type":["string","null"],"format":"uuid"},"target_yield_quantity":{"type":["number","null"],"exclusiveMinimum":0,"maximum":100000},"target_yield_unit":{"type":["string","null"],"minLength":1},"id":{"type":"string","format":"uuid"},"group_id":{"type":"string","format":"uuid"},"interval_unit":{"type":"string","enum":["day","week"]},"interval_count":{"type":"integer"},"starts_on":{"$ref":"#/components/schemas/EntryDate"},"generate_from":{"$ref":"#/components/schemas/EntryDate"},"ends_on":{"allOf":[{"$ref":"#/components/schemas/EntryDate"},{"type":["string","null"]}]},"paused_at":{"type":["string","null"],"format":"date-time"},"entitlement_suspended_at":{"type":["string","null"],"format":"date-time"},"entitlement_suspension_reason":{"type":["string","null"],"enum":["personal_pro_ended"]},"source_entry_id":{"type":["string","null"],"format":"uuid"},"variation_name_snapshot":{"type":["string","null"]},"created_by":{"type":["string","null"],"format":"uuid"},"updated_by":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"state":{"type":"string","enum":["active","paused","suspended","ended"]},"next_occurrence_on":{"allOf":[{"$ref":"#/components/schemas/EntryDate"},{"type":["string","null"]}]},"upcoming_skips":{"type":"array","items":{"$ref":"#/components/schemas/EntryDate"},"maxItems":367},"upcoming_planned_count":{"type":"integer","minimum":0},"has_history":{"type":"boolean"}},"required":["entry_type","slot","title","notes","recipe_id","variation_id","target_yield_quantity","target_yield_unit","id","group_id","interval_unit","interval_count","starts_on","generate_from","ends_on","paused_at","entitlement_suspended_at","entitlement_suspension_reason","source_entry_id","variation_name_snapshot","created_by","updated_by","created_at","updated_at","state","next_occurrence_on","upcoming_skips","upcoming_planned_count","has_history"],"additionalProperties":false},"RecurrencePreview":{"type":"object","properties":{"dates":{"type":"array","items":{"$ref":"#/components/schemas/EntryDate"}},"occupied":{"type":"array","items":{"type":"object","properties":{"date":{"$ref":"#/components/schemas/EntryDate"},"entry_id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":200}},"required":["date","entry_id","title"],"additionalProperties":false}}},"required":["dates","occupied"],"additionalProperties":false},"ResumeSuspendedResult":{"type":"object","properties":{"resumed":{"type":"integer","minimum":0},"entries":{"$ref":"#/components/schemas/RecurrenceEntryCounts"}},"required":["resumed","entries"],"additionalProperties":false},"ResumeSuspendedRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"},"resume_on":{"$ref":"#/components/schemas/EntryDate"}},"required":["membership_id"],"additionalProperties":false},"IntegrationConnection":{"type":"object","properties":{"status":{"type":"string","enum":["disconnected","active","retained","error","revoked","expired"]},"entitled":{"type":"boolean"},"can_send":{"type":"boolean"},"default_list_id":{"type":["string","null"],"minLength":1,"maxLength":200},"connected_at":{"type":["string","null"],"format":"date-time"},"retain_until":{"type":["string","null"],"format":"date-time"}},"required":["status","entitled","can_send","default_list_id","connected_at","retain_until"],"additionalProperties":false},"IntegrationConnectResponse":{"type":"object","properties":{"authorization_url":{"type":"string","format":"uri"}},"required":["authorization_url"],"additionalProperties":false},"IntegrationConnectRequest":{"type":"object","properties":{"redirect_uri":{"type":"string","minLength":1,"maxLength":2048}},"required":["redirect_uri"],"additionalProperties":false},"IntegrationCallbackRequest":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":2048},"state":{"type":"string","minLength":32,"maxLength":128}},"required":["code","state"],"additionalProperties":false},"GroceryLists":{"type":"object","properties":{"lists":{"type":"array","items":{"$ref":"#/components/schemas/GroceryList"}}},"required":["lists"],"additionalProperties":false},"GroceryList":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":500}},"required":["id","name"],"additionalProperties":false},"GrocerySections":{"type":"object","properties":{"sections":{"type":"array","items":{"$ref":"#/components/schemas/GrocerySection"}}},"required":["sections"],"additionalProperties":false},"GrocerySection":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":500}},"required":["id","name"],"additionalProperties":false},"GroceryPreview":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/GroceryPreviewLine"}}},"required":["lines"],"additionalProperties":false},"GroceryPreviewLine":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"},"origin":{"type":"string","enum":["entry","recipe"]},"source_label":{"type":"string"},"content":{"type":"string"},"quantity":{"type":["string","null"]},"preparation":{"type":["string","null"]},"unscalable":{"type":"boolean"},"match":{"type":["object","null"],"properties":{"item":{"type":"string"},"unit":{"type":["string","null"]},"quantity":{"type":"number","exclusiveMinimum":0}},"required":["item","unit","quantity"],"additionalProperties":false}},"required":["source_id","origin","source_label","content","quantity","preparation","unscalable","match"],"additionalProperties":false},"GroceryPreviewRequest":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"target_yield":{"type":"object","properties":{"quantity":{"type":"number","exclusiveMinimum":0,"maximum":100000},"unit":{"type":"string","minLength":1,"maxLength":50}},"required":["quantity","unit"],"additionalProperties":false}},"required":["id"],"additionalProperties":false},"maxItems":40},"recipes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"variation_id":{"type":"string","format":"uuid"},"target_yield":{"type":"object","properties":{"quantity":{"type":"number","exclusiveMinimum":0,"maximum":100000},"unit":{"type":"string","minLength":1,"maxLength":50}},"required":["quantity","unit"],"additionalProperties":false}},"required":["id"],"additionalProperties":false},"maxItems":40}},"additionalProperties":false},"GrocerySendResult":{"type":"object","properties":{"run_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","partial","succeeded","failed"]},"list_id":{"type":"string","minLength":1,"maxLength":200},"section_id":{"type":["string","null"],"minLength":1,"maxLength":200},"replayed":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/GrocerySendItemResult"}},"entry_states":{"type":"array","items":{"$ref":"#/components/schemas/GroceryEntrySendState"}}},"required":["run_id","status","list_id","section_id","replayed","items","entry_states"],"additionalProperties":false},"GrocerySendItemResult":{"type":"object","properties":{"position":{"type":"integer","minimum":0},"content":{"type":"string"},"quantity":{"type":["string","null"]},"note":{"type":["string","null"]},"status":{"type":"string","enum":["pending","succeeded","failed"]},"source_entry_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["position","content","quantity","note","status","source_entry_ids"],"additionalProperties":false},"GroceryEntrySendState":{"type":"object","properties":{"entry_id":{"type":"string","format":"uuid"},"state":{"type":"string","enum":["sent","partial"]},"run_id":{"type":["string","null"],"format":"uuid"}},"required":["entry_id","state","run_id"],"additionalProperties":false},"GrocerySendRequest":{"type":"object","properties":{"list_id":{"type":"string","minLength":1,"maxLength":200},"section_id":{"type":"string","minLength":1,"maxLength":200},"items":{"type":"array","items":{"$ref":"#/components/schemas/GrocerySendItem"},"minItems":1,"maxItems":500}},"required":["items"],"additionalProperties":false},"GrocerySendItem":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":1000},"quantity":{"type":["string","null"],"minLength":1,"maxLength":80},"note":{"type":["string","null"],"minLength":1,"maxLength":2000},"source_entry_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":20}},"required":["content"],"additionalProperties":false},"GrocerySendStates":{"type":"object","properties":{"entry_states":{"type":"array","items":{"$ref":"#/components/schemas/GroceryEntrySendState"}}},"required":["entry_states"],"additionalProperties":false},"GrocerySendStatesRequest":{"type":"object","properties":{"entry_ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":100}},"required":["entry_ids"],"additionalProperties":false},"SuggestionSet":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["ready"]},"suggestions":{"type":"array","items":{"$ref":"#/components/schemas/SuggestionCard"},"minItems":1,"maxItems":10}},"required":["status","suggestions"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["failed"]},"reason":{"type":"string","enum":["unusable","provider_unavailable"]}},"required":["status","reason"],"additionalProperties":false}]},"SuggestionCard":{"type":"object","properties":{"placement":{"$ref":"#/components/schemas/SuggestionPlacement"},"title":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["recipe","simple","new_recipe_idea"]},"recipe_id":{"type":"string","format":"uuid"},"reason":{"type":"string","minLength":1,"maxLength":240}},"required":["placement","title","kind","reason"],"additionalProperties":false},"SuggestionPlacement":{"type":"object","properties":{"date":{"type":"string","pattern":"^(?!0000)\\d{4}-\\d{2}-\\d{2}$"},"slot":{"type":"string","enum":["breakfast","lunch","dinner","snack","dessert"]}},"required":["date","slot"],"additionalProperties":false},"SuggestMealsRequest":{"type":"object","properties":{"meal_space_id":{"type":"string","format":"uuid"},"placements":{"type":"array","items":{"$ref":"#/components/schemas/SuggestionPlacement"},"minItems":1,"maxItems":10},"priorities":{"type":"array","items":{"$ref":"#/components/schemas/SuggestionPriority"},"maxItems":3}},"required":["meal_space_id","placements","priorities"],"additionalProperties":false},"SuggestionPriority":{"type":"string","enum":["Easy weeknight meals","Kid-friendly","Use family favorites","Try something new","Avoid repeats","Budget-friendly","Healthy-ish","Good leftovers","Fast prep","Use saved recipes","Include new AI recipe ideas","Use simple meals","Use recipes only","Mix recipes and simple meals"]},"RecipeDraftGeneration":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["draft"]},"draft":{"type":"object","properties":{"content":{"$ref":"#/components/schemas/RecipeDraftContent"},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/ImportWarning"}}},"required":["content","warnings"],"additionalProperties":false},"review":{"$ref":"#/components/schemas/AiRecipeReview"}},"required":["status","draft","review"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["failed"]},"reason":{"type":"string","enum":["unusable","provider_unavailable"]}},"required":["status","reason"],"additionalProperties":false}]},"AiRecipeReview":{"type":"object","properties":{"label":{"type":"string","enum":["AI-generated, review before cooking"]},"preferences":{"type":"array","items":{"$ref":"#/components/schemas/SuggestionPriority"},"maxItems":3},"verification":{"type":"string","enum":["Allergy and medical suitability require your verification."]}},"required":["label","preferences","verification"],"additionalProperties":false},"GenerateRecipeDraftRequest":{"type":"object","properties":{"meal_space_id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":200},"prompt":{"type":"string","minLength":1,"maxLength":1000},"priorities":{"type":"array","items":{"$ref":"#/components/schemas/SuggestionPriority"},"maxItems":3}},"required":["meal_space_id"],"additionalProperties":false},"SuggestionPool":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["ready"]},"generated_at":{"type":"string","format":"date-time"},"guidance_revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"suggestions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["recipe","simple","new_recipe_idea"]},"recipe_id":{"type":"string","format":"uuid"},"reason":{"type":"string","minLength":1,"maxLength":240},"id":{"type":"string","minLength":1,"maxLength":64}},"required":["title","kind","reason","id"],"additionalProperties":false}}},"required":["status","generated_at","guidance_revision","suggestions"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["failed"]},"reason":{"type":"string","enum":["unusable","provider_unavailable"]}},"required":["status","reason"],"additionalProperties":false}]},"SuggestionPoolRequest":{"type":"object","properties":{"meal_space_id":{"type":"string","format":"uuid"}},"required":["meal_space_id"],"additionalProperties":false},"AiGuidance":{"type":"object","properties":{"meal_space_id":{"type":"string","format":"uuid"},"allergies":{"type":"array","items":{"type":"string"},"maxItems":20},"preferences":{"type":"string"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["meal_space_id","allergies","preferences","revision","updated_at"],"additionalProperties":false},"SetAiGuidance":{"type":"object","properties":{"allergies":{"type":"array","items":{"type":"string"},"maxItems":20},"preferences":{"type":"string"},"membership_id":{"type":"string","format":"uuid"},"expected_revision":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["allergies","preferences","membership_id","expected_revision"],"additionalProperties":false},"RecipeDiscovery":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["ready"]},"generated_at":{"type":"string","format":"date-time"},"guidance_revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"suggestions":{"type":"array","items":{"$ref":"#/components/schemas/RecipeDiscoveryCard"},"minItems":1,"maxItems":5}},"required":["status","generated_at","guidance_revision","suggestions"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["failed"]},"reason":{"type":"string","enum":["unusable","provider_unavailable"]}},"required":["status","reason"],"additionalProperties":false}]},"RecipeDiscoveryCard":{"type":"object","properties":{"image_url":{"type":["string","null"],"maxLength":2048,"format":"uri"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["new_recipe_idea"]},"reason":{"type":"string","minLength":1,"maxLength":240},"source_url":{"type":"string","maxLength":2048,"format":"uri"}},"required":["id","title","kind","reason","source_url"],"additionalProperties":false},"DiscoverRecipesRequest":{"type":"object","properties":{"meal_space_id":{"type":"string","format":"uuid"}},"required":["meal_space_id"],"additionalProperties":false},"DiscoveryActionResult":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["added"]},"recipe_id":{"type":"string","format":"uuid"},"idea_id":{"type":"string","format":"uuid"}},"required":["status","recipe_id","idea_id"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["dismissed"]}},"required":["status"],"additionalProperties":false}]},"DiscoveryActionRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid"}},"required":["membership_id"],"additionalProperties":false},"CurrentRecipeDiscoveries":{"type":["object","null"],"properties":{"status":{"type":"string","enum":["ready"]},"persistent":{"type":"boolean","enum":[true]},"generated_at":{"type":"string","format":"date-time"},"guidance_revision":{"type":"integer","minimum":0},"suggestions":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/RecipeDiscoveryCard"},{"type":"object","properties":{"added_recipe_id":{"type":"string","format":"uuid"}},"additionalProperties":false}]}}},"required":["status","persistent","generated_at","guidance_revision","suggestions"],"additionalProperties":false},"PlanningReminderResponse":{"type":"object","properties":{"reminder":{"anyOf":[{"$ref":"#/components/schemas/PlanningReminder"},{"type":"null"}]},"delivery":{"$ref":"#/components/schemas/PlanningReminderDelivery"}},"required":["reminder","delivery"],"additionalProperties":false},"PlanningReminder":{"type":"object","properties":{"weekday":{"type":"integer","minimum":1,"maximum":7},"time_local":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"timezone":{"$ref":"#/components/schemas/PlanningTimezone"},"frequency":{"type":"string","enum":["weekly","biweekly"]},"starts_on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"is_enabled":{"type":"boolean"}},"required":["weekday","time_local","timezone","frequency","starts_on","is_enabled"],"additionalProperties":false},"PlanningReminderDelivery":{"type":"object","properties":{"confirmed_devices":{"type":"integer","minimum":0}},"required":["confirmed_devices"],"additionalProperties":false},"UpdatePlanningReminderRequest":{"type":"object","properties":{"default_timezone":{"$ref":"#/components/schemas/PlanningTimezone"},"weekday":{"type":"integer","minimum":1,"maximum":7},"time_local":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"frequency":{"type":"string","enum":["weekly","biweekly"]},"starts_on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"is_enabled":{"type":"boolean"}},"required":["weekday","time_local","frequency","starts_on","is_enabled"],"additionalProperties":false},"NotificationRegistrationReceipt":{"type":"object","properties":{"acknowledged_at":{"type":"string","format":"date-time"},"stale_after":{"type":"string","format":"date-time"},"registration_enabled":{"type":"boolean"},"send_mode":{"type":"string","enum":["off","canary","global"]},"delivery_confirmed":{"type":"boolean"}},"required":["acknowledged_at","stale_after","registration_enabled","send_mode","delivery_confirmed"],"additionalProperties":false,"example":{"acknowledged_at":"2026-09-29T12:00:00.000Z","stale_after":"2026-10-29T12:00:00.000Z","registration_enabled":true,"send_mode":"off","delivery_confirmed":true}},"ReconcileNotificationRegistrationRequest":{"type":"object","properties":{"installation_id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"},"installation_secret":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"subscription_id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"},"platform":{"type":"string","enum":["ios","android"]},"native_opted_in":{"type":"boolean"}},"required":["installation_id","installation_secret","subscription_id","platform","native_opted_in"],"additionalProperties":false,"example":{"installation_id":"20000000-0000-4000-8000-000000000002","installation_secret":"AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8","subscription_id":"30000000-0000-4000-8000-000000000003","platform":"ios","native_opted_in":true}},"NotificationRegistrationDeactivated":{"type":"object","properties":{"deactivated":{"type":"boolean","enum":[true]}},"required":["deactivated"],"additionalProperties":false,"example":{"deactivated":true}},"DeactivateNotificationRegistrationRequest":{"type":"object","properties":{"installation_id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"},"installation_secret":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},"required":["installation_id","installation_secret"],"additionalProperties":false,"example":{"installation_id":"20000000-0000-4000-8000-000000000002","installation_secret":"AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8"}},"ApiKeyPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}},"next_after":{"$ref":"#/components/schemas/OpaqueCursor"}},"required":["items","next_after"],"additionalProperties":false},"ApiKey":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"key_prefix":{"type":"string","pattern":"^tm_(live|test)_[A-Za-z0-9]{4}$"},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyScope"}},"created_at":{"type":"string","format":"date-time"},"last_used_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"}},"required":["id","name","key_prefix","scopes","created_at","last_used_at","expires_at","revoked_at"],"additionalProperties":false},"ApiKeyScope":{"type":"string","enum":["read","write","delete","admin"]},"ApiKeyCreated":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"key_prefix":{"type":"string","pattern":"^tm_(live|test)_[A-Za-z0-9]{4}$"},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyScope"}},"created_at":{"type":"string","format":"date-time"},"last_used_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"},"key":{"type":"string","pattern":"^tm_(live|test)_[A-Za-z0-9]{32}$"}},"required":["id","name","key_prefix","scopes","created_at","last_used_at","expires_at","revoked_at","key"],"additionalProperties":false},"CreateApiKeyRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyScope"},"minItems":1,"maxItems":4},"expires_at":{"type":["string","null"],"format":"date-time"}},"required":["name","scopes"],"additionalProperties":false,"example":{"name":"Home automation","scopes":["read"],"expires_at":null}},"OAuthClient":{"type":"object","properties":{"client_id":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^\\S+$"},"client_name":{"type":"string"},"client_uri":{"type":["string","null"]},"logo_uri":{"type":["string","null"]},"redirect_uris":{"type":"array","items":{"type":"string"}},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/OAuthScope"}},"registration_source":{"$ref":"#/components/schemas/OAuthRegistrationSource"}},"required":["client_id","client_name","client_uri","logo_uri","redirect_uris","scopes","registration_source"],"additionalProperties":false},"OAuthScope":{"type":"string","enum":["read","write","delete","admin"]},"OAuthRegistrationSource":{"type":"string","enum":["seeded","operator","dynamic","metadata_document"]},"OAuthAuthorizationResult":{"type":"object","properties":{"redirect_to":{"type":"string"}},"required":["redirect_to"],"additionalProperties":false},"OAuthAuthorizationRequest":{"type":"object","properties":{"submission_id":{"type":"string","format":"uuid"},"client_id":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^\\S+$"},"redirect_uri":{"type":"string","minLength":1,"maxLength":2048},"scope":{"type":"string","maxLength":1024},"state":{"type":"string","maxLength":2048},"code_challenge":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"code_challenge_method":{"type":"string","enum":["S256"]},"resource":{"type":"string","minLength":1,"maxLength":2048},"decision":{"type":"string","enum":["approve","deny"]}},"required":["submission_id","client_id","redirect_uri","code_challenge","code_challenge_method","decision"],"additionalProperties":false,"example":{"submission_id":"6f1a0000-0000-4000-8000-0000000000aa","client_id":"claude-web","redirect_uri":"https://claude.ai/api/mcp/auth_callback","scope":"read write","state":"af0ifjsldkj","code_challenge":"E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM","code_challenge_method":"S256","decision":"approve"}},"OAuthConnectionList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OAuthConnection"}}},"required":["items"],"additionalProperties":false},"OAuthConnection":{"type":"object","properties":{"client_id":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^\\S+$"},"client_name":{"type":"string"},"client_uri":{"type":["string","null"]},"logo_uri":{"type":["string","null"]},"registration_source":{"$ref":"#/components/schemas/OAuthRegistrationSource"},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/OAuthScope"}},"last_used_at":{"type":"string","format":"date-time"}},"required":["client_id","client_name","client_uri","logo_uri","registration_source","scopes","last_used_at"],"additionalProperties":false},"OAuthDisconnectResult":{"type":"object","properties":{"client_id":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^\\S+$"},"revoked_count":{"type":"integer","minimum":0}},"required":["client_id","revoked_count"],"additionalProperties":false},"Plan":{"type":"object","properties":{"plan":{"type":"string","enum":["free","trial","pro"]},"pro_ends_at":{"type":["string","null"],"format":"date-time"},"promotion":{"type":"boolean"}},"required":["plan","pro_ends_at","promotion"],"additionalProperties":false},"RedeemPromoCodeRequest":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":128}},"required":["code"],"additionalProperties":false},"AccountDeletionPreview":{"type":"object","properties":{"state":{"type":"string","enum":["active","deletion_pending"]},"finalize_after":{"type":["string","null"],"format":"date-time"},"owned_shared_meal_spaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"shared_memberships":{"type":"integer","minimum":0},"sponsored_meal_spaces":{"type":"integer","minimum":0},"pending_deletion_meal_spaces":{"type":"integer","minimum":0}},"required":["state","finalize_after","owned_shared_meal_spaces","shared_memberships","sponsored_meal_spaces"],"additionalProperties":false},"AccountDeletionRequested":{"type":"object","properties":{"state":{"type":"string","enum":["deletion_pending"]},"finalize_after":{"type":"string","format":"date-time"}},"required":["state","finalize_after"],"additionalProperties":false},"RequestAccountDeletionRequest":{"type":"object","properties":{"acknowledge_external_billing":{"type":"boolean","enum":[true]}},"required":["acknowledge_external_billing"],"additionalProperties":false},"AccountDeletionCancelled":{"type":"object","properties":{"state":{"type":"string","enum":["active"]},"restored_memberships":{"type":"integer","minimum":0}},"required":["state","restored_memberships"],"additionalProperties":false},"PersonalDataExportList":{"type":"array","items":{"$ref":"#/components/schemas/PersonalDataExport"},"maxItems":5},"PersonalDataExport":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"$ref":"#/components/schemas/PersonalDataExportStatus"},"requested_at":{"type":"string","format":"date-time"},"ready_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"},"size_bytes":{"type":["integer","null"],"exclusiveMinimum":0},"failure_code":{"type":["string","null"],"pattern":"^[a-z0-9_]{1,64}$"},"schema_version":{"type":"integer","exclusiveMinimum":0}},"required":["id","status","requested_at","ready_at","expires_at","size_bytes","failure_code","schema_version"],"additionalProperties":false},"PersonalDataExportStatus":{"type":"string","enum":["pending","running","ready","failed","expired"]},"PersonalDataExportDownload":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time"}},"required":["url","expires_at"],"additionalProperties":false}},"parameters":{}},"paths":{"/api/v1/meal-spaces":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Meal Spaces"],"summary":"Create a shared Meal Space.","description":"Creates the Meal Space, the caller's Owner Membership, and the caller's sponsorship in one transaction. Requires account Pro.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"The Meal Space to create.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSharedMealSpaceRequest"}}}},"responses":{"201":{"description":"The created Meal Space.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransitionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Meal Spaces"],"summary":"List your Meal Spaces.","description":"Returns at most 100 of the caller's readable Meal Spaces, ordered by Meal Space ID. Each has the caller's current Membership ID, effective role, availability, Planning timezone and enabled meal slots, and whether it is the caller's primary Meal Space. Pass `next_cursor` as `after` for the next page. Role and availability are presentation, never permission: each later call is authorized again.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":false,"name":"after","in":"query"}],"responses":{"200":{"description":"A page of your Meal Spaces.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MealSpacePage"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/access":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Meal Spaces"],"summary":"Read the caller's access summary for a Meal Space.","description":"Returns the caller's effective role, the Owner and Sponsor references, current availability, the grace deadline, and the recovery actions to present. A caller who is not an active member receives 404. The summary is presentation, never permission.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000001"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","enum":["true"]},"required":false,"name":"include_deletion","in":"query"}],"responses":{"200":{"description":"The caller's member-safe access summary.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MealSpaceAccessSummary"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/memberships":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Meal Spaces"],"summary":"List active members for Meal Space settings.","description":"Returns at most 100 Membership references and effective roles, ordered by Membership ID. No account or billing details.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000001"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"after","in":"query"},{"schema":{"type":"string","enum":["true"]},"required":false,"name":"include_avatar","in":"query"}],"responses":{"200":{"description":"A page of active members.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MealSpaceMembershipPage"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/invitations":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"admin","x-credential-surface":"any","tags":["Memberships"],"summary":"Invite someone to a Meal Space.","description":"Issues a single-use, email-bound Invitation at a non-Owner role. The token is delivered out of band and is never returned here.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000001"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"The recipient and intended role.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvitationRequest"}}}},"responses":{"201":{"description":"The issued Invitation.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransitionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"admin","x-credential-surface":"any","tags":["Invitations"],"summary":"List pending invitations for an Owner or Admin.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000001"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"after","in":"query"}],"responses":{"200":{"description":"Up to 100 pending invitations, including expired links.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/InvitationPage"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/invitations/{token}/accept":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Memberships"],"summary":"Accept an Invitation.","description":"Creates the caller's Membership if the token is live and the caller's normalized email matches the Invitation. The recipient email is never echoed back. Retrying an accepted Invitation returns the Membership already recorded.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"example":"example-invitation-token"},"required":true,"name":"token","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The created or recorded Membership.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransitionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/invitations/{token}/decline":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Memberships"],"summary":"Decline an Invitation.","description":"Declines a pending Invitation addressed to the caller's normalized email without joining. Expired links remain declinable. Returns no Meal Space access facts. Exact retries replay the recorded result even after the Invitation is terminal.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"example":"example-invitation-token"},"required":true,"name":"token","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The declined Invitation.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeclineInvitationResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/memberships/{membershipId}/role":{"patch":{"security":[{"bearerAuth":[]}],"x-required-scope":"admin","x-credential-surface":"any","tags":["Memberships"],"summary":"Change a Membership's role.","description":"Changes an ordinary role. Ownership moves only through an ownership transfer.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000002"},"required":true,"name":"membershipId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"The new ordinary role.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeMembershipRoleRequest"}}}},"responses":{"200":{"description":"The changed Membership.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransitionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/memberships/{membershipId}/removal-preview":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Memberships"],"summary":"Preview the Sponsor impact of removing a Membership.","description":"Reports the availability the Meal Space would reach, the grace deadline, and the ways back. Reads nothing about the member's own billing.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000002"},"required":true,"name":"membershipId","in":"path"}],"responses":{"200":{"description":"The member-safe impact preview.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SponsorImpactPreview"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/memberships/{membershipId}/remove":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"admin","x-credential-surface":"any","tags":["Memberships"],"summary":"Remove a Membership.","description":"Ends another member's Membership. Available as a safety action while the Meal Space is writable, read-only, or deletion-pending. The current Owner cannot be removed.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000002"},"required":true,"name":"membershipId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The ended Membership.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransitionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/leave-preview":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Memberships"],"summary":"Preview the Sponsor impact of leaving a Meal Space.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000001"},"required":true,"name":"groupId","in":"path"}],"responses":{"200":{"description":"The member-safe impact preview.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SponsorImpactPreview"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/leave":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Memberships"],"summary":"Leave a Meal Space.","description":"Ends the caller's own Membership. The caller must declare what happened to their pending local writes, because leaving ends read access and the queue with it. The Owner must transfer ownership first.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000001"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"The pending-write disposition.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveMealSpaceRequest"}}}},"responses":{"200":{"description":"The ended Membership.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransitionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/invitations/{invitationId}/resend":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"admin","x-credential-surface":"any","tags":["Invitations"],"summary":"Rotate an invitation token and queue a new email.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"invitationId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The renewed invitation. Delivery is queued.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransitionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/invitations/{invitationId}/revoke":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"admin","x-credential-surface":"any","tags":["Invitations"],"summary":"Revoke a pending invitation and cancel queued delivery.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"invitationId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The revoked invitation.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransitionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/invitations/{invitationId}/role":{"patch":{"security":[{"bearerAuth":[]}],"x-required-scope":"admin","x-credential-surface":"any","tags":["Invitations"],"summary":"Change the role a recipient will receive on acceptance.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"invitationId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"The intended role.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeMembershipRoleRequest"}}}},"responses":{"200":{"description":"The updated invitation.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransitionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/ownership-requests":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"admin","x-credential-surface":"any","tags":["Ownership"],"summary":"Ask an active member to take ownership.","description":"Creates or replaces the Meal Space's single unresolved seven-day ownership request. Only the current Owner may ask. Blocked while the Meal Space is deletion-pending.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000001"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"The recipient Membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnershipRequestRequest"}}}},"responses":{"201":{"description":"The ownership request.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransitionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/ownership-requests/{requestId}/accept":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"admin","x-credential-surface":"any","tags":["Ownership"],"summary":"Accept an ownership transfer.","description":"Moves the canonical Owner pointer to the caller's Membership and makes the former Owner an Admin, in one transaction. The requester must still be the Owner.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000004"},"required":true,"name":"requestId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The accepted ownership request.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransitionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/sponsorship-requests":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"admin","x-credential-surface":"any","tags":["Sponsorship"],"summary":"Ask an entitled member to take over sponsorship.","description":"Creates or replaces the Meal Space's single unresolved seven-day handoff request. The current Sponsor, the Owner, or an Admin may ask. Blocked while deletion-pending.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000001"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"The recipient Membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SponsorshipRequestRequest"}}}},"responses":{"201":{"description":"The sponsorship handoff request.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransitionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/sponsorship-requests/{requestId}/accept":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Sponsorship"],"summary":"Accept a sponsorship handoff.","description":"Closes the current coverage period and opens the caller's, in one transaction. The caller must still hold a qualifying account entitlement.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000004"},"required":true,"name":"requestId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The accepted handoff request.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransitionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/sponsorship/volunteer":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Sponsorship"],"summary":"Volunteer to sponsor a Meal Space.","description":"Starts the caller's sponsorship without a handoff request. Available to any active member with a qualifying entitlement while coverage is vacant or lapsed.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000001"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The started sponsorship.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransitionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/sponsorship/relinquish-preview":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Sponsorship"],"summary":"Preview the impact of relinquishing sponsorship.","description":"Reports whether the Meal Space would enter paid grace or read-only, when grace would end, and how coverage could be restored.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000001"},"required":true,"name":"groupId","in":"path"}],"responses":{"200":{"description":"The member-safe impact preview.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SponsorImpactPreview"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/sponsorship/relinquish":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Sponsorship"],"summary":"Relinquish sponsorship of a Meal Space.","description":"Ends the caller's current coverage and derives paid grace or read-only from the retained entitlement facts.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000001"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The ended sponsorship.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransitionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/deletion-preview":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"first-party","tags":["Meal Space deletion"],"summary":"Review the content affected by shared Meal Space deletion.","description":"Only the current Owner may review deletion. Includes the cancellation deadline when deletion is pending.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000001"},"required":true,"name":"groupId","in":"path"}],"responses":{"200":{"description":"Affected content and cancellation deadline.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MealSpaceDeletionPreview"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/deletion-requests":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"delete","x-credential-surface":"first-party","tags":["Meal Space deletion"],"summary":"Request shared Meal Space deletion after a seven-day recovery window.","description":"Owner only, with recent authentication and the exact Meal Space name. Freezes shared writes and revokes pending invitations. Available even when sponsorship has lapsed.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000001"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"The Meal Space name entered by the Owner.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteMealSpaceRequest"}}}},"responses":{"201":{"description":"Deletion is pending.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransitionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/deletion/cancel":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"delete","x-credential-surface":"first-party","tags":["Meal Space deletion"],"summary":"Cancel shared Meal Space deletion before its deadline.","description":"Owner only. Restores access justified by current sponsorship; revoked invitations remain revoked.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000001"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"Deletion is cancelled.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransitionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/transfer-requests":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Transfers"],"summary":"List live transfer requests addressed to your active Memberships.","description":"Returns one kind of request in pages of 100. Eligibility describes the caller only; acceptance rechecks every condition in its transaction.","parameters":[{"schema":{"$ref":"#/components/schemas/TransferKind"},"required":true,"name":"kind","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"after","in":"query"}],"responses":{"200":{"description":"Recipient-only transfer requests.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransferRequestPage"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/transfer-requests/sent":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Transfers"],"summary":"List your live outgoing transfer requests.","description":"Returns one kind in pages of 100 for the caller's exact active requesting Memberships. Recipient display facts contain no entitlement details.","parameters":[{"schema":{"$ref":"#/components/schemas/TransferKind"},"required":true,"name":"kind","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"after","in":"query"}],"responses":{"200":{"description":"Your outgoing requests.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SentTransferRequestPage"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/ownership-requests/{requestId}/decline":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Transfers"],"summary":"Decline an ownership request addressed to you.","description":"Only the exact active recipient may decline, and only the exact active requester may cancel. Available without Pro and during read-only access or pending Meal Space deletion. Does not change ownership or sponsorship.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000004"},"required":true,"name":"requestId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The resolved request.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransitionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/ownership-requests/{requestId}/cancel":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Transfers"],"summary":"Cancel your ownership request.","description":"Only the exact active recipient may decline, and only the exact active requester may cancel. Available without Pro and during read-only access or pending Meal Space deletion. Does not change ownership or sponsorship.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000004"},"required":true,"name":"requestId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The resolved request.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransitionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/sponsorship-requests/{requestId}/decline":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Transfers"],"summary":"Decline a sponsorship request addressed to you.","description":"Only the exact active recipient may decline, and only the exact active requester may cancel. Available without Pro and during read-only access or pending Meal Space deletion. Does not change ownership or sponsorship.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000004"},"required":true,"name":"requestId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The resolved request.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransitionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/sponsorship-requests/{requestId}/cancel":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Transfers"],"summary":"Cancel your sponsorship request.","description":"Only the exact active recipient may decline, and only the exact active requester may cancel. Available without Pro and during read-only access or pending Meal Space deletion. Does not change ownership or sponsorship.","parameters":[{"schema":{"type":"string","format":"uuid","example":"3f1a0000-0000-4000-8000-000000000004"},"required":true,"name":"requestId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The resolved request.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TransitionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/me/preferences":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Account"],"summary":"Read your private preferences.","responses":{"200":{"description":"Saved preferences; null values mean no saved choice.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AccountPreferences"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Account"],"summary":"Save your timezone or primary Meal Space, or adopt a default timezone.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Your named timezone, your primary Meal Space, or a default timezone to adopt only when none is saved.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePreferencesRequest"}}}},"responses":{"200":{"description":"The saved preference.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AccountPreferences"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/me/trial":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Account"],"summary":"Review your trial eligibility without starting it.","responses":{"200":{"description":"Your private trial status and confirmation date in UTC.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TrialOffer"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"first-party","tags":["Account"],"summary":"Explicitly start your lifetime, no-card, fourteen-day trial.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"The UTC expiration date shown during confirmation.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateTrialRequest"}}}},"responses":{"200":{"description":"The activated trial. A retry does not extend it.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TrialActivation"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/sync/access":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Sync"],"summary":"Enumerate your readable Meal Spaces and Membership periods.","parameters":[{"schema":{"$ref":"#/components/schemas/AccessCursor"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"One page of a revision-bound access scan.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SyncAccessPage"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/sync/view":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Sync"],"summary":"Read the current server-defined Timeline window for a Membership.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"group_id","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"membership_id","in":"query"}],"responses":{"200":{"description":"Current Planning timezone and calendar bounds.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SyncView"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/sync/snapshot":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Sync"],"summary":"Begin recovery of one space, stream and fixed date window.","requestBody":{"description":"Authorized scope and current Timeline window.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BeginSnapshot"}}}},"responses":{"200":{"description":"Snapshot and delta cursors at a committed head.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SnapshotStarted"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Sync"],"summary":"Scan current rows by immutable key.","parameters":[{"schema":{"$ref":"#/components/schemas/DataCursor"},"required":true,"name":"cursor","in":"query"}],"responses":{"200":{"description":"A bounded snapshot page; catch up before publishing.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SnapshotPage"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/sync/pull":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Sync"],"summary":"Read current projections of journal references.","parameters":[{"schema":{"$ref":"#/components/schemas/DataCursor"},"required":true,"name":"cursor","in":"query"}],"responses":{"200":{"description":"A bounded delta page with scanned progress.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeltaPage"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/sync/push":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Sync"],"summary":"Apply a bounded batch through focused Entry commands.","requestBody":{"description":"Commands retain their own stable operation IDs across retries.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncPush"}}}},"responses":{"200":{"description":"Exact partition into content-free accepted and rejected outcomes.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PushResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/entries":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Entries"],"summary":"Read a page in a calendar-date window.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"$ref":"#/components/schemas/EntryDate"},"required":true,"name":"from","in":"query"},{"schema":{"$ref":"#/components/schemas/EntryDate"},"required":true,"name":"to","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"after","in":"query"}],"responses":{"200":{"description":"Entries ordered by ID; to is exclusive.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EntryPage"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Entries"],"summary":"Create a non-Recipe Entry.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Entry and originating Membership period.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEntryRequest"}}}},"responses":{"200":{"description":"Content-free command outcome; fetch current Entry separately.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EntryCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/entries/{entryId}":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Entries"],"summary":"Read one current Entry.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"entryId","in":"path"}],"responses":{"200":{"description":"The current Entry.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MealEntry"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Entries"],"summary":"Correct Entry details or its explicit status.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"entryId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Complete editable content and client timestamp.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditEntryRequest"}}}},"responses":{"200":{"description":"Content-free command outcome; fetch current Entry separately.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EntryCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"security":[{"bearerAuth":[]}],"x-required-scope":"delete","x-credential-surface":"any","tags":["Entries"],"summary":"Delete an Entry, confirming History deletion when past.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"entryId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Current Membership and explicit History confirmation.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteEntryRequest"}}}},"responses":{"200":{"description":"Content-free command outcome; fetch current Entry separately.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EntryCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/entries/{entryId}/move":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Entries"],"summary":"Change an Entry's date, Slot, or position.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"entryId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Destination within the same Meal Space.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveEntryRequest"}}}},"responses":{"200":{"description":"Content-free command outcome; fetch current Entry separately.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EntryCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/entries/{entryId}/reorder":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Entries"],"summary":"Reorder an Entry within its date and Slot.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"entryId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Current schedule guards, relative step or anchored placement, Membership, and client timestamp.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderEntryRequest"}}}},"responses":{"200":{"description":"Content-free command outcome; fetch current Entry separately.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EntryCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/entries/{entryId}/replace":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Entries"],"summary":"Preserve the planned Entry and link its replacement.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"entryId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Replacement with the same date and Slot.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceEntryRequest"}}}},"responses":{"200":{"description":"Content-free command outcome; fetch current Entry separately.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EntryCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/preferences/move":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Meal Spaces"],"summary":"Move a Meal Space one step in your private order.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Adjacent move and client clock.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveSpaceOrder"}}}},"responses":{"200":{"description":"Content-free result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PresentationResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/presentation":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Meal Spaces"],"summary":"Read Timeline presentation for the current Membership period.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"membership_id","in":"query"}],"responses":{"200":{"description":"Shared presentation, your preferences and Planning Today.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TimelinePresentation"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"put":{"security":[{"bearerAuth":[]}],"x-required-scope":"admin","x-credential-surface":"any","tags":["Meal Spaces"],"summary":"Set shared planning and presentation choices.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Presentation choices.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSpacePresentation"}}}},"responses":{"200":{"description":"Content-free result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PresentationResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/preferences":{"put":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Meal Spaces"],"summary":"Set your private Timeline visibility and order.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Private preferences.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSpacePreferences"}}}},"responses":{"200":{"description":"Content-free result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PresentationResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/recipes":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Recipes"],"summary":"Search or browse Recipes across every readable Meal Space.","parameters":[{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":100}]},"required":false,"name":"meal_space_id","in":"query"},{"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":50},{"type":"array","items":{"type":"string","minLength":1,"maxLength":50},"minItems":1,"maxItems":20}]},"required":false,"name":"tag","in":"query"},{"schema":{"type":"string","enum":["breakfast","lunch","dinner","dessert","drink","snack","side"]},"required":false,"name":"category","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"uncategorized","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"favorites","in":"query"},{"schema":{"$ref":"#/components/schemas/OpaqueCursor"},"required":false,"name":"after","in":"query"},{"schema":{"type":"string","pattern":"^(?:[1-9]|[1-4][0-9]|50)$"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Active Recipes; pass next_after back unchanged to continue.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipePage"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipes/{recipeId}":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Recipes"],"summary":"Read one active Recipe with the caller's private Favorite state.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recipeId","in":"path"}],"responses":{"200":{"description":"The current Recipe.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Recipe"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recipes"],"summary":"Conditionally apply an edit against the revision it opened.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recipeId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Opening revision and aggregate plus the local candidate.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditRecipeRequest"}}}},"responses":{"200":{"description":"Applied, unchanged, or a conflict that committed nothing.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeEditResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"security":[{"bearerAuth":[]}],"x-required-scope":"delete","x-credential-surface":"any","tags":["Recipes"],"summary":"Delete a Recipe. Owner and Admin only in a shared Meal Space.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recipeId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Current Membership and client time.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteRecipeRequest"}}}},"responses":{"200":{"description":"Content-free outcome.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeDeleteResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipes":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recipes"],"summary":"Create a Recipe with a client-generated UUID.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Recipe content and originating Membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRecipeRequest"}}}},"responses":{"200":{"description":"Content-free outcome and same-space Recipes that share the source URL.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeCreateResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipes/{recipeId}/favorite":{"put":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recipes"],"summary":"Set the caller's private Favorite on a readable Recipe.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recipeId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Favorite value and client time.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetRecipeFavoriteRequest"}}}},"responses":{"200":{"description":"The saved Favorite value.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeFavoriteResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/tags":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Recipes"],"summary":"Read the Meal Space Tag vocabulary.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"}],"responses":{"200":{"description":"Tags by normalized name.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MealSpaceTagList"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipes/{recipeId}/deletion-preview":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Recipes"],"summary":"List future planned Entries a deletion would convert or remove.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recipeId","in":"path"}],"responses":{"200":{"description":"Future planned Recipe Entries and the count of past Entries that keep their labels.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeDeletionPreview"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipes/{recipeId}/copy":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recipes"],"summary":"Copy a readable Recipe into a writable Meal Space, or Duplicate it in place.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recipeId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Destination and optional Duplicate title.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyRecipeRequest"}}}},"responses":{"200":{"description":"The new Recipe identity.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeCopyResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipes/{recipeId}/transfer":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"delete","x-credential-surface":"any","tags":["Recipes"],"summary":"Move a Recipe to another Meal Space with a new identity (Owner or Admin).","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recipeId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Destination and future-plan resolution.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferRecipeRequest"}}}},"responses":{"200":{"description":"The new Recipe identity.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeCopyResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/history":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["History"],"summary":"Read past Entries across readable Meal Spaces, newest first.","parameters":[{"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":100}]},"required":false,"name":"meal_space_id","in":"query"},{"schema":{"$ref":"#/components/schemas/EntryDate"},"required":false,"name":"from","in":"query"},{"schema":{"$ref":"#/components/schemas/EntryDate"},"required":false,"name":"before","in":"query"},{"schema":{"$ref":"#/components/schemas/OpaqueCursor"},"required":false,"name":"after","in":"query"},{"schema":{"type":"string","pattern":"^(?:[1-9]|[1-9][0-9]|100)$"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Past Entries by date descending; pass next_after back unchanged to continue.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/HistoryPage"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/history/meals":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["History"],"summary":"Every distinct meal one Meal Space has eaten, most often first, with its latest Entry.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"}],"responses":{"200":{"description":"Up to 200 past meals; a Recipe groups its Variations, other meals group by type and title.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MealSpacePastMeals"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/stats":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Stats"],"summary":"Compute Recipe Stats for one Meal Space and range.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","enum":["30d","90d","1y","all"]},"required":true,"name":"range","in":"query"}],"responses":{"200":{"description":"Rankings computed from History.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MealSpaceStats"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipes/{recipeId}/stats":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Stats"],"summary":"Read Last made and all-time counts for one Recipe.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recipeId","in":"path"}],"responses":{"200":{"description":"All-time Recipe figures.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeStats"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/stats/regulars":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Stats"],"summary":"Meals made at least twice in the last four weeks, with their latest meal for planning again.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"}],"responses":{"200":{"description":"Regular meals from the full four-week History window.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MealSpaceRegulars"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipes/{recipeId}/variations":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Recipes"],"summary":"List active Variations by name, or the Archived management list.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recipeId","in":"path"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"archived","in":"query"}],"responses":{"200":{"description":"Variations with reference counts.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeVariationList"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recipes"],"summary":"Create a named Variation of a Recipe.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recipeId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Variation name, overrides, and Tags.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRecipeVariationRequest"}}}},"responses":{"200":{"description":"Content-free Variation outcome.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VariationCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/variations/{variationId}":{"patch":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recipes"],"summary":"Save a Variation's name, overrides, and Tags (last write wins).","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"variationId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Save a Variation's name, overrides, and Tags (last write wins).","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRecipeVariationRequest"}}}},"responses":{"200":{"description":"Content-free Variation outcome.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VariationCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/variations/{variationId}/duplicate":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recipes"],"summary":"Copy an active Variation's overrides and Tags under a new name.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"variationId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Copy an active Variation's overrides and Tags under a new name.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateRecipeVariationRequest"}}}},"responses":{"200":{"description":"Content-free Variation outcome.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VariationCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/variations/{variationId}/remove":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"delete","x-credential-surface":"any","tags":["Recipes"],"summary":"Archive a referenced Variation or delete an unused one.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"variationId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Archive a referenced Variation or delete an unused one; optionally move its Notes to the Recipe first.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveRecipeVariationRequest"}}}},"responses":{"200":{"description":"Content-free Variation outcome.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VariationCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/variations/{variationId}/restore":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recipes"],"summary":"Restore an Archived Variation with the same identity.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"variationId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Restore an Archived Variation with the same identity.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariationLifecycleRequest"}}}},"responses":{"200":{"description":"Content-free Variation outcome.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VariationCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/variations/{variationId}/removal-preview":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Recipes"],"summary":"Say whether removal archives, deletes, or is blocked, and why.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"variationId","in":"path"}],"responses":{"200":{"description":"Archive, delete, or blocked while a live recurring meal uses the Variation, with references.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VariationRemovalPreview"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/variations/{variationId}/promote":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recipes"],"summary":"Fold a Variation into its Recipe, move its Notes there, and remove it.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"variationId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"The Variation's effective content and the revisions it was computed from.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoteRecipeVariationRequest"}}}},"responses":{"200":{"description":"Applied with the new Recipe revision, or stale.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PromoteRecipeVariationResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipes/{recipeId}/preferred-variation":{"put":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recipes"],"summary":"Choose the version a Recipe opens to for the caller.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recipeId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"An active Variation of the Recipe, or null for the Recipe itself.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPreferredVariationRequest"}}}},"responses":{"200":{"description":"The saved choice.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PreferredVariationResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipes/{recipeId}/notes":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Recipes"],"summary":"General Notes plus the named Variation's Notes, or every active Variation's with all=true, newest first.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recipeId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"variation_id","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"all","in":"query"}],"responses":{"200":{"description":"Notes with scope and attribution.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeNoteList"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recipes"],"summary":"Add a general or Variation Note.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recipeId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Note body and optional Variation scope.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRecipeNoteRequest"}}}},"responses":{"200":{"description":"Content-free Note outcome.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/NoteCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/notes/{noteId}":{"patch":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recipes"],"summary":"Edit a Note's body or scope (author, Owner, or Admin).","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"noteId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Note body and scope.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRecipeNoteRequest"}}}},"responses":{"200":{"description":"Content-free Note outcome.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/NoteCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"security":[{"bearerAuth":[]}],"x-required-scope":"delete","x-credential-surface":"any","tags":["Recipes"],"summary":"Delete a Note (author, Owner, or Admin).","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"noteId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Current Membership and client time.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteRecipeNoteRequest"}}}},"responses":{"200":{"description":"Content-free Note outcome.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/NoteCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/tags/{tagId}":{"patch":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recipes"],"summary":"Rename a Tag across the Meal Space (Owner or Admin).","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"tagId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"New display name.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameMealSpaceTagRequest"}}}},"responses":{"200":{"description":"Content-free Tag outcome.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TagCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"security":[{"bearerAuth":[]}],"x-required-scope":"delete","x-credential-surface":"any","tags":["Recipes"],"summary":"Delete a Tag and its links (Owner or Admin).","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"tagId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Current Membership and client time.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteMealSpaceTagRequest"}}}},"responses":{"200":{"description":"Content-free Tag outcome.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TagCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/tags/{tagId}/change-preview":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Recipes"],"summary":"Count the Recipes and Variations a Tag change affects.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"tagId","in":"path"}],"responses":{"200":{"description":"Affected content counts.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TagChangePreview"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/me/recipe-allowance":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Recipes"],"summary":"Review your Free Personal Recipe allowance and which Recipes stay active if Pro ends.","responses":{"200":{"description":"Your private allowance state.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeAllowance"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"put":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recipes"],"summary":"Choose up to five Personal Recipes to keep active when Pro ends.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"The complete choice; it replaces any earlier one.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChooseRecipeAllowanceRequest"}}}},"responses":{"200":{"description":"The allowance with the new choice.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeAllowance"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/recipes/archived":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Recipes"],"summary":"Search or browse locked Recipes as management rows.","parameters":[{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":100}]},"required":false,"name":"meal_space_id","in":"query"},{"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":50},{"type":"array","items":{"type":"string","minLength":1,"maxLength":50},"minItems":1,"maxItems":20}]},"required":false,"name":"tag","in":"query"},{"schema":{"type":"string","enum":["breakfast","lunch","dinner","dessert","drink","snack","side"]},"required":false,"name":"category","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"uncategorized","in":"query"},{"schema":{"$ref":"#/components/schemas/OpaqueCursor"},"required":false,"name":"after","in":"query"},{"schema":{"type":"string","pattern":"^(?:[1-9]|[1-4][0-9]|50)$"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Archived Recipes without cooking content; pass next_after back unchanged to continue.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ArchivedRecipePage"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipes/{recipeId}/archived":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Recipes"],"summary":"Read a locked Recipe read-only, for export.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recipeId","in":"path"}],"responses":{"200":{"description":"The locked Recipe with its archive reason.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Recipe"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/entries/{entryId}/recipe":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Recipes"],"summary":"Read the Recipe and Variation an Entry cooks.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"entryId","in":"path"}],"responses":{"200":{"description":"A locked Recipe opens here only while the Entry is planned for today or later.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EntryRecipe"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/recipes/import-url":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recipes"],"summary":"Import a Recipe page into an unsaved draft. AI runs only when the request confirms it.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"The page, an optional chosen candidate, and AI confirmation.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportUrlRequest"}}}},"responses":{"200":{"description":"An unsaved draft, a choice between candidates, a request to confirm AI, or a closed failure.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeImportResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/recipes/import-text":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recipes"],"summary":"Turn pasted text into an unsaved draft with one metered AI action.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"The pasted Recipe text.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportTextRequest"}}}},"responses":{"200":{"description":"An unsaved draft, a choice between candidates, a request to confirm AI, or a closed failure.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeImportResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/me/ai-usage":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Account"],"summary":"Review your AI actions for the current allowance period.","responses":{"200":{"description":"Your limit, committed actions, and live holds.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AiUsage"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipe-source-matches":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Recipes"],"summary":"Before saving an import, find Recipes in the destination with the same source.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","maxLength":2048},"required":false,"name":"source_url","in":"query"},{"schema":{"type":"string","maxLength":400},"required":false,"name":"title","in":"query"}],"responses":{"200":{"description":"Same-source matches, or same-title warnings.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeSourceMatches"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipe-image-import":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recipes"],"summary":"Retrieve a bounded public still image for an authorized destination.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"membership_id","in":"query"}],"requestBody":{"required":true,"description":"External public image URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeImageImportRequest"}}}},"responses":{"200":{"description":"Private no-store JPEG, PNG, WebP or HEIC bytes. At most 10 MiB; client must decode and scrub before upload.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}},"image/heic":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipe-images/{imageId}":{"put":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recipes"],"summary":"Issue an upload slot for a Recipe image. Repeating it returns the same slot.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"imageId","in":"path"}],"responses":{"200":{"description":"Upload the scrubbed JPEG master and card to these paths within a day, then save the Recipe.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeImageSlot"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipe-images/{imageId}/{size}":{"put":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recipes"],"summary":"Write an immutable private JPEG, at most 10 MiB.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"imageId","in":"path"},{"schema":{"type":"string","enum":["master","card"]},"required":true,"name":"size","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"membership_id","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Retain this key, slot, size and bytes on retry. Deduplication is by immutable object identity, not a stored key receipt. Identical bytes return unchanged; different bytes conflict regardless of key."},"required":true,"description":"Retain this key, slot, size and bytes on retry. Deduplication is by immutable object identity, not a stored key receipt. Identical bytes return unchanged; different bytes conflict regardless of key.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Applied or verified byte-identical retry.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeImageUploadResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipes/{recipeId}/image":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Recipes"],"summary":"Read the current authorized Recipe or active Variation image.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recipeId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"membership_id","in":"query"},{"schema":{"type":"string","enum":["master","card"]},"required":true,"name":"size","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"expected_image_id","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"variation_id","in":"query"}],"responses":{"200":{"description":"Private, no-store JPEG bytes.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/entries/{entryId}/recipe-image":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Recipes"],"summary":"Read the effective image through a qualifying Entry Recipe read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"entryId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"membership_id","in":"query"},{"schema":{"type":"string","enum":["master","card"]},"required":true,"name":"size","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"expected_image_id","in":"query"}],"responses":{"200":{"description":"Private, no-store JPEG bytes.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipes/{recipeId}/step-images/{imageId}":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Recipes"],"summary":"Read a step photo that the Recipe, or the named active Variation, shows.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recipeId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"imageId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"membership_id","in":"query"},{"schema":{"type":"string","enum":["master","card"]},"required":true,"name":"size","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"variation_id","in":"query"}],"responses":{"200":{"description":"Private, no-store JPEG bytes.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/entries/{entryId}/recipe-step-images/{imageId}":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Recipes"],"summary":"Read a step photo through a qualifying Entry Recipe read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"entryId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"imageId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"membership_id","in":"query"},{"schema":{"type":"string","enum":["master","card"]},"required":true,"name":"size","in":"query"}],"responses":{"200":{"description":"Private, no-store JPEG bytes.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipes/{recipeId}/nutrition":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Recipes"],"summary":"Read the saved nutrition for a Recipe or Variation, or null when none is saved.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recipeId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"variationId","in":"query"}],"responses":{"200":{"description":"The saved nutrition, or null when it has not been generated.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeNutrition"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipes/{recipeId}/nutrition/generate":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recipes"],"summary":"Generate or regenerate nutrition for a Recipe or Variation with one metered AI action.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recipeId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"The ingredient fingerprint and version the client last saw.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRecipeNutritionRequest"}}}},"responses":{"200":{"description":"The saved nutrition, or a closed failure that charged nothing.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GenerateRecipeNutritionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipes/{recipeId}/nutrition/overrides":{"put":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recipes"],"summary":"Set or clear hand-entered values over saved nutrition. Free of charge.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recipeId","in":"path"}],"requestBody":{"description":"The nutrients to set, or null to clear.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeNutritionOverridesRequest"}}}},"responses":{"200":{"description":"The nutrition with the new overrides.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeNutrition"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/me/ai-features":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Account"],"summary":"List the AI operations this deployment currently offers.","responses":{"200":{"description":"The enabled AI operations.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AiFeatures"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipes/{recipeId}/share-link":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"first-party","tags":["Recipe links"],"summary":"Read your public link to the Base Recipe or one Variation, if you made one.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recipeId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"variation_id","in":"query"}],"responses":{"200":{"description":"Your live link, or null, and whether your account allows public links.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeShareLinkState"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"put":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"first-party","tags":["Recipe links"],"summary":"Publish the Base Recipe or one Variation, or return the link you already made for it.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recipeId","in":"path"}],"requestBody":{"description":"The version to publish.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRecipeShareLinkRequest"}}}},"responses":{"200":{"description":"The version's public link.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeShareLink"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/me/recipe-share-links":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"first-party","tags":["Recipe links"],"summary":"List your public links that still work, newest first.","responses":{"200":{"description":"Your live links.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/MyRecipeShareLinks"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/me/recipe-share-links/{linkId}":{"delete":{"security":[{"bearerAuth":[]}],"x-required-scope":"delete","x-credential-surface":"first-party","tags":["Recipe links"],"summary":"Stop one of your public links. Its URL never works again.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"linkId","in":"path"}],"responses":{"200":{"description":"Revoked, or unchanged when the link was already gone or not yours.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RevokeRecipeShareLinkResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/me/recipe-link-sharing":{"put":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"first-party","tags":["Recipe links"],"summary":"Turn public links on or off for your account. Off stops every link you made.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Whether your account allows public links.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeLinkSharing"}}}},"responses":{"200":{"description":"The saved switch.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeLinkSharing"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipes/import-share":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recipe links"],"summary":"Save the version a public link shows as a new Recipe in this Meal Space.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"The link's token and the new Recipe's identity.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportSharedRecipeRequest"}}}},"responses":{"200":{"description":"The new Recipe.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeCreateResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/ideas":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Ideas"],"summary":"Read the Meal Space Ideas backlog.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","enum":["active","archived"]},"required":false,"name":"mode","in":"query"},{"schema":{"type":"string"},"required":false,"name":"q","in":"query"},{"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":20}]},"required":false,"name":"tag","in":"query"},{"schema":{"$ref":"#/components/schemas/OpaqueCursor"},"required":false,"name":"after","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Idea result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IdeaList"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Ideas"],"summary":"Add an Idea.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Idea command and current Membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIdeaRequest"}}}},"responses":{"200":{"description":"Idea result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IdeaCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/ideas/{ideaId}":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Ideas"],"summary":"Read one Idea.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"ideaId","in":"path"},{"schema":{"type":"string","enum":["active","archived"]},"required":false,"name":"mode","in":"query"}],"responses":{"200":{"description":"Idea result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IdeaRead"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Ideas"],"summary":"Edit Idea content.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"ideaId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Idea command and current Membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditIdeaRequest"}}}},"responses":{"200":{"description":"Idea result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IdeaCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"security":[{"bearerAuth":[]}],"x-required-scope":"delete","x-credential-surface":"any","tags":["Ideas"],"summary":"Permanently remove an unchanged Idea.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"ideaId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Idea command and current Membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteIdeaRequest"}}}},"responses":{"200":{"description":"Idea result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IdeaCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/ideas/{ideaId}/archive":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Ideas"],"summary":"Archive an unchanged Idea for its Meal Space.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"ideaId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Idea command and current Membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveIdeaRequest"}}}},"responses":{"200":{"description":"Idea result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IdeaCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/ideas/{ideaId}/restore":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Ideas"],"summary":"Restore an unchanged Idea for its Meal Space.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"ideaId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Idea command and current Membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreIdeaRequest"}}}},"responses":{"200":{"description":"Idea result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IdeaCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/ideas/{ideaId}/reorder":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Ideas"],"summary":"Place an Idea before or after a current anchor.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"ideaId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Idea command and current Membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderIdeaRequest"}}}},"responses":{"200":{"description":"Idea result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IdeaCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/ideas/{ideaId}/recipe":{"put":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Ideas"],"summary":"Link or unlink a Recipe and optional Variation.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"ideaId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Idea command and current Membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkIdeaRequest"}}}},"responses":{"200":{"description":"Idea result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IdeaCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/ideas/{ideaId}/schedule":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Ideas"],"summary":"Schedule an independent Entry and retain the Idea.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"ideaId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Idea command and current Membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleIdeaRequest"}}}},"responses":{"200":{"description":"Idea result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IdeaScheduleResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/ideas/{ideaId}/convert":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Ideas"],"summary":"Create a Recipe and link the retained Idea.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"ideaId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Idea command and current Membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertIdeaRequest"}}}},"responses":{"200":{"description":"Idea result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IdeaConvertResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/ideas/{ideaId}/copy":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Ideas"],"summary":"Copy an Idea to another writable Meal Space without links.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"ideaId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Idea command and current Membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CopyIdeaRequest"}}}},"responses":{"200":{"description":"Idea result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IdeaCopyResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recurring-meals":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Recurring meals"],"summary":"Read live or ended recurring meals.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","enum":["live","ended"]},"required":false,"name":"status","in":"query"},{"schema":{"$ref":"#/components/schemas/OpaqueCursor"},"required":false,"name":"after","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Recurring meal page.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurringMealList"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recurring meals"],"summary":"Make a planned meal recurring.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Recurring meal command and current Membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRecurringMealRequest"}}}},"responses":{"200":{"description":"Recurring meal command result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurrenceCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recurring-meals/preview":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Recurring meals"],"summary":"Preview the dates a schedule would plan, and the Slots already taken.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"source_entry_id","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"recurring_meal_id","in":"query"},{"schema":{"type":"string","enum":["day","week"]},"required":true,"name":"interval_unit","in":"query"},{"schema":{"type":"integer"},"required":true,"name":"interval_count","in":"query"},{"schema":{"$ref":"#/components/schemas/EntryDate"},"required":false,"name":"starts_on","in":"query"},{"schema":{"type":"string","enum":["breakfast","lunch","dinner","snack","dessert"]},"required":false,"name":"slot","in":"query"}],"responses":{"200":{"description":"Recurring meal preview.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurrencePreview"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recurring-meals/{recurringMealId}":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Recurring meals"],"summary":"Read one recurring meal.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recurringMealId","in":"path"}],"responses":{"200":{"description":"Recurring meal.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurringMealRead"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"patch":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recurring meals"],"summary":"Edit a recurring meal's content, schedule, end date, or skipped dates.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recurringMealId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Recurring meal command and current Membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditRecurringMealRequest"}}}},"responses":{"200":{"description":"Recurring meal command result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurrenceCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"security":[{"bearerAuth":[]}],"x-required-scope":"delete","x-credential-surface":"any","tags":["Recurring meals"],"summary":"Permanently remove a recurring meal with no past meals.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recurringMealId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Recurring meal command and current Membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteRecurringMealRequest"}}}},"responses":{"200":{"description":"Recurring meal command result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurrenceCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recurring-meals/{recurringMealId}/pause":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recurring meals"],"summary":"Pause a recurring meal and remove its upcoming planned meals.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recurringMealId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Recurring meal command and current Membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PauseRecurringMealRequest"}}}},"responses":{"200":{"description":"Recurring meal command result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurrenceCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recurring-meals/{recurringMealId}/resume":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recurring meals"],"summary":"Resume a paused or suspended recurring meal.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recurringMealId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Recurring meal command and current Membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeRecurringMealRequest"}}}},"responses":{"200":{"description":"Recurring meal command result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurrenceCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recurring-meals/{recurringMealId}/end":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recurring meals"],"summary":"End a recurring meal on a date, keeping its past meals.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recurringMealId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Recurring meal command and current Membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndRecurringMealRequest"}}}},"responses":{"200":{"description":"Recurring meal command result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurrenceCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recurring-meals/{recurringMealId}/skip":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recurring meals"],"summary":"Skip one upcoming occurrence.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recurringMealId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Recurring meal command and current Membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OccurrenceRequest"}}}},"responses":{"200":{"description":"Recurring meal command result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurrenceCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recurring-meals/{recurringMealId}/restore":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recurring meals"],"summary":"Restore one skipped occurrence.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"recurringMealId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Recurring meal command and current Membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OccurrenceRequest"}}}},"responses":{"200":{"description":"Recurring meal command result.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurrenceCommandResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recurring-meals/resume-suspended":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Recurring meals"],"summary":"Resume the recurring meals that stopped when Personal Pro ended.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Recurring meal command and current Membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeSuspendedRequest"}}}},"responses":{"200":{"description":"Resumed recurring meals.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ResumeSuspendedResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/integrations/togetherdone":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Integration"],"summary":"Read your TogetherDone connection without tokens.","responses":{"200":{"description":"Your personal connection.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IntegrationConnection"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"first-party","tags":["Integration"],"summary":"Revoke your TogetherDone connection.","responses":{"200":{"description":"The connection is revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IntegrationConnection"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/integrations/togetherdone/connect":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"first-party","tags":["Integration"],"summary":"Start a TogetherDone authorization-code flow.","requestBody":{"description":"Where TogetherDone should send the browser back.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConnectRequest"}}}},"responses":{"200":{"description":"Open this URL to approve access.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IntegrationConnectResponse"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/integrations/togetherdone/callback":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"first-party","tags":["Integration"],"summary":"Exchange a TogetherDone authorization code.","requestBody":{"description":"The code and state from the redirect.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationCallbackRequest"}}}},"responses":{"200":{"description":"The connection is active.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IntegrationConnection"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"412":{"description":"Connect or reconnect TogetherDone, or choose another list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/integrations/togetherdone/lists":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Integration"],"summary":"List grocery lists on your TogetherDone account.","responses":{"200":{"description":"Lists you can send to.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GroceryLists"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"412":{"description":"Connect or reconnect TogetherDone, or choose another list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/integrations/togetherdone/sections":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Integration"],"summary":"List named sections in a TogetherDone list.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"list_id","in":"query"}],"responses":{"200":{"description":"Sections you can send to.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GrocerySections"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"412":{"description":"Connect or reconnect TogetherDone, or choose another list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/integrations/togetherdone/preview":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Integration"],"summary":"Resolve unselected ingredient lines for review.","requestBody":{"description":"Recipes or planned Recipe Entries you can read.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroceryPreviewRequest"}}}},"responses":{"200":{"description":"Lines start unselected. Headings are omitted. Nothing is sent.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GroceryPreview"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/integrations/togetherdone/send":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Integration"],"summary":"Send reviewed ingredients to your TogetherDone list.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"The reviewed outgoing items.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrocerySendRequest"}}}},"responses":{"200":{"description":"Per-item results. Retries reuse the idempotency key.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GrocerySendResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"412":{"description":"Connect or reconnect TogetherDone, or choose another list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/integrations/togetherdone/sends/{runId}/finish":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Integration"],"summary":"Retry only the failed items from a partial Send.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"runId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The failed items were retried.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GrocerySendResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"412":{"description":"Connect or reconnect TogetherDone, or choose another list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/integrations/togetherdone/send-states":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Integration"],"summary":"Read your private Sent state for planned meals.","requestBody":{"description":"Entry ids to look up.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrocerySendStatesRequest"}}}},"responses":{"200":{"description":"Sent or partially sent Entries only.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GrocerySendStates"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/suggestions":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Suggestions"],"summary":"Propose meals for selected placements. Nothing is added to the plan.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"One Meal Space, up to ten open placements, and up to three priorities.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestMealsRequest"}}}},"responses":{"200":{"description":"A usable suggestion set, or a failure that consumed no AI action.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SuggestionSet"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"412":{"description":"A selected placement now holds a meal. Refresh the plan and choose again; no AI action was spent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/suggestions/recipe-drafts":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Suggestions"],"summary":"Generate an unsaved Recipe draft from a new meal idea or the member's description. The draft is not saved.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"The destination Meal Space, a title or the member's description (or both), and optional priorities.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRecipeDraftRequest"}}}},"responses":{"200":{"description":"An unsaved draft with review copy, or a failure that consumed no AI action.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeDraftGeneration"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/suggestions/pool":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Suggestions"],"summary":"Propose seven meal options for any day. Nothing is saved.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"One Meal Space.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestionPoolRequest"}}}},"responses":{"200":{"description":"Seven usable options or an uncharged failure.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SuggestionPool"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"412":{"description":"Meal Space guidance, membership or Recipes changed. Request fresh suggestions; no AI action was spent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/ai-guidance":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Suggestions"],"summary":"Read shared Meal Space allergy and preference guidance.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"membership_id","in":"query"}],"responses":{"200":{"description":"Shared AI guidance and its revision.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AiGuidance"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"put":{"security":[{"bearerAuth":[]}],"x-required-scope":"admin","x-credential-surface":"any","tags":["Suggestions"],"summary":"Save shared AI guidance as an owner or admin.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Guidance with membership and expected revision.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAiGuidance"}}}},"responses":{"200":{"description":"Shared AI guidance and its revision.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AiGuidance"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/suggestions/discover":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Suggestions"],"summary":"Discover up to five new website recipes to extend a Meal Space's rotation.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"The Meal Space whose rotation and guidance inform discovery.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoverRecipesRequest"}}}},"responses":{"200":{"description":"Checked recipe cards or an uncharged failure.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecipeDiscovery"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipe-discoveries/{discoveryId}/add":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Suggestions"],"summary":"Import a checked recipe and add it to rotation atomically, without scheduling it.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"discoveryId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"The current Meal Space membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveryActionRequest"}}}},"responses":{"200":{"description":"The saved action; retries do not duplicate the recipe or rotation idea.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DiscoveryActionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipe-discoveries/{discoveryId}/dismiss":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Suggestions"],"summary":"Dismiss a discovered recipe for this member and Meal Space.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"discoveryId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"The current Meal Space membership.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveryActionRequest"}}}},"responses":{"200":{"description":"The saved action; retries do not duplicate the recipe or rotation idea.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DiscoveryActionResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/meal-spaces/{groupId}/recipe-discoveries":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Suggestions"],"summary":"Restore this member's current recipe suggestions without spending an AI action.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"membership_id","in":"query"}],"responses":{"200":{"description":"The retained batch, or null before first discovery.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CurrentRecipeDiscoveries"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/me/planning-reminder":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["Account"],"summary":"Read your planning reminder.","responses":{"200":{"description":"The saved reminder, or null when you have not chosen one. Delivery rows are not included.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PlanningReminderResponse"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"put":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"any","tags":["Account"],"summary":"Save your planning reminder in your profile timezone.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Weekday, local time, cadence, first date, and whether delivery is enabled.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePlanningReminderRequest"}}}},"responses":{"200":{"description":"The saved reminder.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PlanningReminderResponse"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/me/notification-registration/reconcile":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"first-party","tags":["Account"],"summary":"Reconcile this installation's push notification registration.","requestBody":{"description":"Installation possession and the device's current OneSignal subscription state.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconcileNotificationRegistrationRequest"}}}},"responses":{"200":{"description":"The registration receipt. Binding alone never confirms delivery.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/NotificationRegistrationReceipt"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/me/notification-registration/deactivate":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"first-party","tags":["Account"],"summary":"Stop push delivery to this installation for your account.","requestBody":{"description":"Installation possession proof.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeactivateNotificationRegistrationRequest"}}}},"responses":{"200":{"description":"The installation no longer receives your reminders.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/NotificationRegistrationDeactivated"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/api-keys":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["API keys"],"summary":"List your API keys, newest first. Keys are never shown again after creation.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"$ref":"#/components/schemas/OpaqueCursor"},"required":false,"name":"after","in":"query"}],"responses":{"200":{"description":"A page of your API keys.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiKeyPage"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"first-party","tags":["API keys"],"summary":"Create an API key. The response is the only time the key is shown.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"The key's name, scopes and optional expiry.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}}},"responses":{"201":{"description":"The new key, shown once.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiKeyCreated"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/api-keys/{keyId}":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"any","tags":["API keys"],"summary":"Read one of your API keys.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"keyId","in":"path"}],"responses":{"200":{"description":"The key's metadata.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiKey"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"delete":{"security":[{"bearerAuth":[]}],"x-required-scope":"delete","x-credential-surface":"first-party","tags":["API keys"],"summary":"Revoke an API key. Revoking one that is already revoked changes nothing.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"keyId","in":"path"}],"responses":{"200":{"description":"The revoked key.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiKey"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/oauth/clients/{clientId}":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"first-party","tags":["Connected apps"],"summary":"Read the app an authorization request names, for the consent page.","description":"An id that is a Client ID Metadata Document URL is fetched and cached first when no fresh copy exists; a disabled or unknown app is not found.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^\\S+$","description":"A registered client id, or a Client ID Metadata Document URL, percent-encoded.","example":"claude-web"},"required":true,"description":"A registered client id, or a Client ID Metadata Document URL, percent-encoded.","name":"clientId","in":"path"}],"responses":{"200":{"description":"The app.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/OAuthClient"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/oauth/authorizations":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"first-party","tags":["Connected apps"],"summary":"Approve or deny an app's authorization request.","description":"Approving needs your own Pro plan or an active trial and returns the app's redirect with a single-use code; denying is always allowed and returns it with `error=access_denied`.","requestBody":{"description":"The request and the decision.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthAuthorizationRequest"}}}},"responses":{"200":{"description":"Where to send the browser.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/OAuthAuthorizationResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/me/oauth-connections":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"first-party","tags":["Connected apps"],"summary":"List the apps that can reach your account, most recently used first.","responses":{"200":{"description":"Your connected apps.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/OAuthConnectionList"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/me/oauth-connections/{clientId}":{"delete":{"security":[{"bearerAuth":[]}],"x-required-scope":"delete","x-credential-surface":"first-party","tags":["Connected apps"],"summary":"Disconnect an app: every token it holds for you stops working.","description":"Disconnecting an app with nothing live changes nothing.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^\\S+$","description":"A registered client id, or a Client ID Metadata Document URL, percent-encoded.","example":"claude-web"},"required":true,"description":"A registered client id, or a Client ID Metadata Document URL, percent-encoded.","name":"clientId","in":"path"}],"responses":{"200":{"description":"How many tokens stopped.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/OAuthDisconnectResult"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/me/plan":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"first-party","tags":["Account"],"summary":"Read your plan: free, trial or pro, and when it ends.","responses":{"200":{"description":"Your private plan. Billing screens poll this after a purchase until the plan is `pro`.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Plan"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/me/promo-redemptions":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"write","x-credential-surface":"first-party","tags":["Account"],"summary":"Redeem a promo code for Pro access.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"The code as the person typed it.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemPromoCodeRequest"}}}},"responses":{"200":{"description":"Your plan after the redemption. A retry with the same key does not redeem twice.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Plan"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/me/account-deletion":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"first-party","tags":["Account"],"summary":"Review what deleting your account affects, and whether deletion is pending.","description":"Lists the shared Meal Spaces you own, which block deletion until transferred or deleted. Available while deletion is pending, with the cancellation deadline.","responses":{"200":{"description":"Blocking Meal Spaces, affected counts and the cancellation deadline.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AccountDeletionPreview"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"delete","x-credential-surface":"first-party","tags":["Account"],"summary":"Request account deletion after a seven-day recovery window.","description":"Needs recent authentication and no owned shared Meal Space. Disables the account at once and revokes sessions, Connections, API keys, authorized apps and pending invitations.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"requestBody":{"description":"Acknowledgment that deletion may not cancel store billing.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestAccountDeletionRequest"}}}},"responses":{"201":{"description":"Deletion is pending.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AccountDeletionRequested"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/me/account-deletion/cancel":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"delete","x-credential-surface":"first-party","tags":["Account"],"summary":"Recover your account before the deletion deadline.","description":"Needs a session opened with a fresh emailed sign-in code. Restores Memberships that were not removed meanwhile; revoked credentials and invitations stay revoked.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The account is active again.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AccountDeletionCancelled"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/me/personal-data-exports":{"get":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"first-party","tags":["Account"],"summary":"List your recent personal-data exports and their status.","description":"Your five newest exports. A ready export can be downloaded for 24 hours, then it is removed.","responses":{"200":{"description":"Your newest exports, newest first.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PersonalDataExportList"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"first-party","tags":["Account"],"summary":"Request an export of your own data.","description":"Available on every plan. Needs recent authentication. One export is prepared at a time, at most five a day. Not available once account deletion is pending.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","example":"6f1a0000-0000-4000-8000-0000000000aa"},"required":true,"description":"Client-generated UUID that makes this transition idempotent: a retry with the same key replays the original result, and reusing the key with a different command returns 409.","name":"Idempotency-Key","in":"header"}],"responses":{"201":{"description":"The export is being prepared.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PersonalDataExport"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/api/v1/me/personal-data-exports/{exportId}/download":{"post":{"security":[{"bearerAuth":[]}],"x-required-scope":"read","x-credential-surface":"first-party","tags":["Account"],"summary":"Get a short-lived download link for your ready export.","description":"Only the person who requested the export can get a link, and only until the export expires 24 hours after it became ready. Each link works for five minutes.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"exportId","in":"path"}],"responses":{"200":{"description":"A link to the archive.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PersonalDataExportDownload"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"],"additionalProperties":false}}}},"400":{"description":"Bad request — malformed or unparseable request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden — the account, role, entitlement, or reauthentication requirement is not met.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found — the Meal Space does not exist or the caller is not an active member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict — the Meal Space state or idempotency key does not permit this command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error — the request failed schema validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Service unavailable — an access store failed or an invariant was violated. Fails closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}},"webhooks":{}}