{"openapi":"3.0.0","info":{"title":"V2 Dataing Backend API","version":"1.0.0"},"components":{"securitySchemes":{"PartnerBearer":{"type":"http","scheme":"bearer","bearerFormat":"opaque","description":"Opaque access token issued by the distinct Dataing partner OAuth/OIDC authority."}},"schemas":{"ScheduleBusyInterval":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"}},"required":["start","end"]},"ScheduleCalendarProtection":{"type":"object","properties":{"connected":{"type":"boolean"},"calendarScope":{"type":"string","nullable":true,"enum":["primary"]},"calendarCount":{"type":"integer","minimum":0,"maximum":1},"notificationEmail":{"type":"string","nullable":true,"format":"email"},"coverageStart":{"type":"string","format":"date-time"},"coverageEnd":{"type":"string","format":"date-time"},"checkedAt":{"type":"string","nullable":true,"format":"date-time"},"busyIntervals":{"type":"array","items":{"$ref":"#/components/schemas/ScheduleBusyInterval"},"maxItems":1000}},"required":["connected","calendarScope","calendarCount","notificationEmail","coverageStart","coverageEnd","checkedAt","busyIntervals"]},"ScheduleCalendarProtectionResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/ScheduleCalendarProtection"}},"required":["success","data"]},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"An error occurred"}},"required":["success","message"]},"ScheduleCalendarProtectionRequest":{"type":"object","properties":{"ownerId":{"type":"string","minLength":1,"maxLength":100,"example":"cm123owner"},"timeMin":{"type":"string","format":"date-time","example":"2026-08-03T18:00:00.000Z"},"timeMax":{"type":"string","format":"date-time","example":"2027-01-31T18:00:00.000Z"},"includeNotificationEmail":{"type":"boolean","description":"When true, includes the email-shaped ID of the live primary Google Calendar for the private scheduling UI.","example":true}},"required":["ownerId","timeMin","timeMax"]},"ScheduleCalendarBooking":{"type":"object","properties":{"operationId":{"type":"string"},"eventId":{"type":"string"},"idempotentReplay":{"type":"boolean"}},"required":["operationId","eventId","idempotentReplay"]},"ScheduleCalendarBookingResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/ScheduleCalendarBooking"}},"required":["success","data"]},"ScheduleCalendarBookingErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"code":{"type":"string","enum":["BOOKING_IN_PROGRESS","CALENDAR_EVENT_NOT_FOUND","CALENDAR_NOT_CONNECTED","CALENDAR_UNAVAILABLE","IDEMPOTENCY_KEY_REUSED","SLOT_UNAVAILABLE"]},"message":{"type":"string"}},"required":["success","code","message"]},"ScheduleCalendarBookingRequest":{"type":"object","properties":{"ownerId":{"type":"string","minLength":1,"maxLength":100,"example":"cm123owner"},"title":{"type":"string","minLength":1,"maxLength":1024,"example":"Dinner at Bestia"},"description":{"type":"string","maxLength":8192},"location":{"type":"string","maxLength":1024},"start":{"type":"string","format":"date-time","example":"2026-08-20T19:00:00-07:00"},"end":{"type":"string","format":"date-time","example":"2026-08-20T21:00:00-07:00"},"attendeeEmails":{"type":"array","items":{"type":"string","format":"email"},"maxItems":50},"sendUpdates":{"type":"string","enum":["all","externalOnly","none"]}},"required":["ownerId","title","start","end"]},"ScheduleCalendarBookingDeleteRequest":{"type":"object","properties":{"ownerId":{"type":"string","minLength":1,"maxLength":100,"example":"cm123owner"},"sendUpdates":{"type":"string","enum":["all","externalOnly","none"]}},"required":["ownerId"]},"ProfilePicture":{"type":"object","properties":{"id":{"type":"string","example":"pic_123"},"url":{"type":"string","format":"uri","example":"https://cdn.example.com/profile-pictures/user123/pic.jpg"},"storageKey":{"type":"string","example":"profile-pictures/user123/1699900000000-abc123.jpg"},"position":{"type":"integer","minimum":0,"example":0},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","url","storageKey","position","createdAt","updatedAt"]},"CurrentUserLLMModel":{"type":"object","properties":{"id":{"type":"string","example":"cm39model123"},"name":{"type":"string","example":"GPT-4"},"provider":{"type":"string","example":"openai"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","name","provider","createdAt","updatedAt"]},"CurrentUserBio":{"type":"object","properties":{"id":{"type":"string","example":"cm39bio123"},"content":{"type":"string","example":"I love hiking and outdoor adventures"},"userId":{"type":"string","example":"cm39user123"},"llmModelId":{"type":"string","example":"cm39model123"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"llmModel":{"$ref":"#/components/schemas/CurrentUserLLMModel"}},"required":["id","content","userId","llmModelId","createdAt","updatedAt"]},"AgeRangeExpansion":{"type":"object","nullable":true,"properties":{"minAge":{"type":"integer","minimum":18,"maximum":100},"maxAge":{"type":"integer","minimum":18,"maximum":100},"additionalMatches":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["minAge","maxAge","additionalMatches"],"description":"Stored estimate of additional potential matches from widening a dealbreaker age range."},"UserProfile":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"gender":{"type":"string","nullable":true,"enum":["MALE","FEMALE","NONBINARY"]},"birthday":{"type":"string","nullable":true},"canEditBirthday":{"type":"boolean","description":"Whether the user may make their one permitted birthday correction."},"heightInches":{"type":"number","nullable":true},"occupation":{"type":"string","nullable":true},"educationLevel":{"type":"string","nullable":true,"enum":["HIGH_SCHOOL","SOME_COLLEGE","ASSOCIATES","BACHELORS","MASTERS","DOCTORATE","TRADE_SCHOOL"]},"relationshipTerm":{"type":"array","items":{"type":"string","enum":["LONG_TERM","SHORT_TERM"]}},"interestedIn":{"type":"array","items":{"type":"string","enum":["MALE","FEMALE","NONBINARY"]}},"ageRangeMin":{"type":"number","nullable":true},"ageRangeMax":{"type":"number","nullable":true},"ageRangeExpansion":{"$ref":"#/components/schemas/AgeRangeExpansion"},"dealbreaker":{"type":"boolean"},"appleAgeVerificationStatus":{"type":"string","nullable":true,"enum":["VERIFIED_ADULT","FALLBACK_VERIFIED_ADULT","UNDERAGE","DECLINED","UNSUPPORTED","FAILED"]},"appleAgeVerificationLowerBound":{"type":"number","nullable":true},"appleAgeVerificationUpperBound":{"type":"number","nullable":true},"appleAgeVerificationDeclaration":{"type":"string","nullable":true,"enum":["SELF_DECLARED","GUARDIAN_DECLARED","UNKNOWN"]},"appleAgeVerificationParentalControls":{"type":"array","items":{"type":"string"}},"appleAgeVerificationUpdatedAt":{"type":"string","nullable":true}},"required":["id","name","gender","birthday","canEditBirthday","heightInches","occupation","educationLevel","relationshipTerm","interestedIn","ageRangeMin","ageRangeMax","ageRangeExpansion","dealbreaker","appleAgeVerificationStatus","appleAgeVerificationLowerBound","appleAgeVerificationUpperBound","appleAgeVerificationDeclaration","appleAgeVerificationParentalControls","appleAgeVerificationUpdatedAt"],"description":"User profile data"},"User":{"type":"object","properties":{"id":{"type":"string","example":"cm39abc123xyz"},"role":{"type":"string","enum":["USER","MATCHMAKER","AMBASSADOR","TESTER","ADMIN","SUPERADMIN"],"example":"USER"},"email":{"type":"string","nullable":true,"format":"email","example":"user@example.com"},"phone":{"type":"string","nullable":true,"example":"+18186181349"},"waitlisted":{"type":"boolean","example":false},"acceptedPrivacyPolicy":{"type":"boolean","example":false},"acceptedAiDataPolicy":{"type":"boolean","example":false},"policiesAcceptedAt":{"type":"string","nullable":true,"example":"2024-01-01T00:00:00.000Z"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"profilePictures":{"type":"array","items":{"$ref":"#/components/schemas/ProfilePicture"},"description":"Ordered list of profile pictures","example":[]}},"required":["id","role","email","phone","waitlisted","acceptedPrivacyPolicy","acceptedAiDataPolicy","policiesAcceptedAt","createdAt","updatedAt"]},"UpdateProfileResponse":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/UserProfile"}},"required":["success","data"]},"AnalyticsMetadata":{"type":"object","properties":{"surface":{"type":"string","maxLength":50,"description":"Optional analytics-only product surface. Invalid or unknown values are ignored by analytics helpers.","example":"discover"}}},"UpdateProfile":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50},"gender":{"type":"string","enum":["MALE","FEMALE","NONBINARY"]},"birthday":{"type":"string","format":"date"},"heightInches":{"type":"integer","nullable":true,"minimum":36,"maximum":108},"occupation":{"type":"string","nullable":true,"maxLength":100},"educationLevel":{"type":"string","nullable":true,"enum":["HIGH_SCHOOL","SOME_COLLEGE","ASSOCIATES","BACHELORS","MASTERS","DOCTORATE","TRADE_SCHOOL"]},"relationshipTerm":{"type":"array","items":{"type":"string","enum":["LONG_TERM","SHORT_TERM"]}},"interestedIn":{"type":"array","items":{"type":"string","enum":["MALE","FEMALE","NONBINARY"]},"minItems":1},"ageRangeMin":{"type":"integer","nullable":true,"minimum":18,"maximum":100},"ageRangeMax":{"type":"integer","nullable":true,"minimum":18,"maximum":100},"dealbreaker":{"type":"boolean"},"appleAgeVerificationStatus":{"type":"string","enum":["VERIFIED_ADULT","FALLBACK_VERIFIED_ADULT","UNDERAGE","DECLINED","UNSUPPORTED","FAILED"]},"appleAgeVerificationLowerBound":{"type":"integer","nullable":true,"minimum":0,"maximum":150},"appleAgeVerificationUpperBound":{"type":"integer","nullable":true,"minimum":0,"maximum":150},"appleAgeVerificationDeclaration":{"type":"string","nullable":true,"enum":["SELF_DECLARED","GUARDIAN_DECLARED","UNKNOWN"]},"appleAgeVerificationParentalControls":{"type":"array","items":{"type":"string"}},"appleAgeVerificationUpdatedAt":{"type":"string","nullable":true,"format":"date-time"},"metadata":{"$ref":"#/components/schemas/AnalyticsMetadata"}}},"AuthConfigResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"provider":{"type":"string","enum":["legacy","ory"]},"partnerPilotEnabled":{"type":"boolean"},"browserLoginUrl":{"type":"string","nullable":true,"format":"uri"},"browserReturnOrigin":{"type":"string","nullable":true,"format":"uri"},"nativeLoginSupported":{"type":"boolean"},"nativeSdkUrl":{"type":"string","nullable":true,"format":"uri"},"nativeReturnUrl":{"type":"string","nullable":true,"format":"uri"}},"required":["provider","partnerPilotEnabled","browserLoginUrl","browserReturnOrigin","nativeLoginSupported","nativeSdkUrl","nativeReturnUrl"]}},"required":["success","data"]},"LinkOryIdentityResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"message":{"type":"string"},"data":{"type":"object","properties":{"linked":{"type":"boolean","enum":[true]}},"required":["linked"]}},"required":["success","message","data"]},"LinkOryIdentityError":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"message":{"type":"string"},"reason":{"type":"string","enum":["GOOGLE_PROOF_REQUIRED","ORY_LOGIN_REQUIRED","LEGACY_REAUTH_REQUIRED","LINK_CONFIRMATION_REQUIRED","ORY_REAUTH_REQUIRED","LINK_CONFLICT"]},"account":{"type":"object","properties":{"identifier":{"type":"string"},"role":{"type":"string","enum":["USER","MATCHMAKER","AMBASSADOR","TESTER","ADMIN","SUPERADMIN"]}},"required":["identifier","role"]}},"required":["success","message"]},"SuccessMessageResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Operation successful"}},"required":["success","message"]},"TokenPair":{"type":"object","properties":{"accessToken":{"type":"string","description":"Short-lived access token for API authentication","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"refreshToken":{"type":"string","description":"Long-lived refresh token for obtaining new access tokens","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"expiresIn":{"type":"number","description":"Access token expiration time in seconds","example":900}},"required":["accessToken","refreshToken","expiresIn"]},"AuthSuccessResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Authentication successful"},"data":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"},"tokens":{"$ref":"#/components/schemas/TokenPair"}},"required":["user","tokens"]}},"required":["success","message","data"]},"RevokeOtherSessionsResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"message":{"type":"string"},"data":{"type":"object","properties":{"revokedCount":{"type":"integer","minimum":0}},"required":["revokedCount"]}},"required":["success","message","data"]},"RefreshSuccessResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Tokens refreshed successfully"},"data":{"$ref":"#/components/schemas/TokenPair"}},"required":["success","message","data"]},"LLMModel":{"type":"object","properties":{"id":{"type":"string","example":"cm39model123"},"name":{"type":"string","example":"GPT-4"},"provider":{"type":"string","example":"OpenAI"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","name","provider","createdAt","updatedAt"]},"NullableBio":{"type":"object","nullable":true,"properties":{"publicationStatus":{"type":"string","enum":["DRAFT","PUBLISHED","ARCHIVED"]},"isManual":{"type":"boolean"},"revision":{"type":"integer"},"publishedAt":{"type":"string","nullable":true},"id":{"type":"string","example":"cm39bio123xyz"},"content":{"type":"string","example":"I love hiking and outdoor adventures..."},"userId":{"type":"string","example":"cm39user123"},"llmModelId":{"type":"string","example":"cm39model123"},"llmModel":{"$ref":"#/components/schemas/LLMModel"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["publicationStatus","isManual","revision","publishedAt","id","content","userId","llmModelId","createdAt","updatedAt"]},"Bio":{"type":"object","properties":{"publicationStatus":{"type":"string","enum":["DRAFT","PUBLISHED","ARCHIVED"]},"isManual":{"type":"boolean"},"revision":{"type":"integer"},"publishedAt":{"type":"string","nullable":true},"id":{"type":"string","example":"cm39bio123xyz"},"content":{"type":"string","example":"I love hiking and outdoor adventures..."},"userId":{"type":"string","example":"cm39user123"},"llmModelId":{"type":"string","example":"cm39model123"},"llmModel":{"$ref":"#/components/schemas/LLMModel"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["publicationStatus","isManual","revision","publishedAt","id","content","userId","llmModelId","createdAt","updatedAt"]},"BioSingleResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/Bio"}},"required":["success","data"]},"BiosListResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Bio"}}},"required":["success","data"]},"BioLatestResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"allOf":[{"$ref":"#/components/schemas/NullableBio"},{"description":"Latest bio for the user, or null when no bios exist yet","example":null}]}},"required":["success","data"]},"BioDeleteResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Bio deleted successfully"}},"required":["success","message"]},"Trait":{"type":"object","properties":{"id":{"type":"string","example":"cm39trait123"},"key":{"type":"string","nullable":true,"example":"weekend_getaway_ready"},"name":{"type":"string","example":"Adventurousness"},"category":{"type":"string","nullable":true,"example":"Personality"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","key","name","category","createdAt","updatedAt"]},"TraitEvidence":{"type":"object","properties":{"id":{"type":"string","example":"cm39traitevidence123"},"userTraitId":{"type":"string","example":"cm39usertrait123"},"sourceTable":{"type":"string","example":"YoutubeConnection"},"sourceType":{"type":"string","nullable":true,"example":"YouTubeLikedVideo"},"sourceId":{"type":"string","example":"ytvideo123"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","userTraitId","sourceTable","sourceType","sourceId","createdAt","updatedAt"]},"UserTrait":{"type":"object","properties":{"id":{"type":"string","example":"cm39usertrait123"},"userId":{"type":"string","example":"cm39user123"},"traitId":{"type":"string","example":"cm39trait123"},"value":{"type":"number","example":0.75},"confidence":{"type":"number","nullable":true,"minimum":0,"maximum":1,"example":0.88},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","userId","traitId","value","confidence","createdAt","updatedAt"]},"UserTraitWithRelations":{"allOf":[{"$ref":"#/components/schemas/UserTrait"},{"type":"object","properties":{"trait":{"$ref":"#/components/schemas/Trait"},"evidences":{"type":"array","items":{"$ref":"#/components/schemas/TraitEvidence"}}},"required":["trait","evidences"]}]},"UserTraitsResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/UserTraitWithRelations"},"example":[{"id":"cm39usertrait123","userId":"cm39user123","traitId":"cm39trait123","value":0.75,"confidence":0.88,"createdAt":"2024-01-01T00:00:00.000Z","updatedAt":"2024-01-02T00:00:00.000Z","trait":{"id":"cm39trait123","key":"adventure_date_preference","name":"Adventurousness","category":"PERSONALITY","createdAt":"2024-01-01T00:00:00.000Z","updatedAt":"2024-01-02T00:00:00.000Z"},"evidences":[{"id":"cm39traitevidence123","userTraitId":"cm39usertrait123","sourceTable":"YoutubeConnection","sourceType":"YouTubeLikedVideo","sourceId":"ytvideo123","createdAt":"2024-01-01T00:00:00.000Z","updatedAt":"2024-01-01T00:00:00.000Z"}]}]}},"required":["success","data"]},"PresignProfilePictureUploadTarget":{"type":"object","properties":{"key":{"type":"string","example":"profile-pictures/user123/pic.jpg"},"uploadUrl":{"type":"string","format":"uri","example":"https://bucket.s3.amazonaws.com/profile-pictures/user123/pic.jpg?signature=..."},"publicUrl":{"type":"string","format":"uri","example":"https://cdn.example.com/profile-pictures/user123/pic.jpg"},"expiresIn":{"type":"integer","example":900}},"required":["key","uploadUrl","publicUrl","expiresIn"]},"PresignProfilePictureUploadRequest":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"contentType":{"type":"string","minLength":1,"description":"MIME type of the file to upload","example":"image/jpeg"}},"required":["contentType"]},"minItems":1,"maxItems":12,"description":"List of files requiring presigned upload URLs"}},"required":["files"]},"CreateProfilePicturesRequest":{"type":"object","properties":{"pictures":{"type":"array","items":{"type":"object","properties":{"storageKey":{"type":"string","minLength":1,"example":"profile-pictures/user123/1699900000000-abc123.jpg"}},"required":["storageKey"]},"minItems":1,"maxItems":12,"description":"Storage keys previously issued via presign endpoint"}},"required":["pictures"]},"ReorderProfilePicturesRequest":{"type":"object","properties":{"pictureIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"Profile picture IDs in the desired order"}},"required":["pictureIds"]},"DeleteProfilePicturesResponse":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"deletedPictureIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["success","message","deletedPictureIds"]},"DeleteProfilePicturesRequest":{"type":"object","properties":{"pictureIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"Profile picture IDs to delete"}},"required":["pictureIds"]},"PublicProfileTrait":{"type":"object","properties":{"key":{"type":"string","nullable":true,"example":"weekend_getaway_ready"},"name":{"type":"string","example":"Adventurousness"},"category":{"type":"string","nullable":true,"example":"PERSONALITY"},"value":{"type":"number","description":"Trait value from -1 to 1","example":0.75}},"required":["key","name","category","value"]},"PublicProfileLinkedSignal":{"type":"object","properties":{"provider":{"type":"string","enum":["YOUTUBE","PINTEREST","TWITTER","EVENTBRITE","TIKTOK","GOOGLE_CALENDAR","APPLE_MUSIC","CHATGPT","LOCATION","PHOTOS"],"example":"YOUTUBE"},"label":{"type":"string","example":"YouTube"}},"required":["provider","label"]},"PublicProfileInsight":{"type":"object","properties":{"id":{"type":"string","example":"what_might_click:shared_concept:fitness_and_health"},"section":{"type":"string","enum":["what_might_click","what_to_explore"],"example":"what_might_click"},"kind":{"type":"string","enum":["shared_concept","positive_complement","difference","possible_friction"],"example":"shared_concept"},"conceptKey":{"type":"string","example":"fitness_and_health"},"label":{"type":"string","example":"physical fitness"},"viewerTraits":{"type":"array","items":{"type":"string"},"example":["fitness-oriented"]},"viewedTraits":{"type":"array","items":{"type":"string"},"example":["athlete"]},"explanation":{"type":"string","example":"You both value physical fitness."},"askThemAbout":{"type":"string","example":"Are they training for something specific, or just for life?"}},"required":["id","section","kind","conceptKey","label","viewerTraits","viewedTraits","explanation","askThemAbout"]},"PublicProfileConnectPreferenceIssue":{"type":"object","properties":{"issue":{"type":"string","example":"Gender preferences do not match"},"severity":{"type":"string","enum":["hard","medium","soft"],"example":"hard"}},"required":["issue","severity"]},"PublicProfileViewerContext":{"type":"object","nullable":true,"properties":{"compatibilityScore":{"type":"number","nullable":true,"description":"Deterministic compatibility score from 0 to 1.","example":0.964},"compatibilityDescription":{"type":"string","nullable":true,"description":"Deterministic compatibility summary.","example":"Strong compatibility. Both connect over fitness."},"matchReason":{"type":"string","nullable":true,"description":"LLM-generated description of why Cupid matched these two users, based on their bios and traits.","example":"You both seem drawn to active weekends, thoughtful routines, and cozy dinners."},"sharedTraits":{"type":"array","items":{"type":"string"},"example":["fitness-oriented"]},"insights":{"type":"array","items":{"$ref":"#/components/schemas/PublicProfileInsight"},"description":"Deterministic profile insights for the viewing user and viewed user."},"canConnect":{"type":"boolean","description":"Whether the authenticated viewer can send a connect request.","example":false},"connectDisabledReason":{"type":"string","nullable":true,"description":"User-facing explanation when canConnect is false.","example":"Your gender preferences do not include this profile."},"connectPreferenceIssues":{"type":"array","items":{"$ref":"#/components/schemas/PublicProfileConnectPreferenceIssue"},"description":"Preference alignment issues that prevent sending a connect request."}},"required":["compatibilityScore","compatibilityDescription","matchReason","sharedTraits","insights","canConnect","connectDisabledReason","connectPreferenceIssues"],"description":"Pair-specific deterministic context for the authenticated viewer"},"PublicProfile":{"type":"object","properties":{"id":{"type":"string","example":"cm39user123"},"publicProfileCode":{"type":"string","nullable":true,"description":"Unique shareable code for public profile URL","example":"RGgLkGmQbB"},"name":{"type":"string","nullable":true,"example":"Sarah"},"gender":{"type":"string","nullable":true,"enum":["MALE","FEMALE","NONBINARY"],"example":"FEMALE"},"birthday":{"type":"string","nullable":true,"example":"1995-06-15T00:00:00.000Z"},"heightInches":{"type":"integer","nullable":true,"example":65},"occupation":{"type":"string","nullable":true,"example":"Software Engineer"},"location":{"type":"string","nullable":true,"description":"City/region display derived from the user's connected location.","example":"Los Angeles, CA"},"relationshipTerm":{"type":"array","items":{"type":"string","enum":["LONG_TERM","SHORT_TERM"]},"example":["LONG_TERM"]},"dealbreaker":{"type":"boolean","example":false},"bio":{"type":"string","nullable":true,"example":"I love hiking and outdoor adventures"},"profilePictures":{"type":"array","items":{"$ref":"#/components/schemas/ProfilePicture"},"description":"Profile pictures"},"traits":{"type":"array","items":{"$ref":"#/components/schemas/PublicProfileTrait"},"description":"Top 5 traits for this user"},"linkedSignals":{"type":"array","items":{"$ref":"#/components/schemas/PublicProfileLinkedSignal"},"description":"Connected signal providers visible on the public profile"},"viewerContext":{"$ref":"#/components/schemas/PublicProfileViewerContext"},"isRecentlyActive":{"type":"boolean","description":"Whether the user has been active within the last 7 days","example":true}},"required":["id","publicProfileCode","name","gender","birthday","heightInches","occupation","location","relationshipTerm","dealbreaker","bio","profilePictures","traits","linkedSignals","isRecentlyActive"]},"PublicProfileResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/PublicProfile"}},"required":["success","data"]},"AccessDeniedResponse":{"type":"object","properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Access denied"},"reason":{"type":"string","description":"Reason for access denial. 'profile_hidden' = compatibility below threshold. 'compatibility_pending' = score not yet computed. 'no_relationship' = no relationship exists.","example":"profile_hidden"}},"required":["success","message","reason"]},"MatchRequest":{"type":"object","properties":{"relationshipId":{"type":"string","example":"cm39rel123"},"profile":{"$ref":"#/components/schemas/PublicProfile"},"requestedAt":{"type":"string","description":"When the other user accepted (sent the match request)","example":"2025-01-15T10:30:00.000Z"},"isMutualMatch":{"type":"boolean","description":"True if both users have accepted each other","example":false},"threadId":{"type":"string","nullable":true,"description":"The chat thread ID if a conversation exists for this match","example":"cm39thread456"}},"required":["relationshipId","profile","requestedAt","isMutualMatch","threadId"]},"MatchRequestsResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/MatchRequest"},"description":"List of incoming match requests"}},"required":["success","data"]},"SendMatchRequestResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Request sent"},"isMutualMatch":{"type":"boolean","example":false},"threadId":{"type":"string","nullable":true,"description":"Chat thread ID if a mutual match was created","example":null}},"required":["success","message","isMutualMatch","threadId"]},"SendMatchRequestBody":{"type":"object","properties":{"otherUserId":{"type":"string","minLength":1,"example":"cm39user456"},"metadata":{"$ref":"#/components/schemas/AnalyticsMetadata"}},"required":["otherUserId"]},"RespondMatchRequestResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Request accepted"},"isMutualMatch":{"type":"boolean","example":true},"threadId":{"type":"string","nullable":true,"description":"Chat thread ID if a mutual match was created","example":"cm39thread789"}},"required":["success","message","isMutualMatch","threadId"]},"RespondMatchRequestBody":{"type":"object","properties":{"action":{"type":"string","enum":["accept","decline"],"example":"accept"},"metadata":{"$ref":"#/components/schemas/AnalyticsMetadata"}},"required":["action"]},"MatchmakerConnection":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"cm39relationship123"},"status":{"type":"string","enum":["PENDING","APPROVED","REVOKED"],"example":"PENDING"},"canAccessCupidChat":{"type":"boolean","example":false},"approvedAt":{"type":"string","nullable":true,"example":"2026-07-09T12:00:00.000Z"},"revokedAt":{"type":"string","nullable":true,"example":null}},"required":["id","status","canAccessCupidChat","approvedAt","revokedAt"]},"MatchmakerListItem":{"type":"object","properties":{"userId":{"type":"string","example":"cm39matchmaker123"},"profile":{"$ref":"#/components/schemas/PublicProfile"},"connection":{"$ref":"#/components/schemas/MatchmakerConnection"}},"required":["userId","profile","connection"]},"MatchmakerPaginationMeta":{"type":"object","properties":{"page":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"limit":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":20},"total":{"type":"integer","minimum":0,"example":42},"totalPages":{"type":"integer","minimum":0,"example":3},"hasNextPage":{"type":"boolean","example":true},"hasPrevPage":{"type":"boolean","example":false}},"required":["page","limit","total","totalPages","hasNextPage","hasPrevPage"]},"MatchmakerListResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/MatchmakerListItem"}},"meta":{"$ref":"#/components/schemas/MatchmakerPaginationMeta"}},"required":["success","data","meta"]},"MatchmakerClientListItem":{"type":"object","properties":{"clientUserId":{"type":"string","example":"cm39client123"},"profile":{"$ref":"#/components/schemas/PublicProfile"},"connection":{"$ref":"#/components/schemas/MatchmakerConnection"},"recommendationCount":{"type":"integer","minimum":0,"example":3},"noteCount":{"type":"integer","minimum":0,"example":1}},"required":["clientUserId","profile","connection","recommendationCount","noteCount"]},"MatchmakerClientListResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/MatchmakerClientListItem"}}},"required":["success","data"]},"MatchmakerRecommendationSummary":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"cm39recommendation123"},"description":{"type":"string","nullable":true,"example":"You both want something intentional and value curiosity."},"createdAt":{"type":"string","example":"2026-07-09T12:00:00.000Z"},"updatedAt":{"type":"string","example":"2026-07-09T12:00:00.000Z"}},"required":["id","description","createdAt","updatedAt"]},"MatchmakerPlatformUser":{"type":"object","properties":{"userId":{"type":"string","example":"cm39user123"},"profile":{"$ref":"#/components/schemas/PublicProfile"},"recommendation":{"$ref":"#/components/schemas/MatchmakerRecommendationSummary"}},"required":["userId","profile","recommendation"]},"MatchmakerPlatformUsersResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/MatchmakerPlatformUser"}},"meta":{"$ref":"#/components/schemas/MatchmakerPaginationMeta"}},"required":["success","data","meta"]},"MatchmakerConnectionResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/MatchmakerConnection"}},"required":["success","data"]},"RespondToMatchmakerInvitationBody":{"type":"object","properties":{"accepted":{"type":"boolean","description":"True to accept the client invitation; false to reject it.","example":true}},"required":["accepted"]},"MatchmakerRecommendation":{"allOf":[{"$ref":"#/components/schemas/MatchmakerRecommendationSummary"},{"type":"object","properties":{"clientUserId":{"type":"string","example":"cm39client123"},"recommendedUserId":{"type":"string","example":"cm39recommended123"}},"required":["clientUserId","recommendedUserId"]}]},"MatchmakerRecommendationResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/MatchmakerRecommendation"}},"required":["success","data"]},"CreateMatchmakerRecommendationBody":{"type":"object","properties":{"recommendedUserId":{"type":"string","minLength":1,"description":"User being recommended to the accepted client.","example":"cm39recommended123"},"description":{"type":"string","nullable":true,"maxLength":2000,"description":"Optional matchmaker-written explanation shown on the client's discover card.","example":"You both love low-key dinners, live music, and intentional dating."}},"required":["recommendedUserId"]},"MatchmakerClientMessageThreadResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"threadId":{"type":"string","example":"cm39thread123"}},"required":["threadId"]}},"required":["success","data"]},"MatchmakerCupidChatMessage":{"type":"object","properties":{"id":{"type":"string","example":"cm39message123"},"threadId":{"type":"string","example":"cm39thread123"},"senderType":{"type":"string","enum":["USER","BOT"],"example":"USER"},"content":{"type":"string","example":"I want someone who is emotionally direct."},"createdAt":{"type":"string","example":"2026-07-09T12:00:00.000Z"}},"required":["id","threadId","senderType","content","createdAt"]},"MatchmakerCupidChatResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"threadId":{"type":"string","nullable":true,"example":"cm39thread123"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/MatchmakerCupidChatMessage"}}},"required":["threadId","messages"]}},"required":["success","data"]},"MatchmakerClientNote":{"type":"object","properties":{"id":{"type":"string","example":"cm39note123"},"clientUserId":{"type":"string","example":"cm39client123"},"content":{"type":"string","example":"Client likes profiles that balance ambition with warmth."},"sourceThreadId":{"type":"string","nullable":true,"example":"cm39thread123"},"createdAt":{"type":"string","example":"2026-07-09T12:00:00.000Z"},"updatedAt":{"type":"string","example":"2026-07-09T12:00:00.000Z"}},"required":["id","clientUserId","content","sourceThreadId","createdAt","updatedAt"]},"MatchmakerClientNotesResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/MatchmakerClientNote"}}},"required":["success","data"]},"MatchmakerClientNoteResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/MatchmakerClientNote"}},"required":["success","data"]},"CreateMatchmakerNoteBody":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":4000,"description":"Private matchmaker note based on the client's Cupid chat context.","example":"Client seems excited by people who ask thoughtful follow-up questions."},"sourceThreadId":{"type":"string","nullable":true,"minLength":1,"description":"Optional Cupid solo chat thread ID this note is based on.","example":"cm39thread123"}},"required":["content"]},"UpdateMatchmakerInvitationBody":{"type":"object","properties":{"invited":{"type":"boolean","description":"True to invite this user to be your matchmaker; false to cancel or revoke access.","example":true}},"required":["invited"]},"UpdateMatchmakerControlsBody":{"type":"object","properties":{"canAccessCupidChat":{"type":"boolean","description":"Whether this matchmaker can view your Cupid chat history.","example":false}},"required":["canAccessCupidChat"]},"DirectMatch":{"type":"object","properties":{"id":{"type":"string","example":"cm39dm123"},"requesterId":{"type":"string","example":"cm39user123"},"targetId":{"type":"string","example":"cm39user456"},"requesterStatus":{"type":"string","enum":["PENDING","ACCEPTED","DECLINED"],"example":"ACCEPTED"},"targetStatus":{"type":"string","enum":["PENDING","ACCEPTED","DECLINED"],"example":"PENDING"},"isRequester":{"type":"boolean","description":"Whether the current user is the requester of this direct match","example":true},"isMutualMatch":{"type":"boolean","description":"True if both users have accepted the direct match","example":false},"chatThreadId":{"type":"string","nullable":true,"description":"The chat thread ID for mutual matches, null if not yet created","example":"cm39thread123"},"profile":{"allOf":[{"$ref":"#/components/schemas/PublicProfile"},{"description":"Public profile of the other user in the direct match"}]},"createdAt":{"type":"string","example":"2025-01-15T10:30:00.000Z"},"updatedAt":{"type":"string","example":"2025-01-15T10:30:00.000Z"}},"required":["id","requesterId","targetId","requesterStatus","targetStatus","isRequester","isMutualMatch","chatThreadId","profile","createdAt","updatedAt"]},"DirectMatchesResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/DirectMatch"},"description":"List of direct matches"}},"required":["success","data"]},"SendDirectMatchResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Direct match request sent successfully"},"data":{"allOf":[{"$ref":"#/components/schemas/DirectMatch"},{"description":"The created or existing direct match"}]}},"required":["success","message"]},"SendDirectMatchRequest":{"type":"object","properties":{"identifier":{"type":"string","minLength":1,"description":"Phone number or email address of the user to send a direct match request to","example":"+18186181349"}},"required":["identifier"]},"RespondDirectMatchResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Direct match request accepted"},"data":{"allOf":[{"$ref":"#/components/schemas/DirectMatch"},{"description":"The updated direct match"}]}},"required":["success","message"]},"RespondDirectMatchRequest":{"type":"object","properties":{"action":{"type":"string","enum":["accept","decline"],"description":"The response action to take on the direct match request","example":"accept"}},"required":["action"]},"DiscoverMatch":{"type":"object","properties":{"relationshipId":{"type":"string","nullable":true,"example":"cm39rel123"},"otherUserId":{"type":"string","example":"cm39user456"},"profile":{"$ref":"#/components/schemas/PublicProfile"},"compatibilityScore":{"type":"number","nullable":true,"description":"Compatibility score from 0 to 1, or null if not yet calculated","example":0.85},"compatibilityDescription":{"type":"string","nullable":true,"description":"AI-generated explanation of the compatibility","example":"Both share a love for outdoor activities and have similar communication styles."},"matchReason":{"type":"string","nullable":true,"description":"LLM-generated description of why Cupid matched these two users, based on their bios and traits","example":"You both have a creative streak and a love for live music — your Pinterest boards and concert history tell the same story."},"sharedTraits":{"type":"array","items":{"type":"string"},"description":"Trait names shared between both users","example":["Adventurousness","Creativity"]},"requestStatus":{"type":"string","enum":["none","sent","received","accepted"],"description":"Status of the match request from the current user's perspective. Note: declined relationships are filtered out at the database level and never returned.","example":"none"},"recommendationType":{"type":"string","enum":["daily","discover","matchmaker"],"description":"How this profile was surfaced to the current user. Daily picks are generated by the scheduled refresh job.","example":"daily"},"matchmakerRecommendation":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"cm39recommendation123"},"description":{"type":"string","nullable":true,"example":"You both bring a thoughtful, curious energy to dating."},"matchmakerUserId":{"type":"string","example":"cm39matchmaker123"},"matchmakerName":{"type":"string","nullable":true,"example":"Alex"},"createdAt":{"type":"string","example":"2026-07-09T12:00:00.000Z"}},"required":["id","description","matchmakerUserId","matchmakerName","createdAt"],"description":"Present when an approved matchmaker recommended this profile to the current user."},"timestamp":{"type":"string","description":"When the relationship was last updated","example":"2025-01-15T10:30:00.000Z"},"threadId":{"type":"string","nullable":true,"description":"The chat thread ID if a conversation exists","example":"cm39thread456"},"distanceMiles":{"type":"number","nullable":true,"description":"Approximate distance in miles from the current user's connected location to this user's connected location. Null when either user has no location.","example":12.4},"viewed":{"type":"boolean","description":"Whether the current user has viewed this profile","example":false}},"required":["relationshipId","otherUserId","profile","compatibilityScore","compatibilityDescription","matchReason","sharedTraits","requestStatus","recommendationType","matchmakerRecommendation","timestamp","threadId","distanceMiles","viewed"]},"DiscoverResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/DiscoverMatch"},"description":"List of discover matches"},"totalCount":{"type":"integer","minimum":0,"description":"Optional total count of discover records matching the same eligibility filters. Only included when requested with includeTotal=true.","example":62},"forYouCount":{"type":"integer","minimum":0,"description":"Optional count of potential matches shown on the For You tab. Only included when requested with includeTotal=true.","example":49},"requestCount":{"type":"integer","minimum":0,"description":"Optional count of sent or received request cards shown on the Requests tab. Only included when requested with includeTotal=true.","example":3}},"required":["success","data"]},"PassDiscoverProfileResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Profile passed"},"relationshipId":{"type":"string","description":"The relationship marked as rejected for the current user","example":"cm39rel123"}},"required":["success","message","relationshipId"]},"PassDiscoverProfileBody":{"type":"object","properties":{"otherUserId":{"type":"string","minLength":1,"description":"The discover profile user ID to pass on","example":"cm39user456"}},"required":["otherUserId"]},"RecentlyRejectedMatch":{"type":"object","properties":{"relationshipId":{"type":"string","nullable":true,"example":"cm39rel123"},"otherUserId":{"type":"string","example":"cm39user456"},"profile":{"$ref":"#/components/schemas/PublicProfile"},"compatibilityScore":{"type":"number","nullable":true,"description":"Compatibility score from 0 to 1, or null if not yet calculated","example":0.85},"compatibilityDescription":{"type":"string","nullable":true,"description":"AI-generated explanation of the compatibility","example":"Both share a love for outdoor activities and have similar communication styles."},"matchReason":{"type":"string","nullable":true,"description":"LLM-generated description of why Cupid matched these two users, based on their bios and traits","example":"You both have a creative streak and a love for live music — your Pinterest boards and concert history tell the same story."},"sharedTraits":{"type":"array","items":{"type":"string"},"description":"Trait names shared between both users","example":["Adventurousness","Creativity"]},"recommendationType":{"type":"string","enum":["daily","discover","matchmaker"],"description":"How this profile was surfaced to the current user. Daily picks are generated by the scheduled refresh job.","example":"daily"},"matchmakerRecommendation":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"cm39recommendation123"},"description":{"type":"string","nullable":true,"example":"You both bring a thoughtful, curious energy to dating."},"matchmakerUserId":{"type":"string","example":"cm39matchmaker123"},"matchmakerName":{"type":"string","nullable":true,"example":"Alex"},"createdAt":{"type":"string","example":"2026-07-09T12:00:00.000Z"}},"required":["id","description","matchmakerUserId","matchmakerName","createdAt"],"description":"Present when an approved matchmaker recommended this profile to the current user."},"timestamp":{"type":"string","description":"When the relationship was last updated","example":"2025-01-15T10:30:00.000Z"},"threadId":{"type":"string","nullable":true,"description":"The chat thread ID if a conversation exists","example":"cm39thread456"},"distanceMiles":{"type":"number","nullable":true,"description":"Approximate distance in miles from the current user's connected location to this user's connected location. Null when either user has no location.","example":12.4},"viewed":{"type":"boolean","description":"Whether the current user has viewed this profile","example":false},"requestStatus":{"type":"string","enum":["rejected"],"description":"Indicates that the current user passed on this profile within the undo window","example":"rejected"},"rejectedAt":{"type":"string","description":"When the current user passed on this profile","example":"2026-08-19T10:30:00.000Z"}},"required":["relationshipId","otherUserId","profile","compatibilityScore","compatibilityDescription","matchReason","sharedTraits","recommendationType","matchmakerRecommendation","timestamp","threadId","distanceMiles","viewed","requestStatus","rejectedAt"]},"RecentlyRejectedResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/RecentlyRejectedMatch"},"description":"Profiles the current user rejected within the past seven days"}},"required":["success","data"]},"UndoRecentlyRejectedResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Pass undone"},"relationshipId":{"type":"string","example":"cm39rel123"}},"required":["success","message","relationshipId"]},"PushNotificationToken":{"type":"object","properties":{"id":{"type":"string","example":"cm39abc123xyz"},"userId":{"type":"string","example":"cm39abc123xyz"},"token":{"type":"string","example":"fcm_token_here"},"deviceId":{"type":"string","nullable":true,"example":"device_123"},"platform":{"type":"string","enum":["IOS","ANDROID"],"example":"IOS"},"isActive":{"type":"boolean","example":true},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","userId","token","deviceId","platform","isActive","createdAt","updatedAt"]},"RegisterTokenResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Push notification token registered successfully"},"data":{"$ref":"#/components/schemas/PushNotificationToken"}},"required":["success","message","data"]},"UnregisterTokenResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Push notification token unregistered successfully"}},"required":["success","message"]},"PushNotificationStatus":{"type":"object","properties":{"hasActiveTokens":{"type":"boolean","example":true},"activeTokensCount":{"type":"number","example":1},"tokens":{"type":"array","items":{"$ref":"#/components/schemas/PushNotificationToken"},"description":"List of active push notification tokens"}},"required":["hasActiveTokens","activeTokensCount","tokens"]},"PushNotificationStatusResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/PushNotificationStatus"}},"required":["success","data"]},"PrivateProfileApiTokenSettings":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether a private profile API token is currently active","example":true},"createdAt":{"type":"string","nullable":true,"description":"When the current private profile API token was created or rotated","example":"2024-01-01T00:00:00.000Z"},"lastUsedAt":{"type":"string","nullable":true,"description":"When the current private profile API token was last used","example":"2024-01-02T00:00:00.000Z"}},"required":["enabled","createdAt","lastUsedAt"]},"UserSettings":{"type":"object","properties":{"id":{"type":"string","example":"cm39settings123"},"userId":{"type":"string","example":"cm39user123"},"publicProfileEnabled":{"type":"boolean","example":true},"discoverRadiusMiles":{"type":"integer","nullable":true,"description":"Last selected discovery radius in miles; null uses the default 50 miles","example":50,"enum":[5,10,25,50,100,250]},"discoverNearMeOnly":{"type":"boolean","description":"Whether discovery is filtered by the selected radius from saved location","example":false},"publicProfileCode":{"type":"string","nullable":true,"example":"abc123xyz"},"dailyMatchPushNotificationsEnabled":{"type":"boolean","description":"Whether daily curated match push notifications are enabled","example":true},"privateProfileApiToken":{"$ref":"#/components/schemas/PrivateProfileApiTokenSettings"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","userId","publicProfileEnabled","discoverRadiusMiles","discoverNearMeOnly","publicProfileCode","dailyMatchPushNotificationsEnabled","privateProfileApiToken","createdAt","updatedAt"]},"UserSettingsResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/UserSettings"}},"required":["success","data"]},"UpdateUserSettings":{"type":"object","properties":{"discoverRadiusMiles":{"type":"integer","nullable":true,"description":"Last selected discovery radius in miles; null uses the default 50 miles","example":50,"enum":[5,10,25,50,100,250]},"discoverNearMeOnly":{"type":"boolean"},"publicProfileEnabled":{"type":"boolean","description":"Enable or disable public profile visibility","example":true},"dailyMatchPushNotificationsEnabled":{"type":"boolean","description":"Enable or disable daily curated match push notifications","example":true}}},"PrivateProfileApiTokenResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"token":{"type":"string","description":"Raw private profile API token. Returned only immediately after create/rotation.","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"settings":{"$ref":"#/components/schemas/UserSettings"}},"required":["token","settings"]}},"required":["success","data"]},"RevokePrivateProfileApiTokenResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/UserSettings"}},"required":["success","data"]},"BlockUserResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"User blocked successfully"}},"required":["success","message"]},"BlockUserRequest":{"type":"object","properties":{"blockedUserId":{"type":"string","minLength":1,"description":"The ID of the user to block","example":"cm39user456"}},"required":["blockedUserId"]},"UnblockUserResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"User unblocked successfully"}},"required":["success","message"]},"UnblockUserRequest":{"type":"object","properties":{"blockedUserId":{"type":"string","minLength":1,"description":"The ID of the user to unblock","example":"cm39user456"}},"required":["blockedUserId"]},"BlockedUser":{"type":"object","properties":{"id":{"type":"string","example":"cm39block123"},"blockedId":{"type":"string","example":"cm39user456"},"profile":{"$ref":"#/components/schemas/PublicProfile"},"createdAt":{"type":"string","example":"2025-01-15T10:30:00.000Z"}},"required":["id","blockedId","profile","createdAt"]},"BlockedUsersResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/BlockedUser"},"description":"List of blocked users"}},"required":["success","data"]},"ReportUserResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"User reported successfully"}},"required":["success","message"]},"ReportUserRequest":{"type":"object","properties":{"reportedUserId":{"type":"string","minLength":1,"description":"The ID of the user to report","example":"cm39user456"},"reason":{"type":"string","enum":["INAPPROPRIATE_CONTENT","HARASSMENT","FAKE_PROFILE","SPAM","UNDERAGE","OTHER"],"description":"Reason for reporting the user","example":"HARASSMENT"},"description":{"type":"string","maxLength":500,"description":"Additional details about the report","example":"This user sent me inappropriate messages"},"autoBlock":{"type":"boolean","default":true,"description":"Whether to also block the reported user (default: true)","example":true}},"required":["reportedUserId","reason"]},"RecordProfileViewResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Profile view recorded"}},"required":["success","message"]},"RecordProfileViewRequest":{"type":"object","properties":{"viewedUserId":{"type":"string","minLength":1,"description":"The ID of the user whose profile was viewed","example":"cm39user456"}},"required":["viewedUserId"]},"ActivityTrait":{"type":"object","properties":{"name":{"type":"string","example":"Beach Lover"},"evidenceSources":{"type":"array","items":{"type":"string"},"description":"Sources that support the trait","example":["Photos","Location"]}},"required":["name","evidenceSources"]},"ActivityItem":{"type":"object","properties":{"id":{"type":"string","example":"cm39abc123xyz"},"source":{"type":"string","enum":["generation","event"],"example":"generation"},"type":{"type":"string","example":"BIO"},"description":{"type":"string","nullable":true,"description":"Backend-provided description (resultSummary or event message). May be null for generation items with no summary.","example":"Cupid's learned more about you, and adjusted your bio accordingly."},"actionPath":{"type":"string","nullable":true,"description":"Optional in-app navigation path for activity items that should open a specific destination.","example":"/messages?thread=cm39abc123xyz"},"bioContent":{"type":"string","nullable":true,"description":"Full generated bio text for BIO generation items. Included so each activity card can show the bio from that event rather than the latest bio.","example":"Alex is a thoughtful city explorer who..."},"dailyMatchNames":{"type":"array","items":{"type":"string"},"description":"Display names for DAILY_MATCHES event items.","example":["Jordan","Taylor","Sam"]},"traits":{"type":"array","items":{"$ref":"#/components/schemas/ActivityTrait"},"description":"Structured trait details for TRAITS generation items after duplicate trait names have been removed from the feed."},"isRead":{"type":"boolean","example":true},"relatedUserName":{"type":"string","nullable":true,"example":"Taylor"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","source","type","description","isRead","relatedUserName","createdAt"]},"ActivityResponse":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ActivityItem"},"description":"List of activity items"}},"required":["success","data"]},"WalletMetadata":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"cmwallet123"},"address":{"type":"string","example":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM"},"credentialId":{"type":"string","description":"Public WebAuthn credential reference used by the first-party wallet host for constrained reconnect.","example":"X3VzZXItcGFzc2tleS1jcmVkZW50aWFs"},"version":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"previousWalletId":{"type":"string","nullable":true,"example":"cmwalletprevious123"},"verificationMethod":{"type":"string","nullable":true,"enum":["STACKS_SIGNATURE_V1"],"example":"STACKS_SIGNATURE_V1"},"verifiedAt":{"type":"string","nullable":true,"format":"date-time","example":"2026-08-08T20:00:00.000Z"},"activatedAt":{"type":"string","nullable":true,"format":"date-time","example":"2026-08-08T20:00:00.000Z"},"rotatedAt":{"type":"string","nullable":true,"format":"date-time","example":"2026-08-10T20:00:00.000Z"},"revokedAt":{"type":"string","nullable":true,"format":"date-time","example":"2026-08-10T20:00:00.000Z"},"recoveryBackupConfirmedAt":{"type":"string","nullable":true,"format":"date-time","description":"When the user signed a version-bound confirmation that the recovery phrase was saved and the restored external wallet showed the matching mainnet address. No recovery phrase is sent or stored.","example":"2026-08-13T20:00:00.000Z"},"marketplaceSyncState":{"type":"string","enum":["NOT_REQUIRED","PENDING","SYNCED","FAILED"],"description":"Marketplace projection state only. SYNCED means this exact wallet version was acknowledged; it is not a payment status."},"lastMarketplaceSyncedVersion":{"type":"integer","minimum":0},"marketplaceAcknowledged":{"type":"boolean","description":"True only after the marketplace acknowledged this exact wallet version. It is a prerequisite for future eligibility, not a payment-ready or paid state."},"createdAt":{"type":"string","format":"date-time","example":"2026-08-08T20:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-08-08T20:00:00.000Z"}},"required":["id","address","credentialId","version","previousWalletId","verificationMethod","verifiedAt","activatedAt","rotatedAt","revokedAt","recoveryBackupConfirmedAt","marketplaceSyncState","lastMarketplaceSyncedVersion","marketplaceAcknowledged","createdAt","updatedAt"]},"WalletStatus":{"type":"object","properties":{"network":{"type":"string","enum":["testnet"],"description":"The only wallet network enabled for the current preview.","example":"testnet"},"status":{"anyOf":[{"type":"string","enum":["NONE"]},{"type":"string","enum":["PENDING","ACTIVE","ROTATING","REVOKED","RECOVERY_REQUIRED"],"example":"ACTIVE"}],"description":"Authoritative server lifecycle status, independent of browser storage.","example":"ACTIVE"},"wallet":{"$ref":"#/components/schemas/WalletMetadata"}},"required":["network","status","wallet"]},"WalletStatusResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/WalletStatus"}},"required":["success","data"]},"WalletChallenge":{"type":"object","properties":{"challengeId":{"type":"string","example":"cmchallenge123"},"network":{"type":"string","enum":["testnet"],"description":"The only wallet network enabled for the current preview.","example":"testnet"},"address":{"type":"string","example":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM"},"credentialId":{"type":"string","minLength":16,"maxLength":2048,"pattern":"^[A-Za-z0-9_-]+$","example":"X3VzZXItcGFzc2tleS1jcmVkZW50aWFs"},"nonce":{"type":"string","description":"Single-use random value. Only its SHA-256 hash is stored by Dataing.","example":"jY5l0N5XxH4gQjIh8FjBwB06q3RbWwz5n-zX2Y6VqXU"},"message":{"type":"string","description":"Exact domain-separated UTF-8 message whose SHA-256 digest must be signed."},"expiresAt":{"type":"string","format":"date-time","example":"2026-08-08T20:05:00.000Z"}},"required":["challengeId","network","address","credentialId","nonce","message","expiresAt"]},"WalletChallengeResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/WalletChallenge"}},"required":["success","data"]},"CreateWalletChallengeRequest":{"type":"object","properties":{"network":{"type":"string","enum":["testnet"],"description":"The only wallet network enabled for the current preview.","example":"testnet"},"address":{"type":"string","minLength":1,"maxLength":64,"example":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM"},"credentialId":{"type":"string","minLength":16,"maxLength":2048,"pattern":"^[A-Za-z0-9_-]+$","example":"X3VzZXItcGFzc2tleS1jcmVkZW50aWFs"}},"required":["network","address","credentialId"]},"VerifyWalletChallengeResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/WalletStatus"}},"required":["success","data"]},"VerifyWalletChallengeRequest":{"type":"object","properties":{"challengeId":{"type":"string","minLength":1,"maxLength":128,"example":"cmchallenge123"},"nonce":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$","example":"jY5l0N5XxH4gQjIh8FjBwB06q3RbWwz5n-zX2Y6VqXU"},"signature":{"type":"string","pattern":"^[0-9a-fA-F]{130}$","description":"Recoverable secp256k1 signature in RSV format."}},"required":["challengeId","nonce","signature"]},"WalletLifecycleChallenge":{"allOf":[{"$ref":"#/components/schemas/WalletChallenge"},{"type":"object","properties":{"purpose":{"type":"string","enum":["ROTATE","RECOVER"],"example":"ROTATE"},"sourceWalletId":{"type":"string","example":"cmwallet123"},"sourceWalletVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1}},"required":["purpose","sourceWalletId","sourceWalletVersion"]}]},"WalletLifecycleChallengeResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/WalletLifecycleChallenge"}},"required":["success","data"]},"CreateWalletRotationChallengeRequest":{"type":"object","properties":{"network":{"type":"string","enum":["testnet"],"description":"The only wallet network enabled for the current preview.","example":"testnet"},"expectedVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"address":{"type":"string","minLength":1,"maxLength":64,"example":"ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM"},"credentialId":{"type":"string","minLength":16,"maxLength":2048,"pattern":"^[A-Za-z0-9_-]+$","example":"X3VzZXItcGFzc2tleS1jcmVkZW50aWFs"}},"required":["network","expectedVersion","address","credentialId"]},"VerifyWalletRotationRequest":{"type":"object","properties":{"challengeId":{"type":"string","minLength":1,"maxLength":128},"nonce":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]+$"},"currentSignature":{"type":"string","pattern":"^[0-9a-fA-F]{130}$"},"newSignature":{"type":"string","pattern":"^[0-9a-fA-F]{130}$"}},"required":["challengeId","nonce","currentSignature","newSignature"]},"WalletBackupChallenge":{"allOf":[{"$ref":"#/components/schemas/WalletChallenge"},{"type":"object","properties":{"purpose":{"type":"string","enum":["BACKUP"]},"sourceWalletId":{"type":"string","example":"cmwallet123"},"sourceWalletVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"mainnetAddress":{"type":"string","minLength":1,"maxLength":64,"pattern":"^SP[0-9A-HJKMNP-TV-Z]+$","example":"SP1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRCBGD7R"}},"required":["purpose","sourceWalletId","sourceWalletVersion","mainnetAddress"]}]},"WalletBackupChallengeResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/WalletBackupChallenge"}},"required":["success","data"]},"CreateWalletBackupChallengeRequest":{"type":"object","properties":{"network":{"type":"string","enum":["testnet"],"description":"The only wallet network enabled for the current preview.","example":"testnet"},"expectedVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true},"mainnetAddress":{"type":"string","minLength":1,"maxLength":64,"pattern":"^SP[0-9A-HJKMNP-TV-Z]+$","example":"SP1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRCBGD7R"}},"required":["network","expectedVersion","mainnetAddress"]},"VerifyWalletBackupRequest":{"allOf":[{"$ref":"#/components/schemas/VerifyWalletChallengeRequest"},{"type":"object","properties":{"mainnetAddress":{"type":"string","minLength":1,"maxLength":64,"pattern":"^SP[0-9A-HJKMNP-TV-Z]+$","example":"SP1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRCBGD7R"},"confirmRecoveryPhraseSaved":{"type":"boolean","enum":[true],"description":"The user confirms that the locally revealed recovery phrase was saved."},"confirmExternalAddressMatched":{"type":"boolean","enum":[true],"description":"The user confirms that restoring the phrase externally produced the same mainnet address."}},"required":["mainnetAddress","confirmRecoveryPhraseSaved","confirmExternalAddressMatched"]}]},"RevokeWalletRequest":{"type":"object","properties":{"network":{"type":"string","enum":["testnet"],"description":"The only wallet network enabled for the current preview.","example":"testnet"},"expectedVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true},"reason":{"type":"string","enum":["USER_REQUEST","SUSPECTED_COMPROMISE"],"example":"USER_REQUEST"},"confirm":{"type":"boolean","enum":[true],"description":"Explicit acknowledgement that revocation cannot be undone automatically."}},"required":["network","expectedVersion","reason","confirm"]},"WalletRecoveryRequest":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"cmrecovery123"},"walletId":{"type":"string","example":"cmwallet123"},"network":{"type":"string","enum":["testnet"],"description":"The only wallet network enabled for the current preview.","example":"testnet"},"expectedVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true},"reason":{"type":"string","enum":["LOST_OR_UNSYNCED_CREDENTIAL","SUSPECTED_COMPROMISE","DEVICE_LOSS","OTHER"],"example":"LOST_OR_UNSYNCED_CREDENTIAL"},"status":{"type":"string","enum":["PENDING","APPROVED","REJECTED","COMPLETED"]},"requestedAt":{"type":"string","format":"date-time"},"eligibleAt":{"type":"string","format":"date-time"},"approvedAt":{"type":"string","nullable":true,"format":"date-time"},"rejectedAt":{"type":"string","nullable":true,"format":"date-time"},"completedAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","walletId","network","expectedVersion","reason","status","requestedAt","eligibleAt","approvedAt","rejectedAt","completedAt","createdAt","updatedAt"]},"WalletRecoveryStatusResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"network":{"type":"string","enum":["testnet"],"description":"The only wallet network enabled for the current preview.","example":"testnet"},"recovery":{"$ref":"#/components/schemas/WalletRecoveryRequest"}},"required":["network","recovery"]}},"required":["success","data"]},"WalletRecoveryResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/WalletRecoveryRequest"}},"required":["success","data"]},"RequestWalletRecovery":{"type":"object","properties":{"network":{"type":"string","enum":["testnet"],"description":"The only wallet network enabled for the current preview.","example":"testnet"},"expectedVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true},"reason":{"type":"string","enum":["LOST_OR_UNSYNCED_CREDENTIAL","SUSPECTED_COMPROMISE","DEVICE_LOSS","OTHER"],"example":"LOST_OR_UNSYNCED_CREDENTIAL"},"confirm":{"type":"boolean","enum":[true],"description":"Acknowledges that the current wallet will be disabled while support reviews recovery."}},"required":["network","expectedVersion","reason","confirm"]},"CreateWalletRecoveryChallengeRequest":{"type":"object","properties":{"network":{"type":"string","enum":["testnet"],"description":"The only wallet network enabled for the current preview.","example":"testnet"},"recoveryRequestId":{"type":"string","minLength":1,"maxLength":128},"address":{"type":"string","minLength":1,"maxLength":64},"credentialId":{"type":"string","minLength":16,"maxLength":2048,"pattern":"^[A-Za-z0-9_-]+$","example":"X3VzZXItcGFzc2tleS1jcmVkZW50aWFs"}},"required":["network","recoveryRequestId","address","credentialId"]},"VerifyWalletRecoveryRequest":{"allOf":[{"$ref":"#/components/schemas/VerifyWalletChallengeRequest"},{"type":"object","properties":{}}]},"ApiPartnerConsentGrant":{"type":"object","properties":{"id":{"type":"string"},"pairwiseSubject":{"type":"string","pattern":"^dps_[A-Za-z0-9_-]{43}$"},"status":{"type":"string","enum":["ACTIVE","REVOKED"]},"accessStatus":{"type":"string","enum":["ACTIVE","REVOKED","PARTNER_UNAVAILABLE","RECONSENT_REQUIRED","WALLET_REAUTHORIZATION_REQUIRED"]},"approvedScopes":{"type":"array","items":{"type":"string","enum":["openid","offline_access","profile","wallet:status","wallet:address","preferences:monetization","preferences:matchmaking","traits:ads","profile:traits"]}},"allowedCapabilities":{"type":"array","items":{"type":"string","enum":["SIGN_IN","WALLET","MONETIZATION","MATCHMAKING","AD_PERSONALIZATION","EXTENDED_PROFILE"]}},"monetizationEnabled":{"type":"boolean"},"matchmakingEnabled":{"type":"boolean"},"consentText":{"type":"string"},"consentTextVersion":{"type":"string"},"applicationVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true},"walletVersion":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"version":{"type":"integer","minimum":0,"exclusiveMinimum":true},"consentedAt":{"type":"string","format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"revocationReason":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"application":{"type":"object","properties":{"name":{"type":"string"},"clientId":{"type":"string"},"organizationName":{"type":"string"}},"required":["name","clientId","organizationName"]}},"required":["id","pairwiseSubject","status","accessStatus","approvedScopes","allowedCapabilities","monetizationEnabled","matchmakingEnabled","consentText","consentTextVersion","applicationVersion","walletVersion","version","consentedAt","revokedAt","revocationReason","createdAt","updatedAt","application"]},"ApiPartnerConsentGrantListResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiPartnerConsentGrant"}}},"required":["success","data"]},"ApiPartnerConsentGrantResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/ApiPartnerConsentGrant"}},"required":["success","data"]},"UpdateApiPartnerConsentGrant":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true},"monetizationEnabled":{"type":"boolean","enum":[false],"description":"Account management may disable monetization. Enabling it requires the bound hosted consent flow."},"matchmakingEnabled":{"type":"boolean","enum":[false],"description":"Account management may disable matchmaking. Enabling it requires the bound hosted consent flow."}},"required":["expectedVersion"]},"RevokeApiPartnerConsentGrant":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true},"confirm":{"type":"boolean","enum":[true]},"reason":{"type":"string","enum":["USER_REQUEST","SECURITY_CONCERN","NO_LONGER_NEEDED"]}},"required":["expectedVersion","confirm","reason"]},"UserApiUser":{"type":"object","properties":{"id":{"type":"string","example":"cm39user123"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","createdAt","updatedAt"]},"UserApiMe":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/UserApiUser"},"profile":{"$ref":"#/components/schemas/UserProfile"},"age":{"type":"integer","nullable":true,"example":29},"profileComplete":{"type":"boolean","example":true},"latestBio":{"allOf":[{"$ref":"#/components/schemas/Bio"},{"nullable":true}]},"topTraits":{"type":"array","items":{"$ref":"#/components/schemas/PublicProfileTrait"}},"linkedSignals":{"type":"array","items":{"$ref":"#/components/schemas/PublicProfileLinkedSignal"}},"generatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["user","profile","age","profileComplete","latestBio","topTraits","linkedSignals","generatedAt"]},"UserApiMeResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/UserApiMe"}},"required":["success","data"]},"UserApiPagination":{"type":"object","properties":{"limit":{"type":"integer","example":25},"nextCursor":{"type":"string","nullable":true,"example":"50"},"offset":{"type":"integer","example":25}},"required":["limit","nextCursor","offset"]},"UserApiBiosResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Bio"}},"pagination":{"$ref":"#/components/schemas/UserApiPagination"}},"required":["success","data","pagination"]},"UserApiLatestBioResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"allOf":[{"$ref":"#/components/schemas/Bio"},{"nullable":true}]}},"required":["success","data"]},"UserApiTraitsResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/UserTraitWithRelations"}},"pagination":{"$ref":"#/components/schemas/UserApiPagination"}},"required":["success","data","pagination"]},"UserApiProfilePicturesResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProfilePicture"}},"pagination":{"$ref":"#/components/schemas/UserApiPagination"}},"required":["success","data","pagination"]},"DataConnection":{"type":"object","properties":{"id":{"type":"string","example":"cm39conn123xyz"},"userId":{"type":"string","example":"cm39user123"},"provider":{"type":"string","enum":["YOUTUBE","PINTEREST","TWITTER","EVENTBRITE","TIKTOK","GOOGLE_CALENDAR","APPLE_MUSIC","CHATGPT","LOCATION","PHOTOS"],"example":"YOUTUBE"},"status":{"type":"string","enum":["CONNECTED","DISCONNECTED","ERROR","PENDING"],"example":"CONNECTED"},"lastSyncedAt":{"type":"string","nullable":true,"example":"2024-01-01T00:00:00.000Z"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","userId","provider","status","lastSyncedAt","createdAt","updatedAt"]},"UserApiDataConnectionsResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/DataConnection"}}},"required":["success","data"]},"UserApiGoogleCalendarEventsResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"startTime":{"type":"string","nullable":true},"endTime":{"type":"string","nullable":true},"location":{"type":"string","nullable":true},"isAllDay":{"type":"boolean","nullable":true},"recurrence":{"type":"array","nullable":true,"items":{"type":"string"}},"attendees":{"type":"number","nullable":true}},"required":["id","title","description","startTime","endTime","location","isAllDay","recurrence","attendees"]}},"pagination":{"$ref":"#/components/schemas/UserApiPagination"}},"required":["success","data","pagination"]},"UserApiGoogleCalendarEventResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"startTime":{"type":"string","nullable":true},"endTime":{"type":"string","nullable":true},"location":{"type":"string","nullable":true},"isAllDay":{"type":"boolean","nullable":true},"recurrence":{"type":"array","nullable":true,"items":{"type":"string"}},"attendees":{"type":"number","nullable":true}},"required":["id","title","description","startTime","endTime","location","isAllDay","recurrence","attendees"]}},"required":["success","data"]},"GoogleCalendarEventTime":{"anyOf":[{"type":"object","properties":{"dateTime":{"type":"string","format":"date-time","description":"RFC 3339 timestamp including a UTC offset.","example":"2026-08-20T19:00:00-07:00"},"timeZone":{"type":"string","minLength":1,"maxLength":100,"description":"Optional IANA time zone name.","example":"America/Los_Angeles"}},"required":["dateTime"],"additionalProperties":false},{"type":"object","properties":{"date":{"type":"string","format":"date","description":"Calendar date for an all-day event. The end date is exclusive.","example":"2026-08-20"}},"required":["date"],"additionalProperties":false}]},"CreateGoogleCalendarEvent":{"type":"object","properties":{"calendarId":{"type":"string","minLength":1,"maxLength":1024,"default":"primary","description":"Google Calendar ID. Defaults to the connected account's primary calendar.","example":"primary"},"title":{"type":"string","minLength":1,"maxLength":1024,"example":"Dinner at Bestia"},"description":{"type":"string","maxLength":8192,"example":"Reservation for two"},"location":{"type":"string","maxLength":1024,"example":"2121 E 7th Pl, Los Angeles, CA"},"start":{"$ref":"#/components/schemas/GoogleCalendarEventTime"},"end":{"$ref":"#/components/schemas/GoogleCalendarEventTime"},"attendeeEmails":{"type":"array","items":{"type":"string","format":"email"},"maxItems":50,"description":"Guests to add to the event.","example":["date@example.com"]},"sendUpdates":{"type":"string","enum":["all","externalOnly","none"],"description":"Whether Google should send attendee notifications.","example":"all"}},"required":["title","start","end"]},"UserApiCompatibility":{"type":"object","properties":{"id":{"type":"string","example":"cm39compat123"},"otherUserId":{"type":"string","example":"cm39user456"},"score":{"type":"number","example":0.87},"areProfilesAligned":{"type":"boolean","example":true},"description":{"type":"string","nullable":true,"example":"Strong compatibility"},"matchReason":{"type":"string","nullable":true,"example":"You both value creative weekends."},"traitContributions":{"nullable":true,"description":"Stored trait contribution details for this compatibility record."},"alignmentDetails":{"nullable":true,"description":"Stored profile alignment details for this compatibility record."},"staleAt":{"type":"string","nullable":true,"example":null},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"profile":{"allOf":[{"$ref":"#/components/schemas/PublicProfile"},{"nullable":true}]}},"required":["id","otherUserId","score","areProfilesAligned","description","matchReason","staleAt","createdAt","updatedAt","profile"]},"UserApiCompatibilitiesResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/UserApiCompatibility"}},"pagination":{"$ref":"#/components/schemas/UserApiPagination"}},"required":["success","data","pagination"]},"UserApiDiscoverResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/DiscoverMatch"}},"pagination":{"$ref":"#/components/schemas/UserApiPagination"}},"required":["success","data","pagination"]},"UserApiMatchRequestsResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/MatchRequest"}},"pagination":{"$ref":"#/components/schemas/UserApiPagination"}},"required":["success","data","pagination"]},"ThreadParticipantPreview":{"type":"object","properties":{"userId":{"type":"string","nullable":true,"example":"cmj0user456"},"name":{"type":"string","nullable":true,"example":"Taylor"}},"required":["userId","name"]},"ChatImageAttachment":{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"url":{"type":"string","format":"uri","description":"Short-lived signed URL for displaying the private chat image","example":"https://bucket.s3.amazonaws.com/chat-images/thread/image.jpg?signature=..."},"contentType":{"type":"string","enum":["image/jpeg","image/png","image/webp"],"example":"image/jpeg"},"width":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"height":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true},"altText":{"type":"string","nullable":true,"description":"Concise visual description when one was generated for Cupid","example":"A golden retriever running on a beach at sunset."}},"required":["type","url","contentType","width","height","altText"]},"ChatThreadMessage":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"cmj0message123"},"threadId":{"type":"string","example":"cmj0thread123"},"senderType":{"type":"string","enum":["USER","BOT"],"description":"Origin of the chat message","example":"BOT"},"agentType":{"type":"string","nullable":true,"enum":["CUPID"],"description":"Agent identity for agent-authored messages","example":"CUPID"},"userId":{"type":"string","nullable":true,"description":"User id when sender is a user","example":"cmj0user456"},"content":{"type":"string","example":"Welcome back!"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ChatImageAttachment"},"description":"Private image attachments included with this message"},"metadata":{"nullable":true,"example":{"action":{"type":"suggest","relationshipId":"cmj0relationship123"}}},"createdAt":{"type":"string","example":"2025-11-16T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2025-11-16T01:00:00.000Z"},"user":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"cmj0user456"},"name":{"type":"string","nullable":true,"example":"Taylor"}},"required":["id","name"]}},"required":["id","threadId","senderType","agentType","userId","content","createdAt","updatedAt"],"description":"Most recent message in the thread"},"ThreadListItem":{"type":"object","properties":{"id":{"type":"string","example":"cmj0thread123"},"type":{"type":"string","enum":["SOLO","MULTI","SUPPORT"],"description":"Type of chat thread","example":"SOLO"},"relationshipId":{"type":"string","nullable":true,"description":"The relationship this thread belongs to (for MULTI threads)","example":"cmj0relationship456"},"participants":{"type":"array","items":{"$ref":"#/components/schemas/ThreadParticipantPreview"},"description":"List of participants in the thread"},"lastMessage":{"$ref":"#/components/schemas/ChatThreadMessage"},"isNewMatch":{"type":"boolean","description":"Whether this mutual match is new to the current user","example":true},"unreadCount":{"type":"number","description":"Number of unread items, including an unopened new match","example":1},"createdAt":{"type":"string","example":"2025-11-16T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2025-11-16T01:00:00.000Z"}},"required":["id","type","relationshipId","participants","lastMessage","isNewMatch","unreadCount","createdAt","updatedAt"]},"ThreadListResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"threads":{"type":"array","items":{"$ref":"#/components/schemas/ThreadListItem"}},"pagination":{"type":"object","properties":{"page":{"type":"number","example":1},"limit":{"type":"number","example":20},"total":{"type":"number","example":5},"hasMore":{"type":"boolean","example":false}},"required":["page","limit","total","hasMore"]}},"required":["threads","pagination"]}},"required":["success","data"]},"SoloChatMetadata":{"type":"object","properties":{"id":{"type":"string","example":"cmj0metadata123"},"userId":{"type":"string","example":"cmj0user123"},"status":{"type":"string","enum":["ONBOARDING","EXPLORING_MATCHES","FOCUSED_MATCH"],"description":"State of the solo chat experience","example":"EXPLORING_MATCHES"},"context":{"nullable":true,"description":"Focused match context when Cupid is zeroing in on someone","example":{"focusedRelationshipId":"cmj0relationship123","otherUserName":"Jordan"}},"createdAt":{"type":"string","example":"2025-11-16T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2025-11-16T01:00:00.000Z"}},"required":["id","userId","status","createdAt","updatedAt"]},"RelationshipTraitHighlight":{"type":"object","properties":{"name":{"type":"string","example":"Creative spark"},"score":{"type":"number","example":0.92},"evidence":{"type":"array","items":{"type":"string","example":"YouTube liked videos"},"description":"Short labels summarizing supporting evidence"}},"required":["name","score","evidence"]},"SoloRelationshipSummary":{"type":"object","properties":{"id":{"type":"string","example":"cmj0relationship123"},"otherUserId":{"type":"string","example":"cmj0user789"},"otherUserName":{"type":"string","nullable":true,"description":"Display name of the other user","example":"Taylor"},"status":{"type":"string","enum":["NOT_INITIATED","DISCOVER_SUGGESTED","DAILY_SUGGESTED","SUGGESTED","ACCEPTED","REJECTED"],"description":"Current status of the relationship","example":"SUGGESTED"},"occupation":{"type":"string","nullable":true,"example":"Community Manager"},"bioSnippet":{"type":"string","nullable":true,"description":"Short introduction pulled from the user's bio","example":"Emily blends community-building with a love for live music and beach days."},"traits":{"type":"array","items":{"$ref":"#/components/schemas/RelationshipTraitHighlight"}}},"required":["id","otherUserId","otherUserName","status"]},"SoloChatContext":{"type":"object","properties":{"metadata":{"$ref":"#/components/schemas/SoloChatMetadata"},"relationships":{"type":"array","items":{"$ref":"#/components/schemas/SoloRelationshipSummary"}}},"required":["metadata","relationships"],"description":"Cupid solo chat context, present for SOLO threads"},"ThreadMessagesResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"threadId":{"type":"string","example":"cmj0thread123"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatThreadMessage"}},"participants":{"type":"array","items":{"$ref":"#/components/schemas/ThreadParticipantPreview"}},"hasMore":{"type":"boolean","description":"Whether older messages exist","example":true},"context":{"$ref":"#/components/schemas/SoloChatContext"}},"required":["threadId","messages","participants","hasMore"]}},"required":["success","data"]},"GoogleCalendarFeed":{"type":"object","properties":{"calendars":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"primary":{"type":"boolean"},"color":{"type":"string","nullable":true},"status":{"type":"string","enum":["ready","unavailable","limited"]}},"required":["id","name","primary","color","status"]}},"agendaVersion":{"type":"number","enum":[1]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"calendarId":{"type":"string"},"occurrenceKey":{"type":"string","pattern":"^[a-f0-9]{64}$"},"title":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"allDay":{"type":"boolean"},"location":{"type":"string","nullable":true},"htmlLink":{"type":"string","nullable":true},"meetingUrl":{"type":"string","nullable":true,"format":"uri"},"status":{"type":"string","enum":["confirmed","tentative"]}},"required":["id","calendarId","title","start","end","allDay","location","htmlLink","status"]}},"timeMin":{"type":"string"},"timeMax":{"type":"string"},"syncedAt":{"type":"string"},"partial":{"type":"boolean"}},"required":["calendars","events","timeMin","timeMax","syncedAt","partial"]},"GoogleCalendarFeedResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/GoogleCalendarFeed"}},"required":["success","data"]},"DataConnectionsListResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/DataConnection"}}},"required":["success","data"]},"DataConnectionWithData":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"cm39conn123xyz"},"userId":{"type":"string","example":"cm39user123"},"provider":{"type":"string","enum":["YOUTUBE","PINTEREST","TWITTER","EVENTBRITE","TIKTOK","GOOGLE_CALENDAR","APPLE_MUSIC","CHATGPT","LOCATION","PHOTOS"],"example":"YOUTUBE"},"status":{"type":"string","enum":["CONNECTED","DISCONNECTED","ERROR","PENDING"],"example":"CONNECTED"},"lastSyncedAt":{"type":"string","nullable":true,"example":"2024-01-01T00:00:00.000Z"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"data":{"oneOf":[{"type":"object","properties":{"provider":{"type":"string","enum":["YOUTUBE"]},"data":{"type":"object","properties":{"channelId":{"type":"string","nullable":true},"channelName":{"type":"string","nullable":true},"subscriberCount":{"type":"number","nullable":true},"videoCount":{"type":"number","nullable":true},"viewCount":{"type":"number","nullable":true},"subscribedChannels":{"type":"array","nullable":true,"items":{"type":"string"}},"likedVideos":{"type":"array","nullable":true,"items":{"type":"object","properties":{"videoId":{"type":"string"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"publishedAt":{"type":"string","nullable":true},"thumbnailPath":{"type":"string","nullable":true},"url":{"type":"string","nullable":true,"format":"uri"}},"required":["videoId","title","description","publishedAt","thumbnailPath","url"]}},"playlists":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}},"required":["channelId","channelName","subscriberCount","videoCount","viewCount","subscribedChannels","likedVideos","playlists"]}},"required":["provider","data"]},{"type":"object","properties":{"provider":{"type":"string","enum":["PINTEREST"]},"data":{"type":"object","properties":{"accountId":{"type":"string","nullable":true},"username":{"type":"string","nullable":true},"fullName":{"type":"string","nullable":true},"followerCount":{"type":"number","nullable":true},"followingCount":{"type":"number","nullable":true},"boardCount":{"type":"number","nullable":true},"pinCount":{"type":"number","nullable":true},"profileImageUrl":{"type":"string","nullable":true,"format":"uri"},"boards":{"type":"array","nullable":true,"items":{"type":"object","properties":{"boardId":{"type":"string"},"name":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"url":{"type":"string","nullable":true,"format":"uri"},"coverImageUrl":{"type":"string","nullable":true,"format":"uri"},"pinCount":{"type":"number","nullable":true},"isSecret":{"type":"boolean","nullable":true}},"required":["boardId","name","description","url","coverImageUrl","pinCount","isSecret"]}},"pins":{"type":"array","nullable":true,"items":{"type":"object","properties":{"pinId":{"type":"string"},"boardId":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"altText":{"type":"string","nullable":true},"mediaUrl":{"type":"string","nullable":true,"format":"uri"},"mediaType":{"type":"string","nullable":true},"mediaWidth":{"type":"number","nullable":true},"mediaHeight":{"type":"number","nullable":true},"mediaDominantColor":{"type":"string","nullable":true},"link":{"type":"string","nullable":true,"format":"uri"},"localMediaPath":{"type":"string","nullable":true},"savedAt":{"type":"string","nullable":true}},"required":["pinId","boardId","title","description","altText","mediaUrl","mediaType","mediaWidth","mediaHeight","mediaDominantColor","link","localMediaPath","savedAt"]}},"interests":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string","nullable":true},"name":{"type":"string"},"category":{"type":"string","nullable":true}},"required":["id","name","category"]}}},"required":["accountId","username","fullName","followerCount","followingCount","boardCount","pinCount","profileImageUrl","boards","pins","interests"]}},"required":["provider","data"]},{"type":"object","properties":{"provider":{"type":"string","enum":["TWITTER"]},"data":{"type":"object","properties":{"twitterId":{"type":"string","nullable":true},"username":{"type":"string","nullable":true},"displayName":{"type":"string","nullable":true},"profileBio":{"type":"string","nullable":true},"profileLocation":{"type":"string","nullable":true},"profileUrl":{"type":"string","nullable":true},"profileImageUrl":{"type":"string","nullable":true},"profileBannerUrl":{"type":"string","nullable":true},"accountCreatedAt":{"type":"string","nullable":true},"isProtected":{"type":"boolean","nullable":true},"followerCount":{"type":"number","nullable":true},"followingCount":{"type":"number","nullable":true},"tweetCount":{"type":"number","nullable":true},"verified":{"type":"boolean","nullable":true},"verifiedType":{"type":"string","nullable":true},"isIdentityVerified":{"type":"boolean","nullable":true},"pinnedTweetId":{"type":"string","nullable":true},"tweets":{"type":"array","nullable":true,"items":{"type":"object","properties":{"tweetId":{"type":"string"},"text":{"type":"string"},"authorId":{"type":"string","nullable":true},"tweetCreatedAt":{"type":"string","nullable":true},"likeCount":{"type":"number","nullable":true},"retweetCount":{"type":"number","nullable":true},"replyCount":{"type":"number","nullable":true},"quoteCount":{"type":"number","nullable":true},"language":{"type":"string","nullable":true},"source":{"type":"string","nullable":true},"sourceTypes":{"type":"array","nullable":true,"items":{"type":"string"}},"conversationId":{"type":"string","nullable":true},"noteText":{"type":"string","nullable":true},"possiblySensitive":{"type":"boolean","nullable":true},"mediaKeys":{"type":"array","nullable":true,"items":{"type":"string"}}},"required":["tweetId","text","authorId","tweetCreatedAt","likeCount","retweetCount","replyCount","quoteCount","language","source","sourceTypes","conversationId","noteText","possiblySensitive","mediaKeys"]}},"followedAccounts":{"type":"array","nullable":true,"items":{"type":"string"}},"likedTweets":{"type":"array","nullable":true,"items":{"type":"string"}},"bookmarkedTweets":{"type":"array","nullable":true,"items":{"type":"string"}},"interests":{"type":"array","nullable":true,"items":{"type":"string"}}},"required":["twitterId","username","displayName","profileBio","profileLocation","profileUrl","profileImageUrl","profileBannerUrl","accountCreatedAt","isProtected","followerCount","followingCount","tweetCount","verified","verifiedType","isIdentityVerified","pinnedTweetId","tweets","followedAccounts","likedTweets","bookmarkedTweets","interests"]}},"required":["provider","data"]},{"type":"object","properties":{"provider":{"type":"string","enum":["APPLE_MUSIC"]},"data":{"type":"object","properties":{"appleMusicId":{"type":"string","nullable":true},"topArtists":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"topAlbums":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"artistName":{"type":"string","nullable":true},"genres":{"type":"array","nullable":true,"items":{"type":"string"}},"trackCount":{"type":"number","nullable":true},"dateAdded":{"type":"string","nullable":true},"releaseDate":{"type":"string","nullable":true},"artworkUrl":{"type":"string","nullable":true}},"required":["id","name"]}},"topSongs":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"artistName":{"type":"string","nullable":true},"albumName":{"type":"string","nullable":true},"genres":{"type":"array","nullable":true,"items":{"type":"string"}},"durationMs":{"type":"number","nullable":true},"trackNumber":{"type":"number","nullable":true},"releaseDate":{"type":"string","nullable":true},"artworkUrl":{"type":"string","nullable":true}},"required":["id","name"]}},"playlists":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"dateAdded":{"type":"string","nullable":true},"lastModifiedDate":{"type":"string","nullable":true},"isPublic":{"type":"boolean","nullable":true},"artworkUrl":{"type":"string","nullable":true}},"required":["id","name"]}},"recentlyPlayed":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"artistName":{"type":"string","nullable":true},"albumName":{"type":"string","nullable":true},"genres":{"type":"array","nullable":true,"items":{"type":"string"}},"durationMs":{"type":"number","nullable":true},"trackNumber":{"type":"number","nullable":true},"releaseDate":{"type":"string","nullable":true},"artworkUrl":{"type":"string","nullable":true}},"required":["id","name"]}},"genres":{"type":"array","nullable":true,"items":{"type":"string"}}},"required":["appleMusicId","topArtists","topAlbums","topSongs","playlists","recentlyPlayed","genres"]}},"required":["provider","data"]},{"type":"object","properties":{"provider":{"type":"string","enum":["PHOTOS"]},"data":{"type":"object","properties":{"photoCount":{"type":"number"},"photos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"storageKey":{"type":"string"},"url":{"type":"string","nullable":true},"originalName":{"type":"string","nullable":true},"analysisStatus":{"type":"string","enum":["PENDING","ANALYZING","COMPLETED","FAILED"]},"analysisSummary":{"type":"string","nullable":true},"uploadedAt":{"type":"string"}},"required":["id","storageKey","url","originalName","analysisStatus","analysisSummary","uploadedAt"]}}},"required":["photoCount","photos"]}},"required":["provider","data"]},{"type":"object","properties":{"provider":{"type":"string","enum":["TIKTOK"]},"data":{"type":"object","properties":{"tiktokId":{"type":"string","nullable":true},"username":{"type":"string","nullable":true},"displayName":{"type":"string","nullable":true},"avatarUrl":{"type":"string","nullable":true,"format":"uri"},"followerCount":{"type":"number","nullable":true},"followingCount":{"type":"number","nullable":true},"likeCount":{"type":"number","nullable":true},"videoCount":{"type":"number","nullable":true},"bioDescription":{"type":"string","nullable":true},"isVerified":{"type":"boolean","nullable":true},"videos":{"type":"array","nullable":true,"items":{"type":"object","properties":{"videoId":{"type":"string"},"title":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"duration":{"type":"number","nullable":true},"coverImageUrl":{"type":"string","nullable":true,"format":"uri"},"embedLink":{"type":"string","nullable":true,"format":"uri"},"likeCount":{"type":"number","nullable":true},"commentCount":{"type":"number","nullable":true},"shareCount":{"type":"number","nullable":true},"viewCount":{"type":"number","nullable":true},"createdAt":{"type":"string","nullable":true}},"required":["videoId","title","description","duration","coverImageUrl","embedLink","likeCount","commentCount","shareCount","viewCount","createdAt"]}},"likedVideos":{"type":"array","nullable":true,"items":{"type":"string"}},"followedAccounts":{"type":"array","nullable":true,"items":{"type":"string"}},"interests":{"type":"array","nullable":true,"items":{"type":"string"}}},"required":["tiktokId","username","displayName","avatarUrl","followerCount","followingCount","likeCount","videoCount","bioDescription","isVerified","videos","likedVideos","followedAccounts","interests"]}},"required":["provider","data"]},{"type":"object","properties":{"provider":{"type":"string","enum":["EVENTBRITE"]},"data":{"type":"object","properties":{"eventbriteId":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"attendedEvents":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"startTime":{"type":"string","nullable":true},"endTime":{"type":"string","nullable":true},"venue":{"type":"string","nullable":true},"category":{"type":"string","nullable":true},"isOnline":{"type":"boolean","nullable":true},"isFree":{"type":"boolean","nullable":true},"url":{"type":"string","nullable":true}},"required":["id","name","description","startTime","endTime","venue","category","isOnline","isFree","url"]}},"upcomingEvents":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"startTime":{"type":"string","nullable":true},"endTime":{"type":"string","nullable":true},"venue":{"type":"string","nullable":true},"category":{"type":"string","nullable":true},"isOnline":{"type":"boolean","nullable":true},"isFree":{"type":"boolean","nullable":true},"url":{"type":"string","nullable":true}},"required":["id","name","description","startTime","endTime","venue","category","isOnline","isFree","url"]}},"eventCategories":{"type":"array","nullable":true,"items":{"type":"string"}}},"required":["eventbriteId","email","attendedEvents","upcomingEvents","eventCategories"]}},"required":["provider","data"]},{"type":"object","properties":{"provider":{"type":"string","enum":["GOOGLE_CALENDAR"]},"data":{"type":"object","properties":{"email":{"type":"string","nullable":true},"primaryCalendarId":{"type":"string","nullable":true},"calendars":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"isPrimary":{"type":"boolean","nullable":true},"timeZone":{"type":"string","nullable":true},"backgroundColor":{"type":"string","nullable":true}},"required":["id","name","description","isPrimary","timeZone","backgroundColor"]}},"upcomingEvents":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"startTime":{"type":"string","nullable":true},"endTime":{"type":"string","nullable":true},"location":{"type":"string","nullable":true},"isAllDay":{"type":"boolean","nullable":true},"recurrence":{"type":"array","nullable":true,"items":{"type":"string"}},"attendees":{"type":"number","nullable":true}},"required":["id","title","description","startTime","endTime","location","isAllDay","recurrence","attendees"]}},"recurringEvents":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"startTime":{"type":"string","nullable":true},"endTime":{"type":"string","nullable":true},"location":{"type":"string","nullable":true},"isAllDay":{"type":"boolean","nullable":true},"recurrence":{"type":"array","nullable":true,"items":{"type":"string"}},"attendees":{"type":"number","nullable":true}},"required":["id","title","description","startTime","endTime","location","isAllDay","recurrence","attendees"]}},"eventCategories":{"type":"array","nullable":true,"items":{"type":"string"}}},"required":["email","primaryCalendarId","calendars","upcomingEvents","recurringEvents","eventCategories"]}},"required":["provider","data"]},{"type":"object","properties":{"provider":{"type":"string","enum":["LOCATION"]},"data":{"type":"object","properties":{"currentCity":{"type":"string","nullable":true},"currentState":{"type":"string","nullable":true},"currentCountry":{"type":"string","nullable":true},"currentLatitude":{"type":"number","nullable":true},"currentLongitude":{"type":"number","nullable":true},"frequentLocations":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string"},"lat":{"type":"number"},"lng":{"type":"number"},"visits":{"type":"number"}},"required":["name","lat","lng","visits"]}},"recentLocations":{"type":"array","nullable":true,"items":{"type":"object","properties":{"name":{"type":"string"},"lat":{"type":"number"},"lng":{"type":"number"},"timestamp":{"type":"string"}},"required":["name","lat","lng","timestamp"]}},"homeLocation":{"type":"object","nullable":true,"properties":{"address":{"type":"string"},"lat":{"type":"number"},"lng":{"type":"number"}},"required":["address","lat","lng"]},"workLocation":{"type":"object","nullable":true,"properties":{"address":{"type":"string"},"lat":{"type":"number"},"lng":{"type":"number"}},"required":["address","lat","lng"]}},"required":["currentCity","currentState","currentCountry","currentLatitude","currentLongitude","frequentLocations","recentLocations","homeLocation","workLocation"]}},"required":["provider","data"]},{"type":"object","properties":{"provider":{"type":"string","enum":["CHATGPT"]},"data":{"type":"object","properties":{"openaiId":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"conversationTopics":{"type":"array","nullable":true,"items":{"type":"string"}},"customInstructions":{"type":"string","nullable":true},"pluginsUsed":{"type":"array","nullable":true,"items":{"type":"string"}}},"required":["openaiId","email","conversationTopics","customInstructions","pluginsUsed"]}},"required":["provider","data"]},{"nullable":true}]}},"required":["id","userId","provider","status","lastSyncedAt","createdAt","updatedAt","data"]},"DataConnectionSingleResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/DataConnectionWithData"}},"required":["success","data"]},"ConnectDataSourceResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Data source connected successfully"},"data":{"$ref":"#/components/schemas/DataConnection"}},"required":["success","message","data"]},"DisconnectDataSourceResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Data source disconnected successfully"}},"required":["success","message"]},"ChatMemory":{"type":"object","properties":{"id":{"type":"string","example":"cmj0memory123"},"userId":{"type":"string","example":"cmj0user123"},"value":{"type":"string","description":"The extracted memory content from chat conversation","example":"User prefers hiking in the mountains on weekends"},"category":{"type":"string","nullable":true,"description":"Category of the memory (preferences, dealbreakers, context)","example":"preferences"},"source":{"type":"string","description":"Where the memory was created from (api or langgraph)","example":"langgraph"},"evidenceId":{"type":"string","nullable":true,"description":"Reference to the chat message this memory was extracted from (optional for langgraph memories)","example":"cmj0message456"},"createdAt":{"type":"string","example":"2025-11-29T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2025-11-29T01:00:00.000Z"}},"required":["id","userId","value","category","source","evidenceId","createdAt","updatedAt"]},"ChatMemoryWithEvidence":{"allOf":[{"$ref":"#/components/schemas/ChatMemory"},{"type":"object","properties":{"evidence":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"cmj0message456"},"content":{"type":"string","example":"I love hiking in the mountains every weekend"},"createdAt":{"type":"string","example":"2025-11-29T00:00:00.000Z"}},"required":["id","content","createdAt"],"description":"The source chat message this memory was extracted from (null for langgraph memories)"}},"required":["evidence"]}]},"ChatMemoriesListResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"memories":{"type":"array","items":{"$ref":"#/components/schemas/ChatMemoryWithEvidence"}},"pagination":{"type":"object","properties":{"page":{"type":"number","example":1},"limit":{"type":"number","example":20},"total":{"type":"number","example":42},"hasMore":{"type":"boolean","example":true}},"required":["page","limit","total","hasMore"]}},"required":["memories","pagination"]}},"required":["success","data"]},"DeleteChatMemoryResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"deleted":{"type":"boolean","example":true}},"required":["deleted"]}},"required":["success","data"]},"DeleteAllChatMemoriesResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"deleted":{"type":"number","description":"Number of memories deleted","example":12}},"required":["deleted"]}},"required":["success","data"]},"MarkThreadViewedResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"viewed":{"type":"boolean","enum":[true]}},"required":["viewed"]}},"required":["success","data"]},"MarkThreadViewedBody":{"type":"object","properties":{"markMessagesRead":{"type":"boolean","default":false,"description":"Also mark messages in this thread as read","example":true}}},"PresignChatImageUploadsResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"uploadUrl":{"type":"string","format":"uri"},"expiresIn":{"type":"integer","minimum":0,"exclusiveMinimum":true}},"required":["key","uploadUrl","expiresIn"]}}},"required":["success","data"]},"PresignChatImageUploadsBody":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"contentType":{"type":"string","enum":["image/jpeg","image/png","image/webp"],"example":"image/jpeg"}},"required":["contentType"]},"minItems":1,"maxItems":4}},"required":["files"]},"SendThreadMessageResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"threadId":{"type":"string","example":"cmj0thread123"},"message":{"$ref":"#/components/schemas/ChatThreadMessage"},"assistantMessage":{"allOf":[{"$ref":"#/components/schemas/ChatThreadMessage"},{"description":"Present when Cupid responds in SOLO chat or to an @Cupid mention in a match room"}]}},"required":["threadId","message"]}},"required":["success","data"]},"SendThreadMessageBody":{"type":"object","properties":{"content":{"type":"string","maxLength":4000,"default":"","example":"Hey! Nice to meet you"},"attachments":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"storageKey":{"type":"string","minLength":1,"description":"Storage key returned by the chat image presign endpoint"},"width":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":20000},"height":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":20000}},"required":["type","storageKey"]},"maxItems":4,"description":"Images uploaded with storage keys from the presign endpoint"},"clientContext":{"type":"object","properties":{"activeSuggestion":{"type":"object","properties":{"userId":{"type":"string","description":"The suggested profile currently in view in the client","example":"cmj0user789"},"relationshipId":{"type":"string","nullable":true,"description":"The relationship ID for the active suggestion, when known","example":"cmj0relationship123"}}},"decision":{"type":"object","properties":{"type":{"type":"string","enum":["accept","reject"],"description":"Explicit decision made through a card control","example":"accept"},"userId":{"type":"string","description":"The suggested user the decision applies to","example":"cmj0user789"},"relationshipId":{"type":"string","nullable":true,"description":"The relationship the decision applies to, when known","example":"cmj0relationship123"}},"required":["type"]},"matchOfferDecision":{"type":"object","properties":{"type":{"type":"string","enum":["accept","decline"],"description":"Explicit response made through a proactive match-offer control","example":"accept"}},"required":["type"]}},"description":"Structured client context for solo chat routing. This is not displayed as message text."},"metadata":{"$ref":"#/components/schemas/AnalyticsMetadata"}}},"AdminWalletRecovery":{"allOf":[{"$ref":"#/components/schemas/WalletRecoveryRequest"},{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"]}]},"PaginationMeta":{"type":"object","properties":{"page":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"limit":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":20},"total":{"type":"integer","minimum":0,"example":150},"totalPages":{"type":"integer","minimum":0,"example":8},"hasNextPage":{"type":"boolean","example":true},"hasPrevPage":{"type":"boolean","example":false}},"required":["page","limit","total","totalPages","hasNextPage","hasPrevPage"]},"AdminWalletRecoveryListResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AdminWalletRecovery"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["success","data","meta"]},"AdminWalletRecoveryResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/WalletRecoveryRequest"}},"required":["success","data"]},"ApproveWalletRecoveryBody":{"type":"object","properties":{"confirm":{"type":"boolean","enum":[true],"description":"Confirms the operator completed the documented identity and lifecycle checks."},"reviewReference":{"type":"string","minLength":1,"maxLength":128,"description":"Opaque support or identity-review reference. Do not include personal data or credentials.","example":"support-case-1234"}},"required":["confirm","reviewReference"]},"RejectWalletRecoveryBody":{"type":"object","properties":{"confirm":{"type":"boolean","enum":[true]},"reason":{"type":"string","enum":["IDENTITY_NOT_VERIFIED","DUPLICATE_REQUEST","SECURITY_CONCERN","USER_CANCELLED"]}},"required":["confirm","reason"]},"AdminApiPartnerReview":{"type":"object","properties":{"confirm":{"type":"boolean","enum":[true]},"internalNote":{"type":"string","minLength":1,"maxLength":128,"description":"Optional internal ticket, support case, or onboarding reference. The audit event itself records the unique event ID, actor, and timestamp.","example":"DAT-397"}},"required":["confirm"]},"AdminApiPartnerLifecycleAction":{"type":"object","properties":{"confirm":{"type":"boolean","enum":[true]},"reason":{"type":"string","enum":["SECURITY_CONCERN","POLICY_VIOLATION","OPERATOR_REQUEST"]}},"required":["confirm","reason"]},"AdminApproveApiPartnerApplication":{"allOf":[{"$ref":"#/components/schemas/AdminApiPartnerReview"},{"type":"object","properties":{"allowedScopes":{"type":"array","items":{"type":"string","enum":["openid","offline_access","profile","wallet:status","wallet:address","preferences:monetization","preferences:matchmaking","traits:ads","profile:traits"]},"minItems":1,"maxItems":16},"allowedCapabilities":{"type":"array","items":{"type":"string","enum":["SIGN_IN","WALLET","MONETIZATION","MATCHMAKING","AD_PERSONALIZATION","EXTENDED_PROFILE"]},"minItems":1,"maxItems":8}},"required":["allowedScopes","allowedCapabilities"]}]},"AccountErasureSummary":{"type":"object","properties":{"id":{"type":"string"},"subjectDigest":{"type":"string","minLength":64,"maxLength":64},"status":{"type":"string","enum":["PENDING","PROCESSING","RETRYABLE_FAILURE","BLOCKED","COMPLETED"]},"attempts":{"type":"integer","minimum":0},"pendingStorageObjects":{"type":"integer","minimum":0},"pendingMarketplaceWallets":{"type":"integer","minimum":0},"pendingIdentitySubjects":{"type":"integer","minimum":0},"lastErrorCode":{"type":"string","nullable":true},"requestedAt":{"type":"string","format":"date-time"},"lastAttemptAt":{"type":"string","nullable":true,"format":"date-time"},"nextAttemptAt":{"type":"string","format":"date-time"},"marketplaceErasedAt":{"type":"string","nullable":true,"format":"date-time"},"identityProviderErasedAt":{"type":"string","nullable":true,"format":"date-time"},"langGraphErasedAt":{"type":"string","nullable":true,"format":"date-time"},"storageErasedAt":{"type":"string","nullable":true,"format":"date-time"},"primaryDataErasedAt":{"type":"string","nullable":true,"format":"date-time"},"completedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","subjectDigest","status","attempts","pendingStorageObjects","pendingMarketplaceWallets","pendingIdentitySubjects","lastErrorCode","requestedAt","lastAttemptAt","nextAttemptAt","marketplaceErasedAt","identityProviderErasedAt","langGraphErasedAt","storageErasedAt","primaryDataErasedAt","completedAt"]},"AdminUserListItem":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"Null when the row is redacted for a protected search match","example":"cm39abc123xyz"},"email":{"type":"string","nullable":true,"format":"email","example":"user@example.com"},"phone":{"type":"string","nullable":true,"example":"+18186181349"},"name":{"type":"string","nullable":true,"description":"Name from user profile","example":"John Doe"},"profilePictureUrl":{"type":"string","nullable":true,"example":"https://cdn.example.com/profile.jpg"},"profilePictureCount":{"type":"integer","nullable":true,"minimum":0,"example":2},"profileComplete":{"type":"boolean","nullable":true,"example":true},"missingSignupFields":{"type":"array","items":{"type":"string"},"example":["birthday","profile picture","location"]},"soloChatThreadId":{"type":"string","nullable":true,"description":"Cupid solo chat thread ID","example":"cm39thread123xyz"},"role":{"type":"string","nullable":true,"enum":["USER","MATCHMAKER","AMBASSADOR","TESTER","ADMIN","SUPERADMIN"],"example":"USER"},"requiresSuperadminToView":{"type":"boolean","example":false},"redacted":{"type":"boolean","description":"True when only the existence of a protected search match may be shown","example":false},"createdAt":{"type":"string","nullable":true,"example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","nullable":true,"example":"2024-01-01T00:00:00.000Z"}},"required":["id","email","phone","name","profilePictureUrl","profilePictureCount","profileComplete","missingSignupFields","soloChatThreadId","role","requiresSuperadminToView","redacted","createdAt","updatedAt"]},"AdminUserListResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserListItem"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["success","data","meta"]},"AdminUserApiUsageUser":{"type":"object","properties":{"id":{"type":"string","example":"cm39abc123xyz"},"email":{"type":"string","nullable":true,"format":"email","example":"user@example.com"},"phone":{"type":"string","nullable":true,"example":"+18186181349"},"name":{"type":"string","nullable":true,"example":"John Doe"}},"required":["id","email","phone","name"]},"AdminUserApiUsageEvent":{"type":"object","properties":{"id":{"type":"string","example":"cm39usage123xyz"},"userId":{"type":"string","example":"cm39abc123xyz"},"method":{"type":"string","example":"GET"},"path":{"type":"string","example":"/user-api/bios/latest"},"statusCode":{"type":"integer","example":200},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"user":{"$ref":"#/components/schemas/AdminUserApiUsageUser"}},"required":["id","userId","method","path","statusCode","createdAt","user"]},"AdminUserApiUsageSummary":{"type":"object","properties":{"totalEvents":{"type":"integer","minimum":0,"example":120},"activeTokenUsers":{"type":"integer","minimum":0,"example":7},"uniqueUsersWithEvents":{"type":"integer","minimum":0,"example":5},"requestsToday":{"type":"integer","minimum":0,"example":12},"requestsLast7Days":{"type":"integer","minimum":0,"example":43}},"required":["totalEvents","activeTokenUsers","uniqueUsersWithEvents","requestsToday","requestsLast7Days"]},"AdminUserApiUsageResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserApiUsageEvent"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"},"summary":{"$ref":"#/components/schemas/AdminUserApiUsageSummary"}},"required":["success","data","meta","summary"]},"AdminUserProfile":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"userId":{"type":"string"},"name":{"type":"string","nullable":true},"gender":{"type":"string","nullable":true,"enum":["MALE","FEMALE","NONBINARY"]},"birthday":{"type":"string","nullable":true},"heightInches":{"type":"number","nullable":true},"occupation":{"type":"string","nullable":true},"educationLevel":{"type":"string","nullable":true,"enum":["HIGH_SCHOOL","SOME_COLLEGE","ASSOCIATES","BACHELORS","MASTERS","DOCTORATE","TRADE_SCHOOL"]},"relationshipTerm":{"type":"array","items":{"type":"string","enum":["LONG_TERM","SHORT_TERM"]}},"interestedIn":{"type":"array","items":{"type":"string","enum":["MALE","FEMALE","NONBINARY"]}},"ageRangeMin":{"type":"number","nullable":true},"ageRangeMax":{"type":"number","nullable":true},"dealbreaker":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userId","name","gender","birthday","heightInches","occupation","educationLevel","relationshipTerm","interestedIn","ageRangeMin","ageRangeMax","dealbreaker","createdAt","updatedAt"]},"AdminProfilePicture":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"storageKey":{"type":"string"},"url":{"type":"string"},"position":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userId","storageKey","url","position","createdAt","updatedAt"]},"AdminLLMModel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","provider","createdAt","updatedAt"]},"AdminBio":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"userId":{"type":"string"},"llmModelId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"llmModel":{"$ref":"#/components/schemas/AdminLLMModel"}},"required":["id","content","userId","llmModelId","createdAt","updatedAt","llmModel"]},"AdminTrait":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string","nullable":true}},"required":["id","name","category"]},"AdminUserTrait":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"traitId":{"type":"string"},"value":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"trait":{"$ref":"#/components/schemas/AdminTrait"}},"required":["id","userId","traitId","value","createdAt","updatedAt","trait"]},"AdminDataConnection":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"provider":{"type":"string","enum":["YOUTUBE","PINTEREST","TWITTER","EVENTBRITE","TIKTOK","GOOGLE_CALENDAR","APPLE_MUSIC","CHATGPT","LOCATION","PHOTOS"]},"status":{"type":"string","enum":["CONNECTED","DISCONNECTED","ERROR","PENDING"]},"lastSyncedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userId","provider","status","lastSyncedAt","createdAt","updatedAt"]},"AdminCompatibility":{"type":"object","properties":{"id":{"type":"string"},"userOneId":{"type":"string"},"userTwoId":{"type":"string"},"score":{"type":"number"},"areProfilesAligned":{"type":"boolean"},"description":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userOneId","userTwoId","score","areProfilesAligned","description","createdAt","updatedAt"]},"AdminRelationship":{"type":"object","properties":{"id":{"type":"string"},"userOneId":{"type":"string"},"userTwoId":{"type":"string"},"userOneStatus":{"type":"string","enum":["NOT_INITIATED","DISCOVER_SUGGESTED","DAILY_SUGGESTED","SUGGESTED","ACCEPTED","REJECTED"]},"userTwoStatus":{"type":"string","enum":["NOT_INITIATED","DISCOVER_SUGGESTED","DAILY_SUGGESTED","SUGGESTED","ACCEPTED","REJECTED"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userOneId","userTwoId","userOneStatus","userTwoStatus","createdAt","updatedAt"]},"AdminChatThreadMessage":{"type":"object","properties":{"id":{"type":"string"},"threadId":{"type":"string"},"senderType":{"type":"string","enum":["USER","BOT"]},"userId":{"type":"string","nullable":true},"content":{"type":"string"},"metadata":{"nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","threadId","senderType","userId","content","createdAt","updatedAt"]},"AdminChatThread":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["SOLO","MULTI","SUPPORT"]},"primaryUserId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/AdminChatThreadMessage"}}},"required":["id","type","primaryUserId","createdAt","updatedAt","messages"]},"AdminSoloChatMetadata":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"userId":{"type":"string"},"status":{"type":"string","enum":["ONBOARDING","EXPLORING_MATCHES","FOCUSED_MATCH"]},"context":{"nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","userId","status","createdAt","updatedAt"]},"AdminUserDetail":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","nullable":true,"format":"email"},"phone":{"type":"string","nullable":true},"role":{"type":"string","enum":["USER","MATCHMAKER","AMBASSADOR","TESTER","ADMIN","SUPERADMIN"]},"requiresSuperadminToView":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"profile":{"$ref":"#/components/schemas/AdminUserProfile"},"profilePictures":{"type":"array","items":{"$ref":"#/components/schemas/AdminProfilePicture"}},"bios":{"type":"array","items":{"$ref":"#/components/schemas/AdminBio"}},"traits":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserTrait"}},"dataConnections":{"type":"array","items":{"$ref":"#/components/schemas/AdminDataConnection"}},"compatibilitiesInitiated":{"type":"array","items":{"$ref":"#/components/schemas/AdminCompatibility"}},"compatibilitiesReceived":{"type":"array","items":{"$ref":"#/components/schemas/AdminCompatibility"}},"relationshipsInitiated":{"type":"array","items":{"$ref":"#/components/schemas/AdminRelationship"}},"relationshipsReceived":{"type":"array","items":{"$ref":"#/components/schemas/AdminRelationship"}},"soloChatThread":{"$ref":"#/components/schemas/AdminChatThread"},"soloChatMetadata":{"$ref":"#/components/schemas/AdminSoloChatMetadata"}},"required":["id","email","phone","role","requiresSuperadminToView","createdAt","updatedAt","profile","profilePictures","bios","traits","dataConnections","compatibilitiesInitiated","compatibilitiesReceived","relationshipsInitiated","relationshipsReceived","soloChatThread","soloChatMetadata"]},"AdminUserDetailResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/AdminUserDetail"}},"required":["success","data"]},"AdminSupportChatUser":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"cm39abc123xyz"},"name":{"type":"string","nullable":true,"example":"John Doe"},"email":{"type":"string","nullable":true,"format":"email","example":"user@example.com"},"phone":{"type":"string","nullable":true,"example":"+18186181349"}},"required":["id","name","email","phone"]},"AdminSupportChatParticipant":{"type":"object","properties":{"userId":{"type":"string","nullable":true,"example":"cm39abc123xyz"},"user":{"$ref":"#/components/schemas/AdminSupportChatUser"}},"required":["userId","user"]},"AdminSupportChatLastMessage":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"cm39msg123xyz"},"content":{"type":"string","example":"Hello, I need help"},"senderType":{"type":"string","enum":["USER","BOT"],"example":"USER"},"user":{"$ref":"#/components/schemas/AdminSupportChatUser"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","content","senderType","user","createdAt"]},"AdminSupportChatListItem":{"type":"object","properties":{"id":{"type":"string","example":"cm39thread123xyz"},"type":{"type":"string","enum":["SOLO","MULTI","SUPPORT"],"example":"SUPPORT"},"primaryUserId":{"type":"string","nullable":true,"example":"cm39abc123xyz"},"supportUserId":{"type":"string","nullable":true,"example":"cm39abc123xyz"},"relationshipId":{"type":"string","nullable":true,"example":"cm39rel123xyz"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"user":{"$ref":"#/components/schemas/AdminSupportChatUser"},"participants":{"type":"array","items":{"$ref":"#/components/schemas/AdminSupportChatParticipant"}},"lastMessage":{"$ref":"#/components/schemas/AdminSupportChatLastMessage"}},"required":["id","type","primaryUserId","supportUserId","relationshipId","createdAt","updatedAt","user","participants","lastMessage"]},"AdminSupportChatSearchUser":{"allOf":[{"$ref":"#/components/schemas/AdminSupportChatUser"},{"type":"object","properties":{"chatCount":{"type":"integer","minimum":0,"description":"Number of matching visible conversations for this user","example":3}},"required":["chatCount"]}]},"AdminSupportChatListResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/AdminSupportChatListItem"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"},"matchingUsers":{"type":"array","items":{"$ref":"#/components/schemas/AdminSupportChatSearchUser"}}},"required":["success","data","meta","matchingUsers"]},"AdminSupportChatMessage":{"type":"object","properties":{"id":{"type":"string","example":"cm39msg123xyz"},"threadId":{"type":"string","example":"cm39thread123xyz"},"senderType":{"type":"string","enum":["USER","BOT"],"example":"USER"},"userId":{"type":"string","nullable":true,"example":"cm39abc123xyz"},"user":{"$ref":"#/components/schemas/AdminSupportChatUser"},"content":{"type":"string","example":"Hello, I need help"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ChatImageAttachment"}},"metadata":{"nullable":true,"example":{"type":"support_response"}},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","threadId","senderType","userId","user","content","createdAt","updatedAt"]},"AdminSupportChatDetail":{"type":"object","properties":{"id":{"type":"string","example":"cm39thread123xyz"},"type":{"type":"string","enum":["SOLO","MULTI","SUPPORT"],"example":"SUPPORT"},"primaryUserId":{"type":"string","nullable":true,"example":"cm39abc123xyz"},"supportUserId":{"type":"string","nullable":true,"example":"cm39abc123xyz"},"relationshipId":{"type":"string","nullable":true,"example":"cm39rel123xyz"},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"},"user":{"$ref":"#/components/schemas/AdminSupportChatUser"},"participants":{"type":"array","items":{"$ref":"#/components/schemas/AdminSupportChatParticipant"}},"messages":{"type":"array","items":{"$ref":"#/components/schemas/AdminSupportChatMessage"}}},"required":["id","type","primaryUserId","supportUserId","relationshipId","createdAt","updatedAt","user","participants","messages"]},"AdminSupportChatDetailResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/AdminSupportChatDetail"}},"required":["success","data"]},"AdminSendSupportMessageResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/AdminSupportChatMessage"}},"required":["success","data"]},"AdminSendSupportMessageBody":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":10000,"example":"Thank you for reaching out!"}},"required":["content"]},"GenerationAuditLog":{"type":"object","properties":{"id":{"type":"string","example":"cm39log123xyz"},"userId":{"type":"string","example":"cm39abc123xyz"},"generationType":{"type":"string","enum":["BIO","TRAITS","COMPATIBILITY","RELATIONSHIP"],"example":"BIO"},"reasoning":{"type":"string","nullable":true,"example":"Generated bio using 2 data sources: YouTube, Pinterest."},"resultSummary":{"type":"string","nullable":true,"example":"Bio generated: \"John Doe is a passionate traveler...\""},"result":{"nullable":true,"example":{"bioId":"cm39bio123","content":"Full bio text..."}},"metadata":{"nullable":true,"example":{"modelName":"gpt-4","dataSources":["YouTube","Pinterest"]}},"version":{"type":"integer","example":1},"createdAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","userId","generationType","result","version","createdAt"]},"GenerationAuditLogWithUser":{"allOf":[{"$ref":"#/components/schemas/GenerationAuditLog"},{"type":"object","properties":{"userName":{"type":"string","nullable":true,"example":"John Doe"},"userEmail":{"type":"string","nullable":true,"example":"john@example.com"}},"required":["userName","userEmail"]}],"required":["id","userId","generationType","result","version","createdAt"]},"RecentGenerationsResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/GenerationAuditLogWithUser"}},"totalCount":{"type":"integer","minimum":0,"example":150}},"required":["success","data","totalCount"]},"GenerationHistoryResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/GenerationAuditLog"},{"required":["id","userId","generationType","version","createdAt"]}]}},"totalCount":{"type":"integer","minimum":0,"example":150}},"required":["success","data","totalCount"]},"GenerationStats":{"type":"object","properties":{"bio":{"type":"object","properties":{"totalGenerations":{"type":"integer"},"latestVersion":{"type":"integer"},"lastGeneratedAt":{"type":"string","nullable":true}},"required":["totalGenerations","latestVersion","lastGeneratedAt"]},"traits":{"type":"object","properties":{"totalGenerations":{"type":"integer"},"latestVersion":{"type":"integer"},"lastGeneratedAt":{"type":"string","nullable":true}},"required":["totalGenerations","latestVersion","lastGeneratedAt"]},"compatibility":{"type":"object","properties":{"totalGenerations":{"type":"integer"},"latestVersion":{"type":"integer"},"lastGeneratedAt":{"type":"string","nullable":true}},"required":["totalGenerations","latestVersion","lastGeneratedAt"]},"relationship":{"type":"object","properties":{"totalGenerations":{"type":"integer"},"latestVersion":{"type":"integer"},"lastGeneratedAt":{"type":"string","nullable":true}},"required":["totalGenerations","latestVersion","lastGeneratedAt"]}},"required":["bio","traits","compatibility","relationship"]},"GenerationStatsResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/GenerationStats"}},"required":["success","data"]},"TraitEvidenceDetail":{"type":"object","properties":{"id":{"type":"string"},"traitId":{"type":"string"},"traitName":{"type":"string","nullable":true},"value":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"evidences":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/TraitEvidence"},{"properties":{"id":{"type":"string"},"sourceTable":{"type":"string"},"sourceType":{"type":"string","nullable":true},"sourceId":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","sourceTable","sourceType","sourceId","createdAt"]}]}}},"required":["id","traitId","traitName","value","createdAt","updatedAt","evidences"]},"TraitEvidenceResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/TraitEvidenceDetail"}},"required":["success","data"]},"DeleteUserResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Account erasure scheduled"},"data":{"type":"object","properties":{"requestId":{"type":"string","example":"cm123erasure"},"status":{"type":"string","enum":["PENDING","PROCESSING","RETRYABLE_FAILURE","BLOCKED","COMPLETED"],"description":"Initial durable erasure state","example":"PENDING"}},"required":["requestId","status"]}},"required":["success","message","data"]},"DeleteUserReason":{"type":"string","enum":["MET_SOMEONE","NOT_ENOUGH_MATCHES","TAKING_A_BREAK","NEGATIVE_EXPERIENCE","PRIVACY_CONCERNS","APP_DIFFICULT_TO_USE","OTHER"],"description":"Optional reason the user chose for deleting their account","example":"TAKING_A_BREAK"},"DeleteUserBody":{"type":"object","properties":{"reason":{"$ref":"#/components/schemas/DeleteUserReason"},"feedback":{"type":"string","maxLength":1000,"description":"Optional additional feedback about why the user is deleting their account","example":"I may come back later."}}},"ResetUserResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"User reset successfully"}},"required":["success","message"]},"UpdateUserSuperadminViewRequirementResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"string","example":"cm39abc123xyz"},"requiresSuperadminToView":{"type":"boolean","example":true},"updatedAt":{"type":"string","example":"2024-01-01T00:00:00.000Z"}},"required":["id","requiresSuperadminToView","updatedAt"]}},"required":["success","data"]},"UpdateUserSuperadminViewRequirementBody":{"type":"object","properties":{"requiresSuperadminToView":{"type":"boolean","example":true}},"required":["requiresSuperadminToView"]},"UpdateUserMatchmakerRoleResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"string","example":"cm39abc123xyz"},"role":{"type":"string","enum":["USER","MATCHMAKER","AMBASSADOR","TESTER","ADMIN","SUPERADMIN"],"example":"MATCHMAKER"},"previousRole":{"type":"string","enum":["USER","MATCHMAKER","AMBASSADOR","TESTER","ADMIN","SUPERADMIN"],"example":"USER"},"updatedAt":{"type":"string","example":"2026-07-09T12:00:00.000Z"}},"required":["id","role","previousRole","updatedAt"]}},"required":["success","data"]},"UpdateUserMatchmakerRoleBody":{"type":"object","properties":{"matchmaker":{"type":"boolean","description":"True to set the user as MATCHMAKER; false to unset back to USER.","example":true}},"required":["matchmaker"]},"AdminReport":{"type":"object","properties":{"id":{"type":"string","example":"cm39report123"},"reporterId":{"type":"string","example":"cm39user123"},"reportedId":{"type":"string","example":"cm39user456"},"reporterName":{"type":"string","nullable":true,"example":"Sarah"},"reportedName":{"type":"string","nullable":true,"example":"John"},"reason":{"type":"string","enum":["INAPPROPRIATE_CONTENT","HARASSMENT","FAKE_PROFILE","SPAM","UNDERAGE","OTHER"],"example":"HARASSMENT"},"description":{"type":"string","nullable":true,"example":"Sent inappropriate messages"},"resolvedAt":{"type":"string","nullable":true,"example":null},"createdAt":{"type":"string","example":"2025-01-15T10:30:00.000Z"}},"required":["id","reporterId","reportedId","reporterName","reportedName","reason","description","resolvedAt","createdAt"]},"AdminReportsResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/AdminReport"}},"meta":{"type":"object","properties":{"total":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"}},"required":["total","page","limit","totalPages"]}},"required":["success","data","meta"]},"AdminResolveReportResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Report resolved"}},"required":["success","message"]},"ApiPartnerOrganization":{"type":"object","properties":{"id":{"type":"string"},"businessName":{"type":"string"},"status":{"type":"string","enum":["PENDING_REVIEW","ACTIVE","SUSPENDED","REVOKED"]},"version":{"type":"integer","minimum":0,"exclusiveMinimum":true},"marketplaceSyncState":{"type":"string","enum":["NOT_REQUIRED","PENDING","SYNCED","FAILED"]},"lastMarketplaceSyncedVersion":{"type":"integer","minimum":0},"operatorRole":{"type":"string","enum":["OWNER","ADMIN"]},"contactName":{"type":"string"},"approvedAt":{"type":"string","nullable":true,"format":"date-time"},"suspendedAt":{"type":"string","nullable":true,"format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","businessName","status","version","marketplaceSyncState","lastMarketplaceSyncedVersion","operatorRole","contactName","approvedAt","suspendedAt","revokedAt","createdAt","updatedAt"]},"CreateApiPartnerOrganization":{"type":"object","properties":{"businessName":{"type":"string","minLength":2,"maxLength":160},"contactName":{"type":"string","minLength":2,"maxLength":120}},"required":["businessName","contactName"]},"ApiPartnerApplication":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"clientId":{"type":"string"},"clientType":{"type":"string","enum":["PUBLIC","CONFIDENTIAL"]},"privacyPolicyUrl":{"type":"string","nullable":true,"maxLength":2048},"status":{"type":"string","enum":["PENDING_REVIEW","APPROVED","SUSPENDED","REVOKED"]},"origins":{"type":"array","items":{"type":"string","maxLength":2048}},"redirectUris":{"type":"array","items":{"type":"string","maxLength":2048}},"requestedScopes":{"type":"array","items":{"type":"string","enum":["openid","offline_access","profile","wallet:status","wallet:address","preferences:monetization","preferences:matchmaking","traits:ads","profile:traits"]}},"allowedScopes":{"type":"array","items":{"type":"string","enum":["openid","offline_access","profile","wallet:status","wallet:address","preferences:monetization","preferences:matchmaking","traits:ads","profile:traits"]}},"requestedCapabilities":{"type":"array","items":{"type":"string","enum":["SIGN_IN","WALLET","MONETIZATION","MATCHMAKING","AD_PERSONALIZATION","EXTENDED_PROFILE"]}},"allowedCapabilities":{"type":"array","items":{"type":"string","enum":["SIGN_IN","WALLET","MONETIZATION","MATCHMAKING","AD_PERSONALIZATION","EXTENDED_PROFILE"]}},"version":{"type":"integer","minimum":0,"exclusiveMinimum":true},"syncState":{"type":"string","enum":["UNPROVISIONED","PENDING","SYNCED","FAILED"]},"lastProvisionedVersion":{"type":"integer","minimum":0},"providerClientId":{"type":"string","nullable":true},"approvedAt":{"type":"string","nullable":true,"format":"date-time"},"suspendedAt":{"type":"string","nullable":true,"format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"activeSecret":{"type":"object","nullable":true,"properties":{"version":{"type":"integer","minimum":0,"exclusiveMinimum":true},"displayPrefix":{"type":"string"},"lastFour":{"type":"string","minLength":4,"maxLength":4},"createdAt":{"type":"string","format":"date-time"}},"required":["version","displayPrefix","lastFour","createdAt"]},"latestProvisioning":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"action":{"type":"string","enum":["UPSERT","SUSPEND","REVOKE","ROTATE_SECRET"]},"status":{"type":"string","enum":["PENDING","PROCESSING","SUCCEEDED","FAILED"]},"targetVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true},"attempts":{"type":"integer","minimum":0},"nextAttemptAt":{"type":"string","format":"date-time"},"lastAttemptAt":{"type":"string","nullable":true,"format":"date-time"},"completedAt":{"type":"string","nullable":true,"format":"date-time"},"lastError":{"type":"string","nullable":true}},"required":["id","action","status","targetVersion","attempts","nextAttemptAt","lastAttemptAt","completedAt","lastError"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","organizationId","name","clientId","clientType","privacyPolicyUrl","status","origins","redirectUris","requestedScopes","allowedScopes","requestedCapabilities","allowedCapabilities","version","syncState","lastProvisionedVersion","providerClientId","approvedAt","suspendedAt","revokedAt","activeSecret","latestProvisioning","createdAt","updatedAt"]},"UpdateApiPartnerOrganization":{"type":"object","properties":{"businessName":{"type":"string","minLength":2,"maxLength":160}},"required":["businessName"]},"CreateApiPartnerApplication":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"clientType":{"type":"string","enum":["PUBLIC","CONFIDENTIAL"]},"privacyPolicyUrl":{"type":"string","maxLength":2048},"origins":{"type":"array","items":{"type":"string","maxLength":2048},"minItems":1,"maxItems":20},"redirectUris":{"type":"array","items":{"type":"string","maxLength":2048},"minItems":1,"maxItems":20},"requestedScopes":{"type":"array","items":{"type":"string","enum":["openid","offline_access","profile","wallet:status","wallet:address","preferences:monetization","preferences:matchmaking","traits:ads","profile:traits"]},"minItems":1,"maxItems":16},"requestedCapabilities":{"type":"array","items":{"type":"string","enum":["SIGN_IN","WALLET","MONETIZATION","MATCHMAKING","AD_PERSONALIZATION","EXTENDED_PROFILE"]},"minItems":1,"maxItems":8}},"required":["name","clientType","privacyPolicyUrl","origins","redirectUris","requestedScopes","requestedCapabilities"]},"UpdateApiPartnerApplication":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"privacyPolicyUrl":{"type":"string","maxLength":2048},"origins":{"type":"array","items":{"type":"string","maxLength":2048},"minItems":1,"maxItems":20},"redirectUris":{"type":"array","items":{"type":"string","maxLength":2048},"minItems":1,"maxItems":20},"requestedScopes":{"type":"array","items":{"type":"string","enum":["openid","offline_access","profile","wallet:status","wallet:address","preferences:monetization","preferences:matchmaking","traits:ads","profile:traits"]},"minItems":1,"maxItems":16},"requestedCapabilities":{"type":"array","items":{"type":"string","enum":["SIGN_IN","WALLET","MONETIZATION","MATCHMAKING","AD_PERSONALIZATION","EXTENDED_PROFILE"]},"minItems":1,"maxItems":8}}},"ConfirmApiPartnerAction":{"type":"object","properties":{"confirm":{"type":"boolean","enum":[true]},"reason":{"type":"string","enum":["USER_REQUEST","SECURITY_CONCERN","NO_LONGER_NEEDED"]}},"required":["confirm","reason"]},"PartnerOAuthLoginResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"application":{"type":"object","properties":{"name":{"type":"string"},"organizationName":{"type":"string"},"privacyPolicyUrl":{"type":"string","maxLength":2048}},"required":["name","organizationName","privacyPolicyUrl"]},"requestedScopes":{"type":"array","items":{"type":"string","enum":["openid","offline_access","profile","wallet:status","wallet:address","preferences:monetization","preferences:matchmaking","traits:ads","profile:traits"]}},"authenticated":{"type":"boolean"},"accountMismatch":{"type":"boolean"},"signInUrl":{"type":"string","format":"uri"}},"required":["application","requestedScopes","authenticated","accountMismatch","signInUrl"]}},"required":["success","data"]},"PartnerOAuthInteractionErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"message":{"type":"string"},"code":{"type":"string","enum":["ACCOUNT_MISMATCH","CONSENT_DOCUMENT_MISMATCH","CONSENT_STATE_CONFLICT","INTERACTIONS_DISABLED","INVALID_CHALLENGE","INVALID_REDIRECT","INVALID_REQUEST","PARTNER_UNAVAILABLE","PROVIDER_UNAVAILABLE","RATE_LIMITED","UNAUTHENTICATED","USER_NOT_ELIGIBLE","WALLET_REQUIRED"]},"signInUrl":{"type":"string","format":"uri"}},"required":["success","message","code"]},"PartnerOAuthRedirectResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"redirectTo":{"type":"string","format":"uri"}},"required":["redirectTo"]}},"required":["success","data"]},"PartnerOAuthLoginChallengeBody":{"type":"object","properties":{"loginChallenge":{"type":"string","minLength":1,"maxLength":2048}},"required":["loginChallenge"]},"PartnerOAuthConsentResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"application":{"type":"object","properties":{"name":{"type":"string"},"organizationName":{"type":"string"},"privacyPolicyUrl":{"type":"string","maxLength":2048}},"required":["name","organizationName","privacyPolicyUrl"]},"requestedScopes":{"type":"array","items":{"type":"string","enum":["openid","offline_access","profile","wallet:status","wallet:address","preferences:monetization","preferences:matchmaking","traits:ads","profile:traits"]}},"defaultApprovedScopes":{"type":"array","items":{"type":"string","enum":["openid","offline_access","profile","wallet:status","wallet:address","preferences:monetization","preferences:matchmaking","traits:ads","profile:traits"]}},"monetizationAvailable":{"type":"boolean"},"matchmakingAvailable":{"type":"boolean"},"walletAvailable":{"type":"boolean"},"consentTextVersion":{"type":"string"},"skipRequestedByProvider":{"type":"boolean"}},"required":["application","requestedScopes","defaultApprovedScopes","monetizationAvailable","matchmakingAvailable","walletAvailable","consentTextVersion","skipRequestedByProvider"]}},"required":["success","data"]},"PartnerOAuthConsentPreviewResponse":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"text":{"type":"string"},"version":{"type":"string"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["text","version","sha256"]}},"required":["success","data"]},"PartnerOAuthConsentPreviewBody":{"type":"object","properties":{"approvedScopes":{"type":"array","items":{"type":"string","enum":["openid","offline_access","profile","wallet:status","wallet:address","preferences:monetization","preferences:matchmaking","traits:ads","profile:traits"]},"minItems":1,"maxItems":16},"monetizationEnabled":{"type":"boolean"},"matchmakingEnabled":{"type":"boolean"},"consentChallenge":{"type":"string","minLength":1,"maxLength":2048}},"required":["approvedScopes","monetizationEnabled","matchmakingEnabled","consentChallenge"]},"PartnerOAuthConsentAcceptBody":{"type":"object","properties":{"approvedScopes":{"type":"array","items":{"type":"string","enum":["openid","offline_access","profile","wallet:status","wallet:address","preferences:monetization","preferences:matchmaking","traits:ads","profile:traits"]},"minItems":1,"maxItems":16},"monetizationEnabled":{"type":"boolean"},"matchmakingEnabled":{"type":"boolean"},"consentChallenge":{"type":"string","minLength":1,"maxLength":2048},"consentTextSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["approvedScopes","monetizationEnabled","matchmakingEnabled","consentChallenge","consentTextSha256"]},"PartnerOAuthConsentChallengeBody":{"type":"object","properties":{"consentChallenge":{"type":"string","minLength":1,"maxLength":2048}},"required":["consentChallenge"]},"PartnerOperatorAccessResponse":{"type":"object","properties":{"sub":{"type":"string","pattern":"^dps_[A-Za-z0-9_-]{43}$","description":"Stable pairwise subject for this user and partner application only."},"operator":{"type":"object","properties":{"role":{"type":"string","enum":["OWNER","ADMIN"]}},"required":["role"],"additionalProperties":false}},"required":["sub","operator"],"additionalProperties":false},"PartnerOperatorAccessErrorResponse":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_token","insufficient_scope","operator_access_required","rate_limit_exceeded","temporarily_unavailable"]},"error_description":{"type":"string"}},"required":["error","error_description"]},"PartnerWalletDisclosure":{"type":"object","properties":{"network":{"type":"string","enum":["testnet"],"description":"Authoritative Dataing wallet network. Present only with wallet:status."},"status":{"type":"string","enum":["NONE","PENDING","ACTIVE","ROTATING","REVOKED","RECOVERY_REQUIRED"],"description":"Authoritative wallet lifecycle status."},"address":{"type":"string","nullable":true,"description":"Consent-bound ownership-verified public address, or null when no wallet was bound. Present only with wallet:address."}},"additionalProperties":false},"PartnerPreferenceDisclosure":{"type":"object","properties":{"monetizationEnabled":{"type":"boolean","description":"Current app-specific preference. Present only with preferences:monetization."},"matchmakingEnabled":{"type":"boolean","description":"Current app-specific preference. Present only with preferences:matchmaking."}},"additionalProperties":false},"PartnerAdsTraitItem":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_/-]*:[a-z0-9_/-]+$"},"confidenceBand":{"type":"string","enum":["medium","high"]},"freshness":{"type":"string","enum":["current","stale"]},"provenanceClass":{"type":"string","enum":["profile_derived","connected_source"]},"assurance":{"type":"string","enum":["derived"]}},"required":["id","confidenceBand","freshness","provenanceClass","assurance"],"additionalProperties":false},"PartnerProfileTraitEnvelope":{"type":"object","properties":{"version":{"type":"string","enum":["dataing-profile-traits.v1"]},"purpose":{"type":"string","enum":["app_personalization"]},"vocabularyVersion":{"type":"string","minLength":4,"maxLength":64},"issuedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PartnerAdsTraitItem"},"maxItems":16}},"required":["version","purpose","vocabularyVersion","issuedAt","expiresAt","items"],"additionalProperties":false},"PartnerExtendedProfile":{"type":"object","properties":{"traits":{"$ref":"#/components/schemas/PartnerProfileTraitEnvelope"}},"required":["traits"],"additionalProperties":false,"description":"Reviewed interests and traits, only with profile:traits. App personalization only; advertising requires independent traits:ads consent. No raw evidence or sensitive traits."},"PartnerAdsTraitEnvelope":{"type":"object","properties":{"version":{"type":"string","enum":["dataing-ads-traits.v1"]},"purpose":{"type":"string","enum":["ads_personalization"]},"vocabularyVersion":{"type":"string","minLength":4,"maxLength":64},"issuedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PartnerAdsTraitItem"},"maxItems":16}},"required":["version","purpose","vocabularyVersion","issuedAt","expiresAt","items"],"additionalProperties":false,"description":"Short-lived, purpose-bound advertising traits. Raw profile text, evidence, and source identifiers are never included."},"PartnerUserinfoResponse":{"type":"object","properties":{"sub":{"type":"string","pattern":"^dps_[A-Za-z0-9_-]{43}$","description":"Stable pairwise subject for this user and partner application only."},"wallet":{"$ref":"#/components/schemas/PartnerWalletDisclosure"},"preferences":{"$ref":"#/components/schemas/PartnerPreferenceDisclosure"},"extendedProfile":{"$ref":"#/components/schemas/PartnerExtendedProfile"},"traits":{"$ref":"#/components/schemas/PartnerAdsTraitEnvelope"}},"required":["sub"],"additionalProperties":false},"PartnerUserinfoErrorResponse":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_token","insufficient_scope","rate_limit_exceeded","temporarily_unavailable"]},"error_description":{"type":"string"}},"required":["error","error_description"]}},"parameters":{}},"paths":{"/internal/schedule/calendar-protection":{"post":{"summary":"Read authoritative Calendar booking protection","description":"Internal service-token endpoint that queries the owner's primary Google Calendar live for a bounded window, returns merged busy intervals, and can include the primary account email for the owner's private scheduling UI.","tags":["Internal"],"parameters":[{"schema":{"type":"string","description":"Internal Cupid's Calendar service token as a Bearer token","example":"Bearer calendar-service-token"},"required":true,"name":"authorization","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCalendarProtectionRequest"}}}},"responses":{"200":{"description":"Calendar protection retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCalendarProtectionResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid or missing service token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authoritative calendar protection is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/internal/schedule/calendar-bookings":{"post":{"summary":"Create a protected Calendar booking","description":"Serializes bookings per owner, rechecks the primary Google Calendar live, rejects conflicts, and creates an idempotent event.","tags":["Internal"],"parameters":[{"schema":{"type":"string","description":"Internal Cupid's Calendar service token as a Bearer token","example":"Bearer calendar-service-token"},"required":true,"name":"authorization","in":"header"},{"schema":{"type":"string","minLength":8,"maxLength":200,"pattern":"^[A-Za-z0-9._:-]+$","description":"Stable unique key for one logical booking request","example":"cupid-booking-018f2f70"},"required":true,"name":"idempotency-key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCalendarBookingRequest"}}}},"responses":{"200":{"description":"Previously completed booking replayed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCalendarBookingResponse"}}}},"201":{"description":"Calendar booking created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCalendarBookingResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid or missing service token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Booking conflict, idempotency conflict, or Calendar is not connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCalendarBookingErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authoritative Calendar booking is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCalendarBookingErrorResponse"}}}}}}},"/internal/schedule/calendar-bookings/{eventId}":{"put":{"summary":"Update a protected Calendar booking","description":"Serializes writes per owner, excludes the current event from a live conflict recheck, and idempotently replaces the protected primary-calendar event.","tags":["Internal"],"parameters":[{"schema":{"type":"string","minLength":5,"maxLength":1024,"pattern":"^[A-Za-z0-9_-]+$","description":"Google Calendar event ID returned by the protected create operation","example":"a1b2c3d4e5f6"},"required":true,"name":"eventId","in":"path"},{"schema":{"type":"string","description":"Internal Cupid's Calendar service token as a Bearer token","example":"Bearer calendar-service-token"},"required":true,"name":"authorization","in":"header"},{"schema":{"type":"string","minLength":8,"maxLength":200,"pattern":"^[A-Za-z0-9._:-]+$","description":"Stable unique key for one logical booking request","example":"cupid-booking-018f2f70"},"required":true,"name":"idempotency-key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCalendarBookingRequest"}}}},"responses":{"200":{"description":"Calendar booking updated or a completed update replayed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCalendarBookingResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid or missing service token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Booking conflict, missing event, idempotency conflict, or Calendar disconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCalendarBookingErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authoritative Calendar update is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCalendarBookingErrorResponse"}}}}}},"delete":{"summary":"Delete a protected Calendar booking","description":"Serializes writes per owner and idempotently deletes the protected primary-calendar event.","tags":["Internal"],"parameters":[{"schema":{"type":"string","minLength":5,"maxLength":1024,"pattern":"^[A-Za-z0-9_-]+$","description":"Google Calendar event ID returned by the protected create operation","example":"a1b2c3d4e5f6"},"required":true,"name":"eventId","in":"path"},{"schema":{"type":"string","description":"Internal Cupid's Calendar service token as a Bearer token","example":"Bearer calendar-service-token"},"required":true,"name":"authorization","in":"header"},{"schema":{"type":"string","minLength":8,"maxLength":200,"pattern":"^[A-Za-z0-9._:-]+$","description":"Stable unique key for one logical booking request","example":"cupid-booking-018f2f70"},"required":true,"name":"idempotency-key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCalendarBookingDeleteRequest"}}}},"responses":{"200":{"description":"Calendar booking deleted, already absent, or a completed deletion replayed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCalendarBookingResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid or missing service token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Booking in progress, idempotency conflict, or Calendar disconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCalendarBookingErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Authoritative Calendar deletion is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleCalendarBookingErrorResponse"}}}}}}},"/user/me":{"get":{"summary":"Get current user","description":"Retrieves the currently authenticated user's profile information","tags":["Users"],"responses":{"200":{"description":"Current user information","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"allOf":[{"$ref":"#/components/schemas/User"},{"type":"object","properties":{"bios":{"type":"array","items":{"$ref":"#/components/schemas/CurrentUserBio"},"description":"Generated bios for the user","example":[]},"profile":{"$ref":"#/components/schemas/UserProfile"},"profileComplete":{"type":"boolean","description":"Whether the user has completed their profile setup","example":false}},"required":["profileComplete"]}]}},"required":["success","data"]},"example":{"success":true,"data":{"id":"123","email":"user@example.com","name":"John Doe","createdAt":"2024-01-01T00:00:00.000Z","updatedAt":"2024-01-01T00:00:00.000Z","profilePictures":[]}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to retrieve user"}}}}}}},"/user/profile":{"put":{"summary":"Update user profile","description":"Creates or updates the authenticated user's profile information","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfile"}}}},"responses":{"200":{"description":"Profile updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/auth/config":{"get":{"summary":"Get the active first-party authentication authority","description":"Returns only public client configuration. Ory administrative URLs, credentials, cookie names, and identity claims are never exposed.","tags":["Users"],"responses":{"200":{"description":"Active first-party authentication authority and supported login transports","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthConfigResponse"}}}}}}},"/user/auth/ory/link":{"post":{"summary":"Link a freshly reauthenticated Ory Google identity","description":"Migration-only endpoint. Requires a freshly issued legacy Dataing access token and a separate fresh Google authentication in the Ory session. Email is never used as the durable link.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"boolean"}},"required":["confirm"]}}}},"responses":{"200":{"description":"Immutable Ory subject linked to the current Dataing account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkOryIdentityResponse"}}}},"401":{"description":"One or both fresh authentication proofs are missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkOryIdentityError"}}}},"404":{"description":"Migration linking is disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkOryIdentityError"}}}},"409":{"description":"Explicit account confirmation is required, or the immutable identity is linked elsewhere","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkOryIdentityError"}}}},"500":{"description":"Unexpected linking failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkOryIdentityError"}}}},"503":{"description":"Identity provider unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkOryIdentityError"}}}}}}},"/user/signup":{"post":{"summary":"Send a legacy signup verification code","description":"Legacy-authority endpoint. Accepts a phone number, generates a 6-digit code, and caches it for verification. It is disabled when Ory is authoritative.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","minLength":8,"maxLength":20}},"required":["phone"]},"example":{"phone":"+18186181349"}}}},"responses":{"200":{"description":"Signup code sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessMessageResponse"},"example":{"success":true,"message":"Signup code sent successfully"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid phone number"}}}},"409":{"description":"Legacy credential issuance is disabled for the configured identity authority","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to send signup code"}}}},"503":{"description":"Request protection temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/verify":{"post":{"summary":"Verify a phone number with the legacy authority","description":"Legacy-authority endpoint. Validates the verification code, finds or creates a user, and returns JWT access and refresh tokens. It is disabled when Ory is authoritative.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string","minLength":8,"maxLength":20},"code":{"type":"string","minLength":6,"maxLength":6},"accountPurpose":{"type":"string","enum":["dating","apps"]},"acceptedPrivacyPolicy":{"type":"boolean"},"acceptedAiDataPolicy":{"type":"boolean"}},"required":["phone","code"]},"example":{"phone":"+18186181349","code":"123456"}}}},"responses":{"200":{"description":"Verification successful - returns user and JWT tokens","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSuccessResponse"},"example":{"success":true,"message":"Verification successful","data":{"user":{"id":"123","email":null,"phone":"+18186181349","name":null,"role":"USER","createdAt":"2024-01-01T00:00:00.000Z","updatedAt":"2024-01-01T00:00:00.000Z"},"tokens":{"accessToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","refreshToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","expiresIn":900}}}}}},"400":{"description":"Invalid or expired code","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid code"}}}},"401":{"description":"Authentication rejected because the account is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Legacy credential issuance is disabled for the configured identity authority","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Verification failed"}}}},"503":{"description":"Request protection temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/signout":{"post":{"summary":"Sign out user","description":"Revokes the configured managed session when enabled and invalidates user cache. Legacy JWT clients should also discard stored tokens.","tags":["Users"],"responses":{"200":{"description":"Signed out successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessMessageResponse"},"example":{"success":true,"message":"Signed out successfully"}}}},"400":{"description":"Ambiguous or malformed authentication credential transport","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid authentication credential transport"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Signout failed"}}}}}}},"/user/sessions/other":{"delete":{"summary":"Sign out other devices","description":"Revokes every managed identity session owned by the authenticated user except the session making this request. Requires the active Ory browser cookie or native session token.","tags":["Users"],"responses":{"200":{"description":"Other sessions revoked successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeOtherSessionsResponse"},"example":{"success":true,"message":"Other sessions signed out successfully","data":{"revokedCount":2}}}}},"400":{"description":"Ambiguous, absent, or malformed managed-session credential transport","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Managed sessions are not the active authentication authority","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Managed identity provider is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/google":{"post":{"summary":"Sign in with Google through the legacy authority","description":"Legacy-authority endpoint. Verifies a Google ID token, finds or creates a user, and returns JWT access and refresh tokens. It is disabled when Ory is authoritative.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"idToken":{"type":"string","minLength":1},"accountPurpose":{"type":"string","enum":["dating","apps"]},"acceptedPrivacyPolicy":{"type":"boolean"},"acceptedAiDataPolicy":{"type":"boolean"}},"required":["idToken"]},"example":{"idToken":"eyJhbGciOiJSUzI1NiIsImtpZCI6Ij..."}}}},"responses":{"200":{"description":"Google sign-in successful - returns user and JWT tokens","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSuccessResponse"},"example":{"success":true,"message":"Google sign-in successful","data":{"user":{"id":"123","email":"user@example.com","phone":null,"name":"John Doe","role":"USER","createdAt":"2024-01-01T00:00:00.000Z","updatedAt":"2024-01-01T00:00:00.000Z"},"tokens":{"accessToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","refreshToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","expiresIn":900}}}}}},"400":{"description":"Policy acceptance required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"You must accept the Privacy Policy, Terms of Service, and AI Data Sharing Policy to continue."}}}},"401":{"description":"Invalid Google token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid Google token"}}}},"409":{"description":"Legacy credential issuance is disabled for the configured identity authority","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to sign in with Google"}}}},"503":{"description":"Request protection temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/refresh":{"post":{"summary":"Refresh legacy JWT tokens","description":"Legacy-authority endpoint. Validates a refresh token and returns a new access/refresh token pair. It is disabled when Ory is authoritative.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"refreshToken":{"type":"string","minLength":1}},"required":["refreshToken"]},"example":{"refreshToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."}}}},"responses":{"200":{"description":"Tokens refreshed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshSuccessResponse"},"example":{"success":true,"message":"Tokens refreshed successfully","data":{"accessToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","refreshToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","expiresIn":900}}}}},"401":{"description":"Invalid or expired refresh token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid or expired refresh token"}}}},"409":{"description":"Legacy credential issuance is disabled for the configured identity authority","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Token refresh failed"}}}},"503":{"description":"Request protection temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/home/auth/config":{"get":{"summary":"Google availability for non-dating Home and partner entry","tags":["Home"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"googleEnabled":{"type":"boolean"},"googleClientId":{"type":"string","nullable":true}},"required":["googleEnabled","googleClientId"]}},"required":["success","data"]}}}}}}},"/user/home/google":{"post":{"summary":"Sign in with Google or create a private non-dating account","tags":["Home"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"idToken":{"type":"string","minLength":1,"maxLength":8192},"acceptedPrivacyPolicy":{"type":"boolean","enum":[true]},"acceptedAiDataPolicy":{"type":"boolean","enum":[true]}},"required":["idToken","acceptedPrivacyPolicy","acceptedAiDataPolicy"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"},"created":{"type":"boolean"},"tokens":{"$ref":"#/components/schemas/TokenPair"}},"required":["user","created","tokens"]}},"required":["success","data"]}}}},"400":{"description":"Request could not be completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request could not be completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request could not be completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Request could not be completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Request could not be completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/home/onboarding":{"get":{"summary":"Read private Home setup status","tags":["Home"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"completed":{"type":"boolean"},"startingPoint":{"type":"string","nullable":true,"enum":["wallet","apps","you"]},"name":{"type":"string","nullable":true}},"required":["completed","startingPoint","name"]}},"required":["success","data"]}}}},"400":{"description":"Request could not be completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request could not be completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request could not be completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Request could not be completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Request could not be completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"summary":"Save a name and Home starting point without dating enrollment","tags":["Home"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"startingPoint":{"type":"string","enum":["wallet","apps","you"]}},"required":["name","startingPoint"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"completed":{"type":"boolean"},"startingPoint":{"type":"string","nullable":true,"enum":["wallet","apps","you"]},"name":{"type":"string","nullable":true}},"required":["completed","startingPoint","name"]}},"required":["success","data"]}}}},"400":{"description":"Request could not be completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request could not be completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request could not be completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Request could not be completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Request could not be completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/apps/onboarding/config":{"get":{"tags":["App onboarding"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"protocolVersion":{"type":"number","enum":[1]},"available":{"type":"boolean"},"phoneSignup":{"type":"boolean"}},"required":["protocolVersion","available","phoneSignup"]}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"message":{"type":"string"}},"required":["success","message"]}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"message":{"type":"string"}},"required":["success","message"]}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"message":{"type":"string"}},"required":["success","message"]}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"message":{"type":"string"}},"required":["success","message"]}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"message":{"type":"string"}},"required":["success","message"]}}}}}}},"/user/apps/onboarding":{"get":{"tags":["App onboarding"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"protocolVersion":{"type":"number","enum":[1]},"accountId":{"type":"string"},"version":{"type":"integer"},"completed":{"type":"boolean"},"name":{"type":"string","nullable":true},"matchingRequested":{"type":"boolean","nullable":true},"monetizationRequested":{"type":"boolean","nullable":true},"matchingNextStep":{"type":"string","enum":["none","existing_adult_profile_setup"]},"monetizationNextStep":{"type":"string","enum":["none","separate_eligibility_and_consent"]}},"required":["protocolVersion","accountId","version","completed","name","matchingRequested","monetizationRequested","matchingNextStep","monetizationNextStep"]}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"message":{"type":"string"}},"required":["success","message"]}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"message":{"type":"string"}},"required":["success","message"]}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"message":{"type":"string"}},"required":["success","message"]}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"message":{"type":"string"}},"required":["success","message"]}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"message":{"type":"string"}},"required":["success","message"]}}}}}},"put":{"tags":["App onboarding"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedAccountId":{"type":"string","minLength":1,"maxLength":100},"name":{"type":"string","minLength":1,"maxLength":80},"matchingRequested":{"type":"boolean","nullable":true},"monetizationRequested":{"type":"boolean","nullable":true},"expectedVersion":{"type":"integer","minimum":0,"maximum":2147483646}},"required":["expectedAccountId","name","matchingRequested","monetizationRequested","expectedVersion"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"protocolVersion":{"type":"number","enum":[1]},"accountId":{"type":"string"},"version":{"type":"integer"},"completed":{"type":"boolean"},"name":{"type":"string","nullable":true},"matchingRequested":{"type":"boolean","nullable":true},"monetizationRequested":{"type":"boolean","nullable":true},"matchingNextStep":{"type":"string","enum":["none","existing_adult_profile_setup"]},"monetizationNextStep":{"type":"string","enum":["none","separate_eligibility_and_consent"]}},"required":["protocolVersion","accountId","version","completed","name","matchingRequested","monetizationRequested","matchingNextStep","monetizationNextStep"]}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"message":{"type":"string"}},"required":["success","message"]}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"message":{"type":"string"}},"required":["success","message"]}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"message":{"type":"string"}},"required":["success","message"]}}}},"429":{"description":"Request failed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"message":{"type":"string"}},"required":["success","message"]}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"message":{"type":"string"}},"required":["success","message"]}}}}}}},"/user/bios/events":{"get":{"summary":"Stream bio updates","description":"Establishes an SSE connection that streams realtime bio updates for the authenticated user.","tags":["Bios"],"responses":{"200":{"description":"SSE stream of bio-generated events","content":{"text/event-stream":{"schema":{"type":"string","description":"SSE payload containing bio.generated events","example":"id: cm39bio123xyz\nevent: bio.generated\ndata: {\"id\":\"cm39bio123xyz\",\"content\":\"Excited builder\",\"userId\":\"cm39user123\"}\n\n"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/bios/editor":{"get":{"tags":["Bios"],"summary":"Owner-only bio preview","responses":{"200":{"description":"Private draft and approved public bio","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"publicationVersion":{"type":"integer"},"publishedBio":{"$ref":"#/components/schemas/NullableBio"},"draftBio":{"$ref":"#/components/schemas/NullableBio"},"generatedDraft":{"$ref":"#/components/schemas/NullableBio"}},"required":["publicationVersion","publishedBio","draftBio","generatedDraft"]}},"required":["success","data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Preview changed; reload before approving","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/bios/{bioId}/approve":{"post":{"tags":["Bios"],"summary":"Explicitly approve an exact bio revision","parameters":[{"schema":{"type":"string","format":"cuid"},"required":true,"name":"bioId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedRevision":{"type":"integer","minimum":1},"expectedPublicationVersion":{"type":"integer","minimum":0}},"required":["expectedRevision","expectedPublicationVersion"]}}}},"responses":{"200":{"description":"Published approved bio","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BioSingleResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Preview changed; reload before approving","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/bios":{"get":{"summary":"Get all user bios","description":"Retrieves all bios for the authenticated user","tags":["Bios"],"responses":{"200":{"description":"List of user bios","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BiosListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a new bio","description":"Creates a new bio for the authenticated user","tags":["Bios"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":5000},"llmModelId":{"type":"string"}},"required":["content"]}}}},"responses":{"201":{"description":"Bio created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BioSingleResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/bios/latest":{"get":{"summary":"Get latest bio","description":"Retrieves the most recently updated bio for the authenticated user","tags":["Bios"],"responses":{"200":{"description":"Latest bio (null if user has none yet)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BioLatestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/bios/{bioId}":{"get":{"summary":"Get a specific bio","description":"Retrieves a specific bio by ID for the authenticated user","tags":["Bios"],"parameters":[{"schema":{"type":"string","format":"cuid"},"required":true,"name":"bioId","in":"path"}],"responses":{"200":{"description":"Bio details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BioSingleResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Bio not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"summary":"Update a bio","description":"Updates an existing bio for the authenticated user","tags":["Bios"],"parameters":[{"schema":{"type":"string","format":"cuid"},"required":true,"name":"bioId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedRevision":{"type":"integer","minimum":1},"content":{"type":"string","minLength":1,"maxLength":5000}},"required":["expectedRevision","content"]}}}},"responses":{"200":{"description":"Bio updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BioSingleResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Bio not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Draft changed; reload before saving","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"summary":"Delete a bio","description":"Deletes a bio for the authenticated user","tags":["Bios"],"parameters":[{"schema":{"type":"string","format":"cuid"},"required":true,"name":"bioId","in":"path"}],"responses":{"200":{"description":"Bio deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BioDeleteResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Bio not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/traits":{"get":{"summary":"List current user's traits","description":"Returns the traits that have been generated for the currently authenticated user, including trait metadata and evidence references.","tags":["Traits"],"responses":{"200":{"description":"Current user's traits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserTraitsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to retrieve traits"}}}}}}},"/user/profile-pictures/presign":{"post":{"summary":"Generate presigned upload URLs","description":"Creates presigned S3 upload URLs for upcoming profile picture uploads","tags":["Profile Pictures"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignProfilePictureUploadRequest"}}}},"responses":{"200":{"description":"Presigned URLs generated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PresignProfilePictureUploadTarget"}}},"required":["success","data"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unsupported content type: text/plain"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/profile-pictures":{"post":{"summary":"Create profile picture records","description":"Persists uploaded profile pictures and assigns positions","tags":["Profile Pictures"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProfilePicturesRequest"}}}},"responses":{"201":{"description":"Profile pictures created","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProfilePicture"}}},"required":["success","data"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"summary":"List profile pictures","description":"Returns all profile pictures for the authenticated user","tags":["Profile Pictures"],"responses":{"200":{"description":"Profile pictures retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProfilePicture"}}},"required":["success","data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"summary":"Delete profile pictures","description":"Removes profile pictures and reorders remaining items","tags":["Profile Pictures"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteProfilePicturesRequest"}}}},"responses":{"200":{"description":"Profile pictures deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteProfilePicturesResponse"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/profile-pictures/order":{"put":{"summary":"Reorder profile pictures","description":"Updates the display ordering for profile pictures","tags":["Profile Pictures"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderProfilePicturesRequest"}}}},"responses":{"200":{"description":"Profile pictures reordered","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProfilePicture"}}},"required":["success","data"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/public-profile/{slug}":{"get":{"summary":"Get a user's public profile by slug","description":"Retrieves a user's public profile using their name-prefixed public profile slug. No authentication required. Returns 404 if slug is invalid or public profile is disabled.","tags":["Users"],"parameters":[{"schema":{"type":"string","description":"Name-prefixed public profile slug","example":"eric-gvqKlS_Zuu"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"User's public profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProfileResponse"}}}},"404":{"description":"Public profile not found or disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Public profile not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to retrieve profile"}}}}}}},"/user/{userId}/profile":{"get":{"summary":"Get a user's public profile","description":"Retrieves another user's public profile including profile pictures, bio, and traits. Access granted if: user is ADMIN or MATCHMAKER, target has public profile enabled, or compatibility score >= 0.35.","tags":["Users"],"parameters":[{"schema":{"type":"string","description":"Target user ID","example":"cm39user123"},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"User's public profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProfileResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"User ID is required"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Access denied. Possible reasons: 'profile_hidden', 'compatibility_pending', 'no_relationship'.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedResponse"},"example":{"success":false,"message":"Access denied","reason":"profile_hidden"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"User not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to retrieve profile"}}}}}}},"/user/match-requests":{"get":{"summary":"Get incoming match requests","description":"Retrieves a list of incoming match requests for the current user. A match request is when another user has accepted/liked you. Returns public profiles of users who have sent match requests, including mutual matches where both users have accepted (indicated by isMutualMatch flag).","tags":["Users"],"responses":{"200":{"description":"List of incoming match requests with public profiles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchRequestsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to retrieve match requests"}}}}}}},"/user/match-requests/send":{"post":{"summary":"Send a match request","description":"Send a match request to another user from the discover page.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMatchRequestBody"}}}},"responses":{"200":{"description":"Match request sent successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMatchRequestResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden — blocked user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Cannot send request to this user"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to send match request"}}}}}}},"/user/match-requests/{relationshipId}/respond":{"post":{"summary":"Respond to a match request","description":"Accept or decline an incoming match request.","tags":["Users"],"parameters":[{"schema":{"type":"string","description":"The relationship ID"},"required":true,"name":"relationshipId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondMatchRequestBody"}}}},"responses":{"200":{"description":"Response recorded successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondMatchRequestResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden — user is not part of this relationship","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Not authorized"}}}},"404":{"description":"Relationship not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Request not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to respond to match request"}}}}}}},"/user/matchmakers":{"get":{"summary":"List matchmakers","description":"Lists users with the MATCHMAKER role and includes the current user's invitation state for each matchmaker.","tags":["Users"],"parameters":[{"schema":{"type":"string","default":"1","description":"Page number, 1-indexed","example":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","default":"20","description":"Number of items per page, max 100","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Search matchmakers by display name","example":"Alex"},"required":false,"name":"search","in":"query"}],"responses":{"200":{"description":"Paginated list of matchmakers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchmakerListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker access required."}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker not found."}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle matchmaker request"}}}}}}},"/user/matchmakers/clients":{"get":{"summary":"List accepted matchmaker clients","description":"Lists clients whose invitations the current MATCHMAKER user accepted.","tags":["Users"],"responses":{"200":{"description":"Accepted clients for the current matchmaker","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchmakerClientListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker access required."}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker not found."}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle matchmaker request"}}}}}}},"/user/matchmakers/users":{"get":{"summary":"List users for matchmaker dashboard","description":"Lists platform users for MATCHMAKER users with pagination and filters. When clientUserId is provided, recommendation status is included.","tags":["Users"],"parameters":[{"schema":{"type":"string","default":"1","description":"Page number, 1-indexed","example":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","default":"20","description":"Number of items per page, max 100","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Search users by display name or user ID","example":"Sam"},"required":false,"name":"search","in":"query"},{"schema":{"type":"string","enum":["MALE","FEMALE","NONBINARY"],"description":"Filter users by gender","example":"FEMALE"},"required":false,"name":"gender","in":"query"},{"schema":{"type":"string","enum":["LONG_TERM","SHORT_TERM"],"description":"Filter users by relationship goal","example":"LONG_TERM"},"required":false,"name":"relationshipTerm","in":"query"},{"schema":{"type":"string","description":"Minimum user age","example":"25"},"required":false,"name":"minAge","in":"query"},{"schema":{"type":"string","description":"Maximum user age","example":"40"},"required":false,"name":"maxAge","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Optional accepted client user ID. When provided, recommendation status is included.","example":"cm39client123"},"required":false,"name":"clientUserId","in":"query"}],"responses":{"200":{"description":"Paginated users for matchmaker dashboard","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchmakerPlatformUsersResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid matchmaker request"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker access required."}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker not found."}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle matchmaker request"}}}}}}},"/user/matchmakers/invitations":{"get":{"summary":"List pending matchmaker invitations","description":"Lists pending client invitations for the current MATCHMAKER user to accept or reject.","tags":["Users"],"responses":{"200":{"description":"Pending client invitations for the current matchmaker","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchmakerClientListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker access required."}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker not found."}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle matchmaker request"}}}}}}},"/user/matchmakers/invitations/{clientUserId}/response":{"put":{"summary":"Accept or reject a matchmaker invitation","description":"Allows a MATCHMAKER user to accept or reject a pending client invitation. Accepted invitations become clients.","tags":["Users"],"parameters":[{"schema":{"type":"string","minLength":1,"example":"cm39client123"},"required":true,"name":"clientUserId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondToMatchmakerInvitationBody"}}}},"responses":{"200":{"description":"Updated matchmaker invitation response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchmakerConnectionResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid matchmaker request"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker access required."}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker not found."}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle matchmaker request"}}}}}}},"/user/matchmakers/clients/{clientUserId}/recommendations":{"post":{"summary":"Recommend a user to a client","description":"Allows a MATCHMAKER user to recommend a platform user to an accepted client with a text explanation.","tags":["Users"],"parameters":[{"schema":{"type":"string","minLength":1,"example":"cm39client123"},"required":true,"name":"clientUserId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMatchmakerRecommendationBody"}}}},"responses":{"200":{"description":"Created or updated matchmaker recommendation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchmakerRecommendationResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid matchmaker request"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker access required."}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker not found."}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle matchmaker request"}}}}}}},"/user/matchmakers/clients/{clientUserId}/users/{targetUserId}/profile":{"get":{"summary":"Get a profile in an accepted client's context","description":"Allows a MATCHMAKER user to view a profile with compatibility, traits, insights, and match reason calculated from an accepted client's perspective.","tags":["Users"],"parameters":[{"schema":{"type":"string","minLength":1,"example":"cm39client123"},"required":true,"name":"clientUserId","in":"path"},{"schema":{"type":"string","minLength":1,"example":"cm39user123"},"required":true,"name":"targetUserId","in":"path"}],"responses":{"200":{"description":"Profile rendered in the accepted client's context","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProfileResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker access required."}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker not found."}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle matchmaker request"}}}}}}},"/user/matchmakers/clients/{clientUserId}/message-thread":{"post":{"summary":"Open direct messages with an accepted client","description":"Returns the direct message thread between the current MATCHMAKER user and an accepted client, creating it when needed.","tags":["Users"],"parameters":[{"schema":{"type":"string","minLength":1,"example":"cm39client123"},"required":true,"name":"clientUserId","in":"path"}],"responses":{"200":{"description":"Direct message thread for the accepted client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchmakerClientMessageThreadResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker access required."}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker not found."}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle matchmaker request"}}}}}}},"/user/matchmakers/clients/{clientUserId}/cupid-chat":{"get":{"summary":"Get accepted client Cupid chat","description":"Allows a MATCHMAKER user to view an accepted client's Cupid chat only when that client enabled chat access.","tags":["Users"],"parameters":[{"schema":{"type":"string","minLength":1,"example":"cm39client123"},"required":true,"name":"clientUserId","in":"path"}],"responses":{"200":{"description":"Client Cupid chat messages","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchmakerCupidChatResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker access required."}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker not found."}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle matchmaker request"}}}}}}},"/user/matchmakers/clients/{clientUserId}/notes":{"get":{"summary":"List matchmaker notes for a client","description":"Lists private notes the current MATCHMAKER user has added for an accepted client.","tags":["Users"],"parameters":[{"schema":{"type":"string","minLength":1,"example":"cm39client123"},"required":true,"name":"clientUserId","in":"path"}],"responses":{"200":{"description":"Matchmaker notes for this client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchmakerClientNotesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker access required."}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker not found."}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle matchmaker request"}}}}}},"post":{"summary":"Add matchmaker note for a client","description":"Adds a private matchmaker note for an accepted client. Notes can reference Cupid chat only when the client enabled chat access.","tags":["Users"],"parameters":[{"schema":{"type":"string","minLength":1,"example":"cm39client123"},"required":true,"name":"clientUserId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMatchmakerNoteBody"}}}},"responses":{"200":{"description":"Created matchmaker note","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchmakerClientNoteResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid matchmaker request"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker access required."}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker not found."}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle matchmaker request"}}}}}}},"/user/matchmakers/{matchmakerId}/invitation":{"put":{"summary":"Invite or revoke a matchmaker","description":"Allows the current user to invite a MATCHMAKER user to be their matchmaker, cancel a pending invitation, or revoke accepted access.","tags":["Users"],"parameters":[{"schema":{"type":"string","minLength":1,"example":"cm39matchmaker123"},"required":true,"name":"matchmakerId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMatchmakerInvitationBody"}}}},"responses":{"200":{"description":"Updated matchmaker invitation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchmakerConnectionResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid matchmaker request"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker access required."}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker not found."}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle matchmaker request"}}}}}}},"/user/matchmakers/{matchmakerId}/controls":{"patch":{"summary":"Update matchmaker controls","description":"Updates granular controls for an accepted matchmaker. Currently supports Cupid chat access.","tags":["Users"],"parameters":[{"schema":{"type":"string","minLength":1,"example":"cm39matchmaker123"},"required":true,"name":"matchmakerId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMatchmakerControlsBody"}}}},"responses":{"200":{"description":"Updated matchmaker controls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchmakerConnectionResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid matchmaker request"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker access required."}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Matchmaker not found."}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle matchmaker request"}}}}}}},"/user/direct-matches":{"get":{"summary":"Get direct matches","description":"Retrieves all direct matches for the current user, including both sent and received requests. Returns the status of each match (pending, accepted, declined) and public profiles of the other users.","tags":["Users"],"responses":{"200":{"description":"List of direct matches with public profiles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectMatchesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to retrieve direct matches"}}}}}},"post":{"summary":"Send a direct match request","description":"Send a direct match request to another user by their phone number or email address. If the target user has already sent a request to you, this will automatically accept it. Only one direct match can exist between any two users.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendDirectMatchRequest"}}}},"responses":{"200":{"description":"Direct match request sent or existing match returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendDirectMatchResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"No user found with that phone number or email address"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to send direct match request"}}}}}}},"/user/direct-matches/{id}/respond":{"post":{"summary":"Respond to a direct match request","description":"Accept or decline a direct match request. When both users accept, a Compatibility record is created/updated between them.","tags":["Users"],"parameters":[{"schema":{"type":"string","description":"The ID of the direct match"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondDirectMatchRequest"}}}},"responses":{"200":{"description":"Response recorded successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondDirectMatchResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Direct match not found"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to respond to direct match"}}}}}}},"/user/discover":{"get":{"summary":"Get discover matches","description":"Retrieves all relationships for the current user with compatibility scores, shared traits, and request statuses. Used by the Discover page. Supports pagination via take/skip parameters.","tags":["Users"],"parameters":[{"schema":{"type":"string","description":"Maximum number of matches to return (default: 50, max: 200)","example":"50"},"required":false,"name":"take","in":"query"},{"schema":{"type":"string","description":"Number of matches to skip for pagination (default: 0)","example":"0"},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string","description":"When true, includes a lightweight total count for matching discover records.","example":"true"},"required":false,"name":"includeTotal","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Exclude outgoing requests before pagination, including from totals (default: false).","example":"true"},"required":false,"name":"excludeSent","in":"query"}],"responses":{"200":{"description":"List of discover matches with profiles and compatibility data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoverResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to retrieve discover matches"}}}}}}},"/user/discover/pass":{"post":{"summary":"Pass on a discover profile","description":"Marks the current user as having passed on a discover profile. Passed profiles are filtered out of future discover queues.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PassDiscoverProfileBody"}}}},"responses":{"200":{"description":"Profile passed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PassDiscoverProfileResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Cannot pass on this profile"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to pass discover profile"}}}}}}},"/user/discover/recently-rejected":{"get":{"summary":"Get recently rejected discover profiles","description":"Returns profiles the current user passed on during the past seven days, newest first.","tags":["Users"],"parameters":[{"schema":{"type":"string","description":"Maximum number of recently rejected profiles to return (default: 50)","example":"50"},"required":false,"name":"take","in":"query"}],"responses":{"200":{"description":"Recently rejected profiles within the undo window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecentlyRejectedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/discover/recently-rejected/{relationshipId}/undo":{"post":{"summary":"Undo a recent discover pass","description":"Restores a profile passed on by the current user when the pass occurred within seven days.","tags":["Users"],"parameters":[{"schema":{"type":"string","minLength":1,"description":"The recently rejected relationship to restore","example":"cm39rel123"},"required":true,"name":"relationshipId","in":"path"}],"responses":{"200":{"description":"Pass undone successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UndoRecentlyRejectedResponse"}}}},"400":{"description":"The pass is no longer eligible for undo","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The profile cannot be restored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Recently rejected relationship not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/push-notifications/register":{"post":{"summary":"Register push notification token","description":"Registers a Firebase Cloud Messaging token for push notifications","tags":["Push Notifications"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":1},"deviceId":{"type":"string"},"platform":{"type":"string","enum":["IOS","ANDROID"],"default":"IOS"}},"required":["token"]},"example":{"token":"fcm_token_here","deviceId":"device_123","platform":"ios"}}}},"responses":{"201":{"description":"Token registered successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterTokenResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to register push notification token"}}}}}}},"/user/push-notifications/unregister":{"post":{"summary":"Unregister push notification token","description":"Unregisters a Firebase Cloud Messaging token","tags":["Push Notifications"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":1}},"required":["token"]},"example":{"token":"fcm_token_here"}}}},"responses":{"200":{"description":"Token unregistered successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnregisterTokenResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to unregister push notification token"}}}}}}},"/user/push-notifications/status":{"get":{"summary":"Get push notification status","description":"Retrieves the current push notification status for the authenticated user","tags":["Push Notifications"],"responses":{"200":{"description":"Push notification status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushNotificationStatusResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to get push notification status"}}}}}}},"/user/settings":{"get":{"summary":"Get user settings","description":"Retrieves the current user's settings including public profile preferences.","tags":["Users"],"responses":{"200":{"description":"User settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettingsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"404":{"description":"Settings not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Settings not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to retrieve settings"}}}}}},"patch":{"summary":"Update user settings","description":"Updates the current user's settings. When enabling public profile, a unique shareable code is generated.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserSettings"}}}},"responses":{"200":{"description":"Settings updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettingsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"publicProfileEnabled must be a boolean"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to update settings"}}}}}}},"/user/settings/private-profile-token":{"post":{"summary":"Create or rotate private profile API token","description":"Creates or rotates the current user's private profile API token. The raw token is returned only in this response.","tags":["Users"],"responses":{"200":{"description":"Private profile API token created or rotated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrivateProfileApiTokenResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to rotate private profile API token"}}}}}},"delete":{"summary":"Revoke private profile API token","description":"Revokes the current user's private profile API token.","tags":["Users"],"responses":{"200":{"description":"Private profile API token revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokePrivateProfileApiTokenResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to revoke private profile API token"}}}}}}},"/user/block":{"post":{"summary":"Block a user","description":"Block another user. Blocked users will not appear in your discover feed, and neither of you will be able to send messages or match requests to each other.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockUserRequest"}}}},"responses":{"200":{"description":"User blocked successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockUserResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"You cannot block yourself"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to block user"}}}}}}},"/user/unblock":{"post":{"summary":"Unblock a user","description":"Unblock a previously blocked user. They will appear in your discover feed again.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnblockUserRequest"}}}},"responses":{"200":{"description":"User unblocked successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnblockUserResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"blockedUserId is required"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to unblock user"}}}}}}},"/user/blocked-users":{"get":{"summary":"Get blocked users","description":"Get a list of all users you have blocked, with their public profiles.","tags":["Users"],"responses":{"200":{"description":"List of blocked users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockedUsersResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to retrieve blocked users"}}}}}}},"/user/report":{"post":{"summary":"Report a user","description":"Report a user for inappropriate behavior. By default, this also blocks the reported user.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportUserRequest"}}}},"responses":{"200":{"description":"User reported successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportUserResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"You cannot report yourself"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to report user"}}}}}}},"/user/profile-views":{"post":{"summary":"Record a profile view","description":"Record that the current user viewed another user's profile. Idempotent.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordProfileViewRequest"}}}},"responses":{"200":{"description":"Profile view recorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordProfileViewResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Cannot record a view of your own profile"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"404":{"description":"Viewed user not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"User not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to record profile view"}}}}}}},"/user/activity":{"get":{"summary":"Get user activity feed","description":"Returns a combined feed of generation audit logs (bio updates, trait discovery, compatibility) and user-facing activity events, sorted by most recent.","parameters":[{"schema":{"type":"number","minimum":1,"maximum":50,"default":10,"description":"Maximum number of activity items to return","example":10},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Activity feed retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityResponse"}}}},"401":{"description":"User not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/wallet":{"get":{"summary":"Get authoritative wallet status","description":"Returns the signed-in user's server-owned wallet lifecycle state separately from public wallet metadata.","tags":["Wallets"],"parameters":[{"schema":{"type":"string","enum":["testnet"],"default":"testnet","description":"The only wallet network enabled for the current preview.","example":"testnet"},"required":false,"name":"network","in":"query"}],"responses":{"200":{"description":"Authoritative wallet status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletStatusResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/wallet/connect/challenge":{"post":{"summary":"Create a wallet ownership challenge","description":"Creates a five-minute, address- and credential-bound challenge. A raw address never activates a wallet.","tags":["Wallets"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWalletChallengeRequest"}}}},"responses":{"201":{"description":"Wallet challenge created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletChallengeResponse"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many wallet challenge requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/wallet/connect/verify":{"post":{"summary":"Verify and activate a wallet","description":"Atomically consumes a single-use challenge, verifies the recoverable Stacks signature, and activates the verified wallet.","tags":["Wallets"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyWalletChallengeRequest"}}}},"responses":{"200":{"description":"Wallet ownership verified and activated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyWalletChallengeResponse"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many wallet challenge requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/wallet/rotate/challenge":{"post":{"summary":"Create a wallet rotation challenge","description":"Creates a version-bound challenge that must be signed by both the active and replacement wallets.","tags":["Wallets"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWalletRotationChallengeRequest"}}}},"responses":{"201":{"description":"Rotation challenge created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletLifecycleChallengeResponse"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many wallet challenge requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/wallet/rotate/verify":{"post":{"summary":"Verify and rotate a wallet","description":"Atomically replaces the active wallet after verifying signatures from both wallet versions.","tags":["Wallets"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyWalletRotationRequest"}}}},"responses":{"200":{"description":"Wallet rotated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyWalletChallengeResponse"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many wallet challenge requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/wallet/backup/challenge":{"post":{"summary":"Create a recovery-backup confirmation challenge","description":"Creates a version-bound challenge after the recovery phrase has been revealed locally. The phrase is never included in this request or response.","tags":["Wallets"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWalletBackupChallengeRequest"}}}},"responses":{"201":{"description":"Wallet backup confirmation challenge created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletBackupChallengeResponse"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many wallet challenge requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/wallet/backup/verify":{"post":{"summary":"Confirm a portable wallet recovery backup","description":"Consumes a passkey-derived wallet signature and records only that the user confirmed saving the phrase and matching the restored mainnet address. No recovery phrase is accepted or stored.","tags":["Wallets"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyWalletBackupRequest"}}}},"responses":{"200":{"description":"Recovery backup confirmed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyWalletChallengeResponse"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many wallet challenge requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/wallet/revoke":{"post":{"summary":"Revoke the current wallet","description":"Version-checks and permanently revokes the current wallet without replacing it.","tags":["Wallets"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeWalletRequest"}}}},"responses":{"200":{"description":"Wallet revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyWalletChallengeResponse"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/wallet/recovery":{"get":{"summary":"Get wallet recovery status","tags":["Wallets"],"parameters":[{"schema":{"type":"string","enum":["testnet"],"default":"testnet","description":"The only wallet network enabled for the current preview.","example":"testnet"},"required":false,"name":"network","in":"query"}],"responses":{"200":{"description":"Latest wallet recovery request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletRecoveryStatusResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Request wallet recovery","description":"Disables the active wallet and starts a cooling period. It never creates a replacement implicitly.","tags":["Wallets"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestWalletRecovery"}}}},"responses":{"201":{"description":"Recovery requested","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletRecoveryResponse"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/wallet/recovery/challenge":{"post":{"summary":"Create an approved wallet recovery challenge","description":"Creates a new-key proof only after support approval and the cooling period.","tags":["Wallets"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWalletRecoveryChallengeRequest"}}}},"responses":{"201":{"description":"Recovery challenge created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletLifecycleChallengeResponse"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many wallet challenge requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/wallet/recovery/verify":{"post":{"summary":"Verify and complete wallet recovery","description":"Atomically replaces a recovery-disabled wallet after a new-key ownership proof.","tags":["Wallets"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyWalletRecoveryRequest"}}}},"responses":{"200":{"description":"Wallet recovery completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyWalletChallengeResponse"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many wallet challenge requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/partner-consents":{"get":{"summary":"List partner consent grants","description":"Lists the signed-in user's app-specific consent history and current runtime access status without exposing wallet addresses or first-party credentials.","tags":["Partner Consent"],"responses":{"200":{"description":"Partner consent grants","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiPartnerConsentGrantListResponse"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/partner-consents/{grantId}":{"patch":{"summary":"Disable partner capabilities independently","description":"Disables monetization or matchmaking for one application. Account management cannot enable a capability; approval is bound to the hosted OAuth consent challenge.","tags":["Partner Consent"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"grantId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApiPartnerConsentGrant"}}}},"responses":{"200":{"description":"Partner consent updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiPartnerConsentGrantResponse"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/partner-consents/{grantId}/revoke":{"post":{"summary":"Revoke all access for a partner application","description":"Immediately revokes the app-specific grant without deleting the Dataing account or wallet.","tags":["Partner Consent"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"grantId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeApiPartnerConsentGrant"}}}},"responses":{"200":{"description":"Partner consent revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiPartnerConsentGrantResponse"}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user-api/me":{"get":{"summary":"Get private API profile summary","description":"Returns a compact profile summary for the private profile API token owner. Requires a private profile API token.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Private API profile summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserApiMeResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}}},"/user-api/bios":{"get":{"summary":"List bios","description":"Returns paginated bios for the private profile API token owner.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Maximum number of items to return. Defaults to 25, max 100.","example":"25"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Number of items to skip. Ignored when cursor is provided.","example":"0"},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","description":"Opaque pagination cursor returned as nextCursor from a previous response.","example":"25"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Paginated bios","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserApiBiosResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}}},"/user-api/bios/latest":{"get":{"summary":"Get latest bio","description":"Returns the latest bio for the private profile API token owner.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Latest bio","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserApiLatestBioResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}}},"/user-api/traits":{"get":{"summary":"List traits","description":"Returns paginated generated traits for the private profile API token owner.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Maximum number of items to return. Defaults to 25, max 100.","example":"25"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Number of items to skip. Ignored when cursor is provided.","example":"0"},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","description":"Opaque pagination cursor returned as nextCursor from a previous response.","example":"25"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Paginated traits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserApiTraitsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}}},"/user-api/profile-pictures":{"get":{"summary":"List profile pictures","description":"Returns paginated profile pictures for the private profile API token owner.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Maximum number of items to return. Defaults to 25, max 100.","example":"25"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Number of items to skip. Ignored when cursor is provided.","example":"0"},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","description":"Opaque pagination cursor returned as nextCursor from a previous response.","example":"25"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Paginated profile pictures","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserApiProfilePicturesResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}}},"/user-api/data-connections":{"get":{"summary":"List data connection summaries","description":"Returns safe connected-provider summaries for the private profile API token owner. OAuth tokens and raw provider payloads are never returned.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Data connection summaries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserApiDataConnectionsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}}},"/user-api/calendar/events":{"get":{"summary":"List Google Calendar events","description":"Returns paginated upcoming Google Calendar events from the private API token owner's latest calendar sync.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Maximum number of items to return. Defaults to 25, max 100.","example":"25"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Number of items to skip. Ignored when cursor is provided.","example":"0"},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","description":"Opaque pagination cursor returned as nextCursor from a previous response.","example":"25"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Paginated upcoming Google Calendar events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserApiGoogleCalendarEventsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}},"post":{"summary":"Create a Google Calendar event","description":"Creates an event through the private API token owner's connected Google Calendar account.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGoogleCalendarEvent"}}}},"responses":{"201":{"description":"Google Calendar event created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserApiGoogleCalendarEventResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"409":{"description":"Google Calendar is not connected or needs reauthorization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Connect or reconnect Google Calendar before creating an event"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}},"502":{"description":"Google Calendar rejected or failed the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Google Calendar request failed"}}}}}}},"/user-api/compatibilities":{"get":{"summary":"List compatibilities","description":"Returns paginated compatibility records involving the private profile API token owner.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Maximum number of items to return. Defaults to 25, max 100.","example":"25"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Number of items to skip. Ignored when cursor is provided.","example":"0"},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","description":"Opaque pagination cursor returned as nextCursor from a previous response.","example":"25"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Paginated compatibilities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserApiCompatibilitiesResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}}},"/user-api/discover":{"get":{"summary":"List discover profiles","description":"Returns paginated discover-style profiles for the private profile API token owner.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Maximum number of items to return. Defaults to 25, max 100.","example":"25"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Number of items to skip. Ignored when cursor is provided.","example":"0"},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","description":"Opaque pagination cursor returned as nextCursor from a previous response.","example":"25"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Paginated discover profiles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserApiDiscoverResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}}},"/user-api/match-requests":{"get":{"summary":"List match requests","description":"Returns paginated incoming/outgoing match requests visible to the private profile API token owner.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Maximum number of items to return. Defaults to 25, max 100.","example":"25"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Number of items to skip. Ignored when cursor is provided.","example":"0"},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","description":"Opaque pagination cursor returned as nextCursor from a previous response.","example":"25"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Paginated match requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserApiMatchRequestsResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}}},"/user-api/threads":{"get":{"summary":"List chat threads","description":"Returns chat threads visible to the private profile API token owner. Supports SOLO, MULTI, and SUPPORT thread filters.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Page number. Defaults to 1.","example":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","description":"Maximum number of threads to return. Defaults to 20, max 100.","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["SOLO","MULTI","SUPPORT"],"description":"Type of chat thread","example":"SOLO"},{"type":"string","enum":["ALL"]}],"default":"ALL","description":"Filter by thread type. Defaults to ALL.","example":"ALL"},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Paginated chat threads","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadListResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}}},"/user-api/threads/{threadId}/messages":{"get":{"summary":"Get chat thread messages","description":"Returns messages for a chat thread visible to the private profile API token owner. Use `before` to paginate older messages.","tags":["User API"],"parameters":[{"schema":{"type":"string","description":"Chat thread ID","example":"cmj0thread123"},"required":true,"name":"threadId","in":"path"},{"schema":{"type":"string","description":"Maximum number of messages to return. Defaults to 20, max 100.","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Cursor: return messages older than this message ID.","example":"cmj0msg456"},"required":false,"name":"before","in":"query"},{"schema":{"type":"string","description":"Private profile API token as a Bearer token","example":"Bearer dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"Authorization","in":"header"},{"schema":{"type":"string","description":"Private profile API token","example":"dtok_550e8400-e29b-41d4-a716-446655440000"},"required":false,"name":"X-Dataing-Profile-Token","in":"header"}],"responses":{"200":{"description":"Chat thread messages","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadMessagesResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Invalid request"}}}},"401":{"description":"Missing, invalid, or revoked private profile API token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"404":{"description":"Thread not found or access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Thread not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to handle user API request"}}}}}}},"/data-connections/google-calendar/events":{"get":{"tags":["Data Connections"],"summary":"Read the signed-in owner's live Google Calendar events","description":"Owner-session-only display of events across the connected Google account's accessible calendars for at most 31 days. Expands recurring events, preserves all-day dates and reports partial access or bounded results explicitly. Not booking authority or a public/partner profile response.","parameters":[{"schema":{"type":"string","format":"date-time"},"required":true,"name":"timeMin","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":true,"name":"timeMax","in":"query"}],"responses":{"200":{"description":"Private live Google events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleCalendarFeedResponse"}}}},"400":{"description":"Invalid date range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Google Calendar needs connection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Google events unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections":{"get":{"summary":"List user data connections","description":"Returns all data connections for the authenticated user","tags":["Users"],"responses":{"200":{"description":"Connections retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataConnectionsListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/{provider}":{"get":{"summary":"Get data connection","description":"Returns a specific data connection including provider data","tags":["Data Connections"],"parameters":[{"schema":{"type":"string","enum":["YOUTUBE","PINTEREST","TWITTER","EVENTBRITE","TIKTOK","GOOGLE_CALENDAR","APPLE_MUSIC","CHATGPT","LOCATION","PHOTOS"]},"required":true,"name":"provider","in":"path"}],"responses":{"200":{"description":"Connection retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataConnectionSingleResponse"}}}},"400":{"description":"Invalid provider","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/youtube":{"post":{"summary":"Connect YouTube account","description":"Completes the YouTube OAuth flow and stores tokens for the user","tags":["Data Connections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"authCode":{"type":"string","minLength":1},"redirectUri":{"type":"string","format":"uri"},"metadata":{"$ref":"#/components/schemas/AnalyticsMetadata"}},"required":["authCode"]},"example":{"authCode":"4/0AbCdEfGhIjKlMn"}}}},"responses":{"200":{"description":"YouTube connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectDataSourceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/pinterest":{"post":{"summary":"Connect Pinterest account","description":"Completes the Pinterest OAuth flow and stores tokens for the user","tags":["Data Connections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"authCode":{"type":"string","minLength":1},"redirectUri":{"type":"string","format":"uri"},"codeVerifier":{"type":"string"},"metadata":{"$ref":"#/components/schemas/AnalyticsMetadata"}},"required":["authCode"]},"example":{"authCode":"AQAABBBB","redirectUri":"http://localhost:3000/oauth-redirect/pinterest"}}}},"responses":{"200":{"description":"Pinterest connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectDataSourceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/twitter":{"post":{"summary":"Connect Twitter account","description":"Completes the Twitter OAuth flow and stores tokens for the user","tags":["Data Connections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"authCode":{"type":"string","minLength":1},"redirectUri":{"type":"string","format":"uri"},"codeVerifier":{"type":"string","minLength":1,"description":"PKCE code verifier used during the Twitter authorization flow"},"metadata":{"$ref":"#/components/schemas/AnalyticsMetadata"}},"required":["authCode"]},"example":{"authCode":"twitter-auth-code","codeVerifier":"PKCE_CODE_VERIFIER"}}}},"responses":{"200":{"description":"Twitter connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectDataSourceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/tiktok":{"post":{"summary":"Connect TikTok account","description":"Completes the TikTok OAuth flow and stores tokens for the user","tags":["Data Connections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"authCode":{"type":"string","minLength":1},"redirectUri":{"type":"string","format":"uri"},"codeVerifier":{"type":"string","minLength":1},"metadata":{"$ref":"#/components/schemas/AnalyticsMetadata"}},"required":["authCode"]},"example":{"authCode":"tiktok-auth-code","redirectUri":"http://localhost:3000/oauth/tiktok"}}}},"responses":{"200":{"description":"TikTok connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectDataSourceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/google-calendar":{"post":{"summary":"Connect Google Calendar account","description":"Completes the Google Calendar OAuth flow and stores tokens for the user","tags":["Data Connections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"authCode":{"type":"string","minLength":1},"redirectUri":{"type":"string","format":"uri"},"metadata":{"$ref":"#/components/schemas/AnalyticsMetadata"}},"required":["authCode"]},"example":{"authCode":"4/0AbCdEfGhIjKlMn","redirectUri":"http://localhost:3000/oauth-redirect/google-calendar"}}}},"responses":{"200":{"description":"Google Calendar connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectDataSourceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/eventbrite":{"post":{"summary":"Connect Eventbrite account","description":"Completes the Eventbrite OAuth flow and stores tokens for the user","tags":["Data Connections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"authCode":{"type":"string","minLength":1},"redirectUri":{"type":"string","format":"uri"},"metadata":{"$ref":"#/components/schemas/AnalyticsMetadata"}},"required":["authCode"]},"example":{"authCode":"eventbrite-auth-code","redirectUri":"http://localhost:3000/oauth-redirect/eventbrite"}}}},"responses":{"200":{"description":"Eventbrite connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectDataSourceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/location":{"post":{"summary":"Connect location data","description":"Stores the user's current location from the device's geolocation API (web or iOS)","tags":["Data Connections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"accuracy":{"type":"number"},"altitude":{"type":"number","nullable":true},"altitudeAccuracy":{"type":"number","nullable":true},"heading":{"type":"number","nullable":true},"speed":{"type":"number","nullable":true},"timestamp":{"type":"number"},"metadata":{"$ref":"#/components/schemas/AnalyticsMetadata"}},"required":["latitude","longitude"]},"example":{"latitude":37.7749,"longitude":-122.4194,"accuracy":10}}}},"responses":{"200":{"description":"Location connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectDataSourceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/apple-music":{"post":{"summary":"Connect Apple Music","description":"Stores the user's Apple Music library data fetched from the iOS device via MusicKit. Unlike other providers, Apple Music data is fetched directly on the device and submitted here.","tags":["Data Connections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"topArtists":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"topAlbums":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"artistName":{"type":"string","nullable":true},"genres":{"type":"array","nullable":true,"items":{"type":"string"}},"trackCount":{"type":"number","nullable":true},"dateAdded":{"type":"string","nullable":true},"releaseDate":{"type":"string","nullable":true},"artworkUrl":{"type":"string","nullable":true},"artworkData":{"type":"string","nullable":true,"maxLength":200000}},"required":["id","name"]}},"topSongs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"artistName":{"type":"string","nullable":true},"albumName":{"type":"string","nullable":true},"genres":{"type":"array","nullable":true,"items":{"type":"string"}},"durationMs":{"type":"number","nullable":true},"trackNumber":{"type":"number","nullable":true},"releaseDate":{"type":"string","nullable":true},"artworkUrl":{"type":"string","nullable":true},"artworkData":{"type":"string","nullable":true,"maxLength":200000}},"required":["id","name"]}},"playlists":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"dateAdded":{"type":"string","nullable":true},"lastModifiedDate":{"type":"string","nullable":true},"isPublic":{"type":"boolean","nullable":true},"artworkUrl":{"type":"string","nullable":true},"artworkData":{"type":"string","nullable":true,"maxLength":200000}},"required":["id","name"]}},"recentlyPlayed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"artistName":{"type":"string","nullable":true},"albumName":{"type":"string","nullable":true},"genres":{"type":"array","nullable":true,"items":{"type":"string"}},"durationMs":{"type":"number","nullable":true},"trackNumber":{"type":"number","nullable":true},"releaseDate":{"type":"string","nullable":true},"artworkUrl":{"type":"string","nullable":true},"artworkData":{"type":"string","nullable":true,"maxLength":200000}},"required":["id","name"]}},"genres":{"type":"array","items":{"type":"string"}},"metadata":{"$ref":"#/components/schemas/AnalyticsMetadata"}},"required":["topArtists","topAlbums","topSongs","playlists","recentlyPlayed","genres"]},"example":{"topArtists":[{"id":"123","name":"Taylor Swift"}],"topAlbums":[{"id":"456","name":"1989","artistName":"Taylor Swift","genres":["Pop"],"trackCount":13,"releaseDate":"2014-10-27"}],"topSongs":[{"id":"789","name":"Shake It Off","artistName":"Taylor Swift","albumName":"1989","durationMs":219000}],"playlists":[{"id":"pl1","name":"My Favorites"}],"recentlyPlayed":[],"genres":["Pop","Rock"]}}}},"responses":{"200":{"description":"Apple Music connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectDataSourceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/photos/presign":{"post":{"summary":"Generate presigned upload URLs for photos","description":"Generates presigned S3 upload URLs for a batch of photos. Up to 200 photos total per user.","tags":["Data Connections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"contentType":{"type":"string","enum":["image/jpeg","image/jpg","image/png","image/webp","image/heic","image/heif"],"example":"image/jpeg"}},"required":["contentType"]},"minItems":1,"maxItems":200}},"required":["files"]},"example":{"files":[{"contentType":"image/jpeg"},{"contentType":"image/png"}]}}}},"responses":{"200":{"description":"Presigned URLs generated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"uploadUrl":{"type":"string"},"expiresIn":{"type":"number"}},"required":["key","uploadUrl","expiresIn"]}}},"required":["success","data"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/photos":{"post":{"summary":"Connect photos for analysis","description":"Registers uploaded photos and triggers AI vision analysis. Photos are private and only used for trait and bio generation.","tags":["Data Connections"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"photos":{"type":"array","items":{"type":"object","properties":{"storageKey":{"type":"string"},"originalName":{"type":"string"},"contentType":{"type":"string"}},"required":["storageKey"]},"minItems":1,"maxItems":200},"metadata":{"$ref":"#/components/schemas/AnalyticsMetadata"}},"required":["photos"]},"example":{"photos":[{"storageKey":"development/user-photos/user123/1710000000-uuid.jpg","originalName":"IMG_1234.jpg","contentType":"image/jpeg"}]}}}},"responses":{"200":{"description":"Photos connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectDataSourceResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/data-connections/{provider}/disconnect":{"post":{"summary":"Disconnect data connection","description":"Disconnects a data source for the authenticated user","tags":["Data Connections"],"parameters":[{"schema":{"type":"string","enum":["YOUTUBE","PINTEREST","TWITTER","EVENTBRITE","TIKTOK","GOOGLE_CALENDAR","APPLE_MUSIC","CHATGPT","LOCATION","PHOTOS"]},"required":true,"name":"provider","in":"path"}],"responses":{"200":{"description":"Data source disconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisconnectDataSourceResponse"}}}},"400":{"description":"Invalid provider","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Connection not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/chat/events":{"get":{"summary":"Stream Cupid chat events","description":"Establishes an SSE connection that streams realtime Cupid chat updates (messages and context changes) for the authenticated user.","tags":["Chat"],"responses":{"200":{"description":"SSE stream of Cupid chat events","content":{"text/event-stream":{"schema":{"type":"string","description":"SSE payload containing streaming chat message deltas followed by the final message and context events","example":"id: cm39msg123:0\nevent: chat.message.delta\ndata: {\"threadId\":\"cm39thread123\",\"messageId\":\"cm39msg123\",\"delta\":\"Here's someone new \",\"sequence\":0}\n\nid: cm39msg123:1\nevent: chat.message.delta\ndata: {\"threadId\":\"cm39thread123\",\"messageId\":\"cm39msg123\",\"delta\":\"I think you'll click with!\",\"sequence\":1,\"isFinal\":true,\"fullText\":\"Here's someone new I think you'll click with!\"}\n\nid: cm39msg123\nevent: chat.message\ndata: {\"threadId\":\"cm39thread123\",\"message\":{\"id\":\"cm39msg123\",\"threadId\":\"cm39thread123\",\"senderType\":\"BOT\",\"userId\":null,\"content\":\"Here's someone new I think you'll click with!\",\"metadata\":null,\"createdAt\":\"2025-11-16T00:00:00.000Z\",\"updatedAt\":\"2025-11-16T00:05:00.000Z\",\"user\":null}}\n\nid: context-cm39thread123\nevent: chat.context\ndata: {\"threadId\":\"cm39thread123\",\"context\":{\"metadata\":{\"id\":\"cm39context123\",\"userId\":\"cm39user123\",\"status\":\"FOCUSED_MATCH\",\"context\":{\"focusedRelationshipId\":\"cm39relationship123\",\"otherUserName\":\"Jordan\"},\"createdAt\":\"2025-11-15T23:59:00.000Z\",\"updatedAt\":\"2025-11-16T00:05:00.000Z\"},\"relationships\":[]}}\n\n"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/chat/memories":{"get":{"summary":"List user's chat memories","description":"Returns a paginated list of all chat memories extracted from the user's conversations. Memories represent things the user has revealed about their likes, dislikes, interests, etc.","tags":["Chat"],"parameters":[{"schema":{"type":"string","description":"Page number (default: 1)","example":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","description":"Items per page (default: 50, max: 100)","example":"50"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"List of chat memories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMemoriesListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"summary":"Delete all chat memories","description":"Deletes all chat memories for the authenticated user. Also clears the LangGraph store (best-effort).","tags":["Chat"],"responses":{"200":{"description":"All memories deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAllChatMemoriesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/chat/memories/{memoryId}":{"delete":{"summary":"Delete a specific chat memory","description":"Deletes a single chat memory by ID. Also removes it from the LangGraph store (best-effort).","tags":["Chat"],"parameters":[{"schema":{"type":"string","description":"The memory ID to delete","example":"cmj0memory123"},"required":true,"name":"memoryId","in":"path"}],"responses":{"200":{"description":"Memory deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteChatMemoryResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Memory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/chat/threads":{"get":{"summary":"List user's chat threads","description":"Returns a paginated list of all chat threads the user participates in. Includes solo Cupid threads, support threads, and multi-user match threads.","tags":["Chat"],"parameters":[{"schema":{"type":"string","description":"Page number (default: 1)","example":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","description":"Items per page (default: 20)","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["SOLO","MULTI","SUPPORT","ALL"],"description":"Filter by thread type (default: ALL)","example":"MULTI"},"required":false,"name":"type","in":"query"}],"responses":{"200":{"description":"List of chat threads","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/chat/threads/{threadId}/messages":{"get":{"summary":"Get thread messages","description":"Fetches messages in a specific chat thread with cursor-based pagination. Returns the latest messages first (newest at end of array). Use the `before` cursor to load older messages.","tags":["Chat"],"parameters":[{"schema":{"type":"string","description":"Thread ID","example":"cmj0thread123"},"required":true,"name":"threadId","in":"path"},{"schema":{"type":"string","description":"Number of messages to return (default: 20, max: 100)","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Cursor: return messages older than this message ID","example":"cmj0msg456"},"required":false,"name":"before","in":"query"}],"responses":{"200":{"description":"Thread messages retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadMessagesResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Thread not found or access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Send thread message","description":"Sends a message in a chat thread. For SOLO threads, the assistant will respond with streaming. In MULTI match threads, @Cupid or @cupid mentions also receive a shared reply.","tags":["Chat"],"parameters":[{"schema":{"type":"string","description":"Thread ID","example":"cmj0thread123"},"required":true,"name":"threadId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendThreadMessageBody"}}}},"responses":{"200":{"description":"Message sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendThreadMessageResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Blocked — messaging not allowed between blocked users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Thread not found or access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Cupid is already responding in this thread","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/chat/threads/{threadId}/viewed":{"post":{"summary":"Mark a chat thread as viewed","description":"Clears the current user's persisted new-match indicator for this thread.","tags":["Chat"],"parameters":[{"schema":{"type":"string","description":"Thread ID","example":"cmj0thread123"},"required":true,"name":"threadId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkThreadViewedBody"}}}},"responses":{"200":{"description":"Thread marked as viewed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkThreadViewedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Thread not found or access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/chat/threads/{threadId}/attachments/presign":{"post":{"summary":"Prepare chat image uploads","description":"Creates short-lived presigned upload URLs for private images that will be attached to a chat message.","tags":["Chat"],"parameters":[{"schema":{"type":"string","description":"Thread ID","example":"cmj0thread123"},"required":true,"name":"threadId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignChatImageUploadsBody"}}}},"responses":{"200":{"description":"Upload targets created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignChatImageUploadsResponse"}}}},"400":{"description":"Unsupported image type or invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Thread not found or access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/wallet-recoveries":{"get":{"summary":"List wallet recovery requests","description":"Superadmin-only support queue. Wallet lifecycle data is never cacheable.","tags":["Admin","Wallets"],"parameters":[{"schema":{"type":"string","default":"1","description":"Page number (1-indexed)","example":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","default":"20","description":"Number of items per page (max 100)","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["PENDING","APPROVED","REJECTED","COMPLETED"]},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Paginated recovery requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminWalletRecoveryListResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/wallet-recoveries/{recoveryRequestId}/approve":{"post":{"summary":"Approve an eligible wallet recovery","description":"Superadmin-only, version-checked approval. The service enforces the cooling period independently.","tags":["Admin","Wallets"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"recoveryRequestId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveWalletRecoveryBody"}}}},"responses":{"200":{"description":"Recovery approved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminWalletRecoveryResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/wallet-recoveries/{recoveryRequestId}/reject":{"post":{"summary":"Reject a wallet recovery","description":"Superadmin-only rejection with a bounded audit reason.","tags":["Admin","Wallets"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"recoveryRequestId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectWalletRecoveryBody"}}}},"responses":{"200":{"description":"Recovery rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminWalletRecoveryResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/api-partners/marketplace-projections":{"get":{"summary":"List marketplace projection operations","description":"Shows the metadata-only transactional outbox, including terminal failures that require recovery.","tags":["Admin","API Partners"],"parameters":[{"schema":{"type":"string","default":"1","description":"Page number (1-indexed)","example":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","default":"20","description":"Number of items per page (max 100)","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["PENDING","PROCESSING","SUCCEEDED","FAILED"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["PARTNER_ORGANIZATION","USER_WALLET"]},"required":false,"name":"projectionType","in":"query"}],"responses":{"200":{"description":"Marketplace projection queue","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectionType":{"type":"string","enum":["PARTNER_ORGANIZATION","USER_WALLET"]},"action":{"type":"string","enum":["UPSERT","DISABLE"]},"aggregateId":{"type":"string"},"targetVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true},"organizationId":{"type":"string","nullable":true},"walletId":{"type":"string","nullable":true},"status":{"type":"string","enum":["PENDING","PROCESSING","SUCCEEDED","FAILED"]},"attempts":{"type":"integer","minimum":0},"nextAttemptAt":{"type":"string","format":"date-time"},"lastAttemptAt":{"type":"string","nullable":true,"format":"date-time"},"completedAt":{"type":"string","nullable":true,"format":"date-time"},"lastError":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","projectionType","action","aggregateId","targetVersion","organizationId","walletId","status","attempts","nextAttemptAt","lastAttemptAt","completedAt","lastError","createdAt","updatedAt"]}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["success","data","meta"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/api-partners/organizations":{"get":{"summary":"List API-partner organizations","tags":["Admin","API Partners"],"parameters":[{"schema":{"type":"string","default":"1","description":"Page number (1-indexed)","example":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","default":"20","description":"Number of items per page (max 100)","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["PENDING_REVIEW","ACTIVE","SUSPENDED","REVOKED"]},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Review queue","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"businessName":{"type":"string"},"status":{"type":"string","enum":["PENDING_REVIEW","ACTIVE","SUSPENDED","REVOKED"]},"version":{"type":"integer","minimum":0,"exclusiveMinimum":true},"marketplaceSyncState":{"type":"string","enum":["NOT_REQUIRED","PENDING","SYNCED","FAILED"]},"lastMarketplaceSyncedVersion":{"type":"integer","minimum":0},"marketplaceOrganizationId":{"type":"string","nullable":true},"approvedAt":{"type":"string","nullable":true,"format":"date-time"},"suspendedAt":{"type":"string","nullable":true,"format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"operatorCount":{"type":"integer","minimum":0},"applicationCount":{"type":"integer","minimum":0},"operators":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"role":{"type":"string","enum":["OWNER","ADMIN"]},"contactName":{"type":"string"},"email":{"type":"string","nullable":true,"format":"email"},"phone":{"type":"string","nullable":true}},"required":["userId","role","contactName","email","phone"]}}},"required":["id","businessName","status","version","marketplaceSyncState","lastMarketplaceSyncedVersion","marketplaceOrganizationId","approvedAt","suspendedAt","revokedAt","createdAt","updatedAt","operatorCount","applicationCount","operators"]}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["success","data","meta"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/api-partners/applications":{"get":{"summary":"List API-partner applications","tags":["Admin","API Partners"],"parameters":[{"schema":{"type":"string","default":"1","description":"Page number (1-indexed)","example":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","default":"20","description":"Number of items per page (max 100)","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["PENDING_REVIEW","APPROVED","SUSPENDED","REVOKED"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["UNPROVISIONED","PENDING","SYNCED","FAILED"]},"required":false,"name":"syncState","in":"query"}],"responses":{"200":{"description":"Application review and sync queue","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"organizationBusinessName":{"type":"string"},"name":{"type":"string"},"clientId":{"type":"string"},"clientType":{"type":"string","enum":["PUBLIC","CONFIDENTIAL"]},"privacyPolicyUrl":{"type":"string","nullable":true,"format":"uri"},"status":{"type":"string","enum":["PENDING_REVIEW","APPROVED","SUSPENDED","REVOKED"]},"origins":{"type":"array","items":{"type":"string","maxLength":2048}},"redirectUris":{"type":"array","items":{"type":"string","maxLength":2048}},"requestedScopes":{"type":"array","items":{"type":"string","enum":["openid","offline_access","profile","wallet:status","wallet:address","preferences:monetization","preferences:matchmaking","traits:ads","profile:traits"]}},"allowedScopes":{"type":"array","items":{"type":"string","enum":["openid","offline_access","profile","wallet:status","wallet:address","preferences:monetization","preferences:matchmaking","traits:ads","profile:traits"]}},"requestedCapabilities":{"type":"array","items":{"type":"string","enum":["SIGN_IN","WALLET","MONETIZATION","MATCHMAKING","AD_PERSONALIZATION","EXTENDED_PROFILE"]}},"allowedCapabilities":{"type":"array","items":{"type":"string","enum":["SIGN_IN","WALLET","MONETIZATION","MATCHMAKING","AD_PERSONALIZATION","EXTENDED_PROFILE"]}},"version":{"type":"integer","minimum":0,"exclusiveMinimum":true},"syncState":{"type":"string","enum":["UNPROVISIONED","PENDING","SYNCED","FAILED"]},"lastProvisionedVersion":{"type":"integer","minimum":0},"approvedAt":{"type":"string","nullable":true,"format":"date-time"},"suspendedAt":{"type":"string","nullable":true,"format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"latestProvisioning":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"action":{"type":"string","enum":["UPSERT","SUSPEND","REVOKE","ROTATE_SECRET"]},"status":{"type":"string","enum":["PENDING","PROCESSING","SUCCEEDED","FAILED"]},"targetVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true},"attempts":{"type":"integer","minimum":0},"nextAttemptAt":{"type":"string","format":"date-time"},"lastAttemptAt":{"type":"string","nullable":true,"format":"date-time"},"completedAt":{"type":"string","nullable":true,"format":"date-time"},"lastError":{"type":"string","nullable":true}},"required":["id","action","status","targetVersion","attempts","nextAttemptAt","lastAttemptAt","completedAt","lastError"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","organizationId","organizationBusinessName","name","clientId","clientType","privacyPolicyUrl","status","origins","redirectUris","requestedScopes","allowedScopes","requestedCapabilities","allowedCapabilities","version","syncState","lastProvisionedVersion","approvedAt","suspendedAt","revokedAt","latestProvisioning","createdAt","updatedAt"]}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["success","data","meta"]}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/api-partners/organizations/{organizationId}/approve":{"post":{"summary":"Approve an API-partner organization","tags":["Admin","API Partners"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"organizationId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminApiPartnerReview"}}}},"responses":{"200":{"description":"Organization lifecycle updated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"businessName":{"type":"string"},"status":{"type":"string","enum":["PENDING_REVIEW","ACTIVE","SUSPENDED","REVOKED"]},"version":{"type":"integer","minimum":0,"exclusiveMinimum":true},"marketplaceSyncState":{"type":"string","enum":["NOT_REQUIRED","PENDING","SYNCED","FAILED"]},"lastMarketplaceSyncedVersion":{"type":"integer","minimum":0},"marketplaceOrganizationId":{"type":"string","nullable":true},"approvedAt":{"type":"string","nullable":true,"format":"date-time"},"suspendedAt":{"type":"string","nullable":true,"format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"operatorCount":{"type":"integer","minimum":0},"applicationCount":{"type":"integer","minimum":0},"operators":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"role":{"type":"string","enum":["OWNER","ADMIN"]},"contactName":{"type":"string"},"email":{"type":"string","nullable":true,"format":"email"},"phone":{"type":"string","nullable":true}},"required":["userId","role","contactName","email","phone"]}}},"required":["id","businessName","status","version","marketplaceSyncState","lastMarketplaceSyncedVersion","marketplaceOrganizationId","approvedAt","suspendedAt","revokedAt","createdAt","updatedAt","operatorCount","applicationCount","operators"]}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/api-partners/organizations/{organizationId}/suspend":{"post":{"summary":"Suspend an API-partner organization","tags":["Admin","API Partners"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"organizationId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminApiPartnerLifecycleAction"}}}},"responses":{"200":{"description":"Organization lifecycle updated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"businessName":{"type":"string"},"status":{"type":"string","enum":["PENDING_REVIEW","ACTIVE","SUSPENDED","REVOKED"]},"version":{"type":"integer","minimum":0,"exclusiveMinimum":true},"marketplaceSyncState":{"type":"string","enum":["NOT_REQUIRED","PENDING","SYNCED","FAILED"]},"lastMarketplaceSyncedVersion":{"type":"integer","minimum":0},"marketplaceOrganizationId":{"type":"string","nullable":true},"approvedAt":{"type":"string","nullable":true,"format":"date-time"},"suspendedAt":{"type":"string","nullable":true,"format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"operatorCount":{"type":"integer","minimum":0},"applicationCount":{"type":"integer","minimum":0},"operators":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"role":{"type":"string","enum":["OWNER","ADMIN"]},"contactName":{"type":"string"},"email":{"type":"string","nullable":true,"format":"email"},"phone":{"type":"string","nullable":true}},"required":["userId","role","contactName","email","phone"]}}},"required":["id","businessName","status","version","marketplaceSyncState","lastMarketplaceSyncedVersion","marketplaceOrganizationId","approvedAt","suspendedAt","revokedAt","createdAt","updatedAt","operatorCount","applicationCount","operators"]}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/api-partners/organizations/{organizationId}/revoke":{"post":{"summary":"Revoke an API-partner organization","tags":["Admin","API Partners"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"organizationId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminApiPartnerLifecycleAction"}}}},"responses":{"200":{"description":"Organization lifecycle updated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"businessName":{"type":"string"},"status":{"type":"string","enum":["PENDING_REVIEW","ACTIVE","SUSPENDED","REVOKED"]},"version":{"type":"integer","minimum":0,"exclusiveMinimum":true},"marketplaceSyncState":{"type":"string","enum":["NOT_REQUIRED","PENDING","SYNCED","FAILED"]},"lastMarketplaceSyncedVersion":{"type":"integer","minimum":0},"marketplaceOrganizationId":{"type":"string","nullable":true},"approvedAt":{"type":"string","nullable":true,"format":"date-time"},"suspendedAt":{"type":"string","nullable":true,"format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"operatorCount":{"type":"integer","minimum":0},"applicationCount":{"type":"integer","minimum":0},"operators":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"role":{"type":"string","enum":["OWNER","ADMIN"]},"contactName":{"type":"string"},"email":{"type":"string","nullable":true,"format":"email"},"phone":{"type":"string","nullable":true}},"required":["userId","role","contactName","email","phone"]}}},"required":["id","businessName","status","version","marketplaceSyncState","lastMarketplaceSyncedVersion","marketplaceOrganizationId","approvedAt","suspendedAt","revokedAt","createdAt","updatedAt","operatorCount","applicationCount","operators"]}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/api-partners/applications/{applicationId}/approve":{"post":{"summary":"Approve an API-partner application","description":"Records authoritative scope/capability approval and queues an authorization-server projection.","tags":["Admin","API Partners"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"applicationId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminApproveApiPartnerApplication"}}}},"responses":{"200":{"description":"Application approved and provisioning queued","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"organizationBusinessName":{"type":"string"},"name":{"type":"string"},"clientId":{"type":"string"},"clientType":{"type":"string","enum":["PUBLIC","CONFIDENTIAL"]},"privacyPolicyUrl":{"type":"string","nullable":true,"format":"uri"},"status":{"type":"string","enum":["PENDING_REVIEW","APPROVED","SUSPENDED","REVOKED"]},"origins":{"type":"array","items":{"type":"string","maxLength":2048}},"redirectUris":{"type":"array","items":{"type":"string","maxLength":2048}},"requestedScopes":{"type":"array","items":{"type":"string","enum":["openid","offline_access","profile","wallet:status","wallet:address","preferences:monetization","preferences:matchmaking","traits:ads","profile:traits"]}},"allowedScopes":{"type":"array","items":{"type":"string","enum":["openid","offline_access","profile","wallet:status","wallet:address","preferences:monetization","preferences:matchmaking","traits:ads","profile:traits"]}},"requestedCapabilities":{"type":"array","items":{"type":"string","enum":["SIGN_IN","WALLET","MONETIZATION","MATCHMAKING","AD_PERSONALIZATION","EXTENDED_PROFILE"]}},"allowedCapabilities":{"type":"array","items":{"type":"string","enum":["SIGN_IN","WALLET","MONETIZATION","MATCHMAKING","AD_PERSONALIZATION","EXTENDED_PROFILE"]}},"version":{"type":"integer","minimum":0,"exclusiveMinimum":true},"syncState":{"type":"string","enum":["UNPROVISIONED","PENDING","SYNCED","FAILED"]},"lastProvisionedVersion":{"type":"integer","minimum":0},"approvedAt":{"type":"string","nullable":true,"format":"date-time"},"suspendedAt":{"type":"string","nullable":true,"format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"latestProvisioning":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"action":{"type":"string","enum":["UPSERT","SUSPEND","REVOKE","ROTATE_SECRET"]},"status":{"type":"string","enum":["PENDING","PROCESSING","SUCCEEDED","FAILED"]},"targetVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true},"attempts":{"type":"integer","minimum":0},"nextAttemptAt":{"type":"string","format":"date-time"},"lastAttemptAt":{"type":"string","nullable":true,"format":"date-time"},"completedAt":{"type":"string","nullable":true,"format":"date-time"},"lastError":{"type":"string","nullable":true}},"required":["id","action","status","targetVersion","attempts","nextAttemptAt","lastAttemptAt","completedAt","lastError"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","organizationId","organizationBusinessName","name","clientId","clientType","privacyPolicyUrl","status","origins","redirectUris","requestedScopes","allowedScopes","requestedCapabilities","allowedCapabilities","version","syncState","lastProvisionedVersion","approvedAt","suspendedAt","revokedAt","latestProvisioning","createdAt","updatedAt"]}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/api-partners/applications/{applicationId}/suspend":{"post":{"summary":"Suspend an API-partner application","tags":["Admin","API Partners"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"applicationId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminApiPartnerLifecycleAction"}}}},"responses":{"200":{"description":"Application lifecycle updated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"organizationBusinessName":{"type":"string"},"name":{"type":"string"},"clientId":{"type":"string"},"clientType":{"type":"string","enum":["PUBLIC","CONFIDENTIAL"]},"privacyPolicyUrl":{"type":"string","nullable":true,"format":"uri"},"status":{"type":"string","enum":["PENDING_REVIEW","APPROVED","SUSPENDED","REVOKED"]},"origins":{"type":"array","items":{"type":"string","maxLength":2048}},"redirectUris":{"type":"array","items":{"type":"string","maxLength":2048}},"requestedScopes":{"type":"array","items":{"type":"string","enum":["openid","offline_access","profile","wallet:status","wallet:address","preferences:monetization","preferences:matchmaking","traits:ads","profile:traits"]}},"allowedScopes":{"type":"array","items":{"type":"string","enum":["openid","offline_access","profile","wallet:status","wallet:address","preferences:monetization","preferences:matchmaking","traits:ads","profile:traits"]}},"requestedCapabilities":{"type":"array","items":{"type":"string","enum":["SIGN_IN","WALLET","MONETIZATION","MATCHMAKING","AD_PERSONALIZATION","EXTENDED_PROFILE"]}},"allowedCapabilities":{"type":"array","items":{"type":"string","enum":["SIGN_IN","WALLET","MONETIZATION","MATCHMAKING","AD_PERSONALIZATION","EXTENDED_PROFILE"]}},"version":{"type":"integer","minimum":0,"exclusiveMinimum":true},"syncState":{"type":"string","enum":["UNPROVISIONED","PENDING","SYNCED","FAILED"]},"lastProvisionedVersion":{"type":"integer","minimum":0},"approvedAt":{"type":"string","nullable":true,"format":"date-time"},"suspendedAt":{"type":"string","nullable":true,"format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"latestProvisioning":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"action":{"type":"string","enum":["UPSERT","SUSPEND","REVOKE","ROTATE_SECRET"]},"status":{"type":"string","enum":["PENDING","PROCESSING","SUCCEEDED","FAILED"]},"targetVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true},"attempts":{"type":"integer","minimum":0},"nextAttemptAt":{"type":"string","format":"date-time"},"lastAttemptAt":{"type":"string","nullable":true,"format":"date-time"},"completedAt":{"type":"string","nullable":true,"format":"date-time"},"lastError":{"type":"string","nullable":true}},"required":["id","action","status","targetVersion","attempts","nextAttemptAt","lastAttemptAt","completedAt","lastError"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","organizationId","organizationBusinessName","name","clientId","clientType","privacyPolicyUrl","status","origins","redirectUris","requestedScopes","allowedScopes","requestedCapabilities","allowedCapabilities","version","syncState","lastProvisionedVersion","approvedAt","suspendedAt","revokedAt","latestProvisioning","createdAt","updatedAt"]}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/api-partners/applications/{applicationId}/revoke":{"post":{"summary":"Revoke an API-partner application","tags":["Admin","API Partners"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"applicationId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminApiPartnerLifecycleAction"}}}},"responses":{"200":{"description":"Application lifecycle updated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"organizationBusinessName":{"type":"string"},"name":{"type":"string"},"clientId":{"type":"string"},"clientType":{"type":"string","enum":["PUBLIC","CONFIDENTIAL"]},"privacyPolicyUrl":{"type":"string","nullable":true,"format":"uri"},"status":{"type":"string","enum":["PENDING_REVIEW","APPROVED","SUSPENDED","REVOKED"]},"origins":{"type":"array","items":{"type":"string","maxLength":2048}},"redirectUris":{"type":"array","items":{"type":"string","maxLength":2048}},"requestedScopes":{"type":"array","items":{"type":"string","enum":["openid","offline_access","profile","wallet:status","wallet:address","preferences:monetization","preferences:matchmaking","traits:ads","profile:traits"]}},"allowedScopes":{"type":"array","items":{"type":"string","enum":["openid","offline_access","profile","wallet:status","wallet:address","preferences:monetization","preferences:matchmaking","traits:ads","profile:traits"]}},"requestedCapabilities":{"type":"array","items":{"type":"string","enum":["SIGN_IN","WALLET","MONETIZATION","MATCHMAKING","AD_PERSONALIZATION","EXTENDED_PROFILE"]}},"allowedCapabilities":{"type":"array","items":{"type":"string","enum":["SIGN_IN","WALLET","MONETIZATION","MATCHMAKING","AD_PERSONALIZATION","EXTENDED_PROFILE"]}},"version":{"type":"integer","minimum":0,"exclusiveMinimum":true},"syncState":{"type":"string","enum":["UNPROVISIONED","PENDING","SYNCED","FAILED"]},"lastProvisionedVersion":{"type":"integer","minimum":0},"approvedAt":{"type":"string","nullable":true,"format":"date-time"},"suspendedAt":{"type":"string","nullable":true,"format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"latestProvisioning":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"action":{"type":"string","enum":["UPSERT","SUSPEND","REVOKE","ROTATE_SECRET"]},"status":{"type":"string","enum":["PENDING","PROCESSING","SUCCEEDED","FAILED"]},"targetVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true},"attempts":{"type":"integer","minimum":0},"nextAttemptAt":{"type":"string","format":"date-time"},"lastAttemptAt":{"type":"string","nullable":true,"format":"date-time"},"completedAt":{"type":"string","nullable":true,"format":"date-time"},"lastError":{"type":"string","nullable":true}},"required":["id","action","status","targetVersion","attempts","nextAttemptAt","lastAttemptAt","completedAt","lastError"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","organizationId","organizationBusinessName","name","clientId","clientType","privacyPolicyUrl","status","origins","redirectUris","requestedScopes","allowedScopes","requestedCapabilities","allowedCapabilities","version","syncState","lastProvisionedVersion","approvedAt","suspendedAt","revokedAt","latestProvisioning","createdAt","updatedAt"]}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/api-partners/provisioning/{operationId}/retry":{"post":{"summary":"Retry a failed partner provisioning operation","tags":["Admin","API Partners"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"operationId","in":"path"}],"responses":{"200":{"description":"Operation queued for retry","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"applicationId":{"type":"string"},"action":{"type":"string","enum":["UPSERT","SUSPEND","REVOKE","ROTATE_SECRET"]},"status":{"type":"string","enum":["PENDING","PROCESSING","SUCCEEDED","FAILED"]},"targetVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true},"attempts":{"type":"integer","minimum":0},"nextAttemptAt":{"type":"string","format":"date-time"},"lastError":{"type":"string","nullable":true}},"required":["id","applicationId","action","status","targetVersion","attempts","nextAttemptAt","lastError"]}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/api-partners/marketplace-projections/{operationId}/retry":{"post":{"summary":"Retry a failed marketplace projection","tags":["Admin","API Partners"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"operationId","in":"path"}],"responses":{"200":{"description":"Marketplace projection queued for retry","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"projectionType":{"type":"string","enum":["PARTNER_ORGANIZATION","USER_WALLET"]},"action":{"type":"string","enum":["UPSERT","DISABLE"]},"aggregateId":{"type":"string"},"targetVersion":{"type":"integer","minimum":0,"exclusiveMinimum":true},"organizationId":{"type":"string","nullable":true},"walletId":{"type":"string","nullable":true},"status":{"type":"string","enum":["PENDING","PROCESSING","SUCCEEDED","FAILED"]},"attempts":{"type":"integer","minimum":0},"nextAttemptAt":{"type":"string","format":"date-time"},"lastAttemptAt":{"type":"string","nullable":true,"format":"date-time"},"completedAt":{"type":"string","nullable":true,"format":"date-time"},"lastError":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","projectionType","action","aggregateId","targetVersion","organizationId","walletId","status","attempts","nextAttemptAt","lastAttemptAt","completedAt","lastError","createdAt","updatedAt"]}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/privacy/readiness":{"get":{"summary":"Inspect account-erasure rehearsal configuration","description":"Returns dependency readiness and worker/gate metadata only; URLs, credentials, identifiers, and stored data are never exposed. Marketplace readiness includes an authenticated downstream database probe.","tags":["Admin Privacy"],"responses":{"200":{"description":"Privacy erasure and retention configuration readiness","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"erasureWorkerEnabled":{"type":"boolean","enum":[true]},"erasurePollMs":{"type":"integer","minimum":0,"exclusiveMinimum":true},"retentionDryRunAvailable":{"type":"boolean","enum":[true]},"retentionEnforcementEnabled":{"type":"boolean"},"retentionPurgeIntervalMs":{"type":"integer","minimum":0,"exclusiveMinimum":true},"dependencies":{"type":"object","properties":{"identityProviderConfigured":{"type":"boolean"},"marketplaceConfigured":{"type":"boolean"},"marketplaceAvailable":{"type":"boolean"},"langGraphConfigured":{"type":"boolean"},"storageConfigured":{"type":"boolean"}},"required":["identityProviderConfigured","marketplaceConfigured","marketplaceAvailable","langGraphConfigured","storageConfigured"]},"blockingDependencies":{"type":"array","items":{"type":"string","enum":["IDENTITY_PROVIDER","MARKETPLACE","LANGGRAPH","STORAGE"]}},"fullRehearsalConfigurationReady":{"type":"boolean"}},"required":["erasureWorkerEnabled","erasurePollMs","retentionDryRunAvailable","retentionEnforcementEnabled","retentionPurgeIntervalMs","dependencies","blockingDependencies","fullRehearsalConfigurationReady"]}},"required":["success","data"]}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/privacy/account-erasures":{"get":{"summary":"List durable account-erasure requests","description":"Returns pseudonymous stage and retry metadata only; captured object and downstream identifiers are never exposed.","tags":["Admin Privacy"],"parameters":[{"schema":{"type":"string","default":"1","description":"Page number (1-indexed)","example":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","default":"20","description":"Number of items per page (max 100)","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["PENDING","PROCESSING","RETRYABLE_FAILURE","BLOCKED","COMPLETED"]},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Account-erasure reconciliation queue","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountErasureSummary"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["success","data","meta"]}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/privacy/account-erasures/{requestId}/retry":{"post":{"summary":"Retry a blocked or failed account erasure","tags":["Admin Privacy"],"parameters":[{"schema":{"type":"string","minLength":1,"example":"cm123erasure"},"required":true,"name":"requestId","in":"path"}],"responses":{"200":{"description":"Account erasure queued for retry","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/AccountErasureSummary"}},"required":["success","data"]}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Account erasure not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Account erasure is not retryable or remains under legal hold","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/privacy/retention/purge":{"post":{"summary":"Reconcile or enforce approved retention schedules","description":"Defaults to dry-run and reports eligible, held, and purged aggregate counts without returning record contents.","tags":["Admin Privacy"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dryRun":{"type":"boolean","default":true,"description":"When true, return reconciliation counts without deleting records","example":true}}}}}},"responses":{"200":{"description":"Retention reconciliation metrics","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"dryRun":{"type":"boolean"},"runAt":{"type":"string","format":"date-time"},"metrics":{"type":"array","items":{"type":"object","properties":{"dataset":{"type":"string","enum":["USER_API_USAGE","PARTNER_DATA_ACCESS","PARTNER_CONSENT_AUDIT","WALLET_CHALLENGE","MARKETPLACE_PROJECTION","COMPLETED_ERASURE_RECORD"]},"retentionDays":{"type":"integer","minimum":0,"exclusiveMinimum":true},"cutoff":{"type":"string","format":"date-time"},"eligible":{"type":"integer","minimum":0},"held":{"type":"integer","minimum":0},"purged":{"type":"integer","minimum":0}},"required":["dataset","retentionDays","cutoff","eligible","held","purged"]}},"totalEligible":{"type":"integer","minimum":0},"totalHeld":{"type":"integer","minimum":0},"totalPurged":{"type":"integer","minimum":0}},"required":["dryRun","runAt","metrics","totalEligible","totalHeld","totalPurged"]}},"required":["success","data"]}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Destructive retention enforcement is not approved or enabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/privacy/retention/exceptions":{"get":{"summary":"List approved retention exceptions","description":"Returns pseudonymous subject digests and bounded approval metadata only.","tags":["Admin Privacy"],"parameters":[{"schema":{"type":"string","default":"1","description":"Page number (1-indexed)","example":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","default":"20","description":"Number of items per page (max 100)","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":"false"},"required":false,"name":"includeReleased","in":"query"}],"responses":{"200":{"description":"Approved retention exceptions","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"dataset":{"type":"string","enum":["ACCOUNT_ERASURE","USER_API_USAGE","PARTNER_DATA_ACCESS","PARTNER_CONSENT_AUDIT","WALLET_CHALLENGE","MARKETPLACE_PROJECTION","COMPLETED_ERASURE_RECORD"]},"resourceId":{"type":"string","nullable":true},"subjectDigest":{"type":"string","nullable":true,"minLength":64,"maxLength":64},"reasonCode":{"type":"string"},"approvalReference":{"type":"string"},"approvedBy":{"type":"string"},"expiresAt":{"type":"string","nullable":true,"format":"date-time"},"releasedAt":{"type":"string","nullable":true,"format":"date-time"},"releasedBy":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","dataset","resourceId","subjectDigest","reasonCode","approvalReference","approvedBy","expiresAt","releasedAt","releasedBy","createdAt"]}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["success","data","meta"]}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create an approved retention exception","description":"Requires an external approval reference and stores no payload, contact value, or free-form note.","tags":["Admin Privacy"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dataset":{"type":"string","enum":["ACCOUNT_ERASURE","USER_API_USAGE","PARTNER_DATA_ACCESS","PARTNER_CONSENT_AUDIT","WALLET_CHALLENGE","MARKETPLACE_PROJECTION","COMPLETED_ERASURE_RECORD"]},"resourceId":{"type":"string","minLength":1,"maxLength":255},"subjectUserId":{"type":"string","minLength":1,"maxLength":255},"reasonCode":{"type":"string","pattern":"^[A-Z][A-Z0-9_:-]{0,63}$"},"approvalReference":{"type":"string","minLength":1,"maxLength":255},"expiresAt":{"type":"string","format":"date-time"}},"required":["dataset","reasonCode","approvalReference"]}}}},"responses":{"201":{"description":"Retention exception created","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"dataset":{"type":"string","enum":["ACCOUNT_ERASURE","USER_API_USAGE","PARTNER_DATA_ACCESS","PARTNER_CONSENT_AUDIT","WALLET_CHALLENGE","MARKETPLACE_PROJECTION","COMPLETED_ERASURE_RECORD"]},"resourceId":{"type":"string","nullable":true},"subjectDigest":{"type":"string","nullable":true,"minLength":64,"maxLength":64},"reasonCode":{"type":"string"},"approvalReference":{"type":"string"},"approvedBy":{"type":"string"},"expiresAt":{"type":"string","nullable":true,"format":"date-time"},"releasedAt":{"type":"string","nullable":true,"format":"date-time"},"releasedBy":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","dataset","resourceId","subjectDigest","reasonCode","approvalReference","approvedBy","expiresAt","releasedAt","releasedBy","createdAt"]}},"required":["success","data"]}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/privacy/retention/exceptions/{exceptionId}/release":{"post":{"summary":"Release an approved retention exception","tags":["Admin Privacy"],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"exceptionId","in":"path"}],"responses":{"200":{"description":"Retention exception released","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"dataset":{"type":"string","enum":["ACCOUNT_ERASURE","USER_API_USAGE","PARTNER_DATA_ACCESS","PARTNER_CONSENT_AUDIT","WALLET_CHALLENGE","MARKETPLACE_PROJECTION","COMPLETED_ERASURE_RECORD"]},"resourceId":{"type":"string","nullable":true},"subjectDigest":{"type":"string","nullable":true,"minLength":64,"maxLength":64},"reasonCode":{"type":"string"},"approvalReference":{"type":"string"},"approvedBy":{"type":"string"},"expiresAt":{"type":"string","nullable":true,"format":"date-time"},"releasedAt":{"type":"string","nullable":true,"format":"date-time"},"releasedBy":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"}},"required":["id","dataset","resourceId","subjectDigest","reasonCode","approvalReference","approvedBy","expiresAt","releasedAt","releasedBy","createdAt"]}},"required":["success","data"]}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/users":{"get":{"summary":"List all users (paginated)","description":"Retrieves a paginated list of all users. Only accessible by admins. Supports database-backed search by name, email, phone number, or user ID. Does not include all user relations for performance.","tags":["Admin"],"parameters":[{"schema":{"type":"string","default":"1","description":"Page number (1-indexed)","example":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","default":"20","description":"Number of items per page (max 100)","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Search users by name, email, phone number, or user ID","example":"Helen"},"required":false,"name":"search","in":"query"}],"responses":{"200":{"description":"Paginated list of users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserListResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to list users"}}}}}}},"/admin/user-api-usage":{"get":{"summary":"List private user API usage events","description":"Retrieves a paginated event log of successful private /user-api requests. Only accessible by admins.","tags":["Admin"],"parameters":[{"schema":{"type":"string","default":"1","description":"Page number (1-indexed)","example":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","default":"20","description":"Number of items per page (max 100)","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Search usage events by user name, email, phone number, or user ID","example":"Helen"},"required":false,"name":"search","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter usage events to a specific user ID","example":"cm39abc123xyz"},"required":false,"name":"userId","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Filter usage events by exact endpoint path","example":"/user-api/bios/latest"},"required":false,"name":"path","in":"query"}],"responses":{"200":{"description":"Paginated list of private user API usage events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserApiUsageResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to list user API usage events"}}}}}}},"/admin/users/{userId}":{"get":{"summary":"Get user details","description":"Retrieves detailed information about a specific user including traits, relationships, profile, compatibilities, bios, chats, and data connections. Only accessible by admins.","tags":["Admin"],"parameters":[{"schema":{"type":"string","description":"User ID","example":"cm39abc123xyz"},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"Detailed user information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserDetailResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"User not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to get user details"}}}}}},"delete":{"summary":"Delete a user","description":"Permanently deletes a user and all associated data (profile, traits, relationships, messages, etc.). This action cannot be undone. Users can delete their own account; admins can delete any user. Useful for test cleanup.","tags":["Admin"],"parameters":[{"schema":{"type":"string","description":"User ID","example":"cm39abc123xyz"},"required":true,"name":"userId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteUserBody"}}}},"responses":{"202":{"description":"User access disabled and durable account erasure scheduled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteUserResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin and not deleting own account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"User not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to delete user"}}}}}}},"/admin/support-chats":{"get":{"summary":"List all chat conversations (paginated)","description":"Retrieves a paginated list of all chat threads that appear in users' conversation lists, including Cupid, support, and direct-message chats. Only accessible by admins. Supports sorting, filtering by chat type, and searching by participant name, email, phone number, or user ID.","tags":["Admin"],"parameters":[{"schema":{"type":"string","default":"1","description":"Page number (1-indexed)","example":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","default":"20","description":"Number of items per page (max 100)","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["latest_user_message","latest_support_message","updated_at"],"default":"updated_at","description":"Sort by: latest_user_message (chats with newest user messages first), latest_support_message (chats with newest bot/support messages first), updated_at (default, most recently updated first)","example":"latest_user_message"},"required":false,"name":"sortBy","in":"query"},{"schema":{"type":"string","enum":["all","support","cupid","dm"],"default":"all","description":"Filter conversations by type: all (default), support, cupid (solo Cupid chat), or dm (direct-message chats)","example":"support"},"required":false,"name":"chatType","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Search conversations by participant name, email, phone number, or user ID","example":"Helen"},"required":false,"name":"search","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter conversations to a specific participant user ID","example":"cm39abc123xyz"},"required":false,"name":"userId","in":"query"}],"responses":{"200":{"description":"Paginated list of chat conversations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSupportChatListResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to list support chats"}}}}}}},"/admin/support-chats/{threadId}":{"get":{"summary":"Get chat conversation messages","description":"Retrieves all messages in a specific chat thread. Only accessible by admins.","tags":["Admin"],"parameters":[{"schema":{"type":"string","description":"Thread ID","example":"cm39thread123"},"required":true,"name":"threadId","in":"path"}],"responses":{"200":{"description":"Chat thread with messages","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSupportChatDetailResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"404":{"description":"Chat thread not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Chat thread not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to get chat messages"}}}}}}},"/admin/support-chats/{threadId}/messages":{"post":{"summary":"Send a support message","description":"Sends a message in a support chat thread as support staff. Only accessible by admins.","tags":["Admin"],"parameters":[{"schema":{"type":"string","description":"Thread ID","example":"cm39thread123"},"required":true,"name":"threadId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSendSupportMessageBody"}}}},"responses":{"200":{"description":"Support message sent successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSendSupportMessageResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"404":{"description":"Support chat thread not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Support chat thread not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to send support message"}}}}}}},"/admin/generation-history/recent":{"get":{"summary":"Get recent generations across all users","description":"Retrieves the most recent generation audit logs across all users. Useful for monitoring system-wide generation activity.","tags":["Admin"],"parameters":[{"schema":{"type":"string","enum":["BIO","TRAITS","COMPATIBILITY","RELATIONSHIP"],"description":"Filter by generation type","example":"BIO"},"required":false,"name":"generationType","in":"query"},{"schema":{"type":"string","default":"50","description":"Number of items to return (max 100)","example":"50"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0","description":"Number of items to skip for pagination","example":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Recent generations retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecentGenerationsResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to get recent generations"}}}}}}},"/admin/users/{userId}/generation-history":{"get":{"summary":"Get generation history for a user","description":"Retrieves the generation audit log for a user, showing all bio, trait, and compatibility generations with reasoning and metadata.","tags":["Admin"],"parameters":[{"schema":{"type":"string","description":"User ID","example":"cm39abc123xyz"},"required":true,"name":"userId","in":"path"},{"schema":{"type":"string","enum":["BIO","TRAITS","COMPATIBILITY","RELATIONSHIP"],"description":"Filter by generation type","example":"BIO"},"required":false,"name":"generationType","in":"query"},{"schema":{"type":"string","default":"50","description":"Number of items to return (max 100)","example":"50"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","default":"0","description":"Number of items to skip for pagination","example":"0"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Generation history retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerationHistoryResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"User not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to get generation history"}}}}}}},"/admin/users/{userId}/generation-stats":{"get":{"summary":"Get generation statistics for a user","description":"Retrieves aggregated statistics about all generations for a user, including counts and latest versions.","tags":["Admin"],"parameters":[{"schema":{"type":"string","description":"User ID","example":"cm39abc123xyz"},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"Generation stats retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerationStatsResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"User not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to get generation stats"}}}}}}},"/admin/users/{userId}/traits/{traitId}/evidence":{"get":{"summary":"Get trait evidence details","description":"Retrieves detailed evidence for a specific user trait, showing which data sources contributed to the trait extraction.","tags":["Admin"],"parameters":[{"schema":{"type":"string","description":"User ID","example":"cm39abc123xyz"},"required":true,"name":"userId","in":"path"},{"schema":{"type":"string","description":"Trait ID","example":"cm39trait123"},"required":true,"name":"traitId","in":"path"}],"responses":{"200":{"description":"Trait evidence retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraitEvidenceResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"404":{"description":"Trait not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Trait not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to get trait evidence"}}}}}}},"/admin/users/{userId}/reset":{"post":{"summary":"Reset a user to fresh state","description":"Resets a user to 'just signed up' state — deletes all traits, bios, data connections, matches, relationships, chat history, live activity, profile pictures, etc. Keeps User record, UserProfile, and UserSettings intact. Only accessible by admins. Useful for testing and debugging.","tags":["Admin"],"parameters":[{"schema":{"type":"string","description":"User ID","example":"cm39abc123xyz"},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"User reset successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetUserResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"User not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to reset user"}}}}}}},"/admin/users/{userId}/superadmin-view-requirement":{"patch":{"summary":"Update whether a user requires superadmin to view","description":"Marks or unmarks a user as requiring superadmin access to view in admin user and conversation surfaces. Only accessible by superadmins.","tags":["Admin"],"parameters":[{"schema":{"type":"string","description":"User ID","example":"cm39abc123xyz"},"required":true,"name":"userId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserSuperadminViewRequirementBody"}}}},"responses":{"200":{"description":"User visibility requirement updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserSuperadminViewRequirementResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not a superadmin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Superadmin access required"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"User not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to update user visibility requirement"}}}}}}},"/admin/users/{userId}/matchmaker-role":{"post":{"summary":"Update a user's matchmaker role","description":"Whitelists or unsets a non-admin user as a matchmaker by updating their role. Only accessible by admins.","tags":["Admin"],"parameters":[{"schema":{"type":"string","description":"User ID","example":"cm39abc123xyz"},"required":true,"name":"userId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserMatchmakerRoleBody"}}}},"responses":{"200":{"description":"User matchmaker role updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserMatchmakerRoleResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin or target user cannot be converted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"User not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to update user matchmaker role"}}}}}}},"/admin/reports":{"get":{"summary":"List user reports (paginated)","description":"Retrieves a paginated list of user reports. Can filter by resolved status. Only accessible by admins.","tags":["Admin"],"parameters":[{"schema":{"type":"string","default":"1","example":"1"},"required":false,"name":"page","in":"query"},{"schema":{"type":"string","default":"20","example":"20"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Filter by resolved status","example":"false"},"required":false,"name":"resolved","in":"query"}],"responses":{"200":{"description":"Paginated list of reports","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReportsResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to list reports"}}}}}}},"/admin/reports/{reportId}/resolve":{"post":{"summary":"Resolve a user report","description":"Mark a user report as resolved. Only accessible by admins.","tags":["Admin"],"parameters":[{"schema":{"type":"string","description":"The ID of the report"},"required":true,"name":"reportId","in":"path"}],"responses":{"200":{"description":"Report resolved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminResolveReportResponse"}}}},"401":{"description":"Unauthorized - not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Unauthorized"}}}},"403":{"description":"Forbidden - not an admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Forbidden: Admin access required"}}}},"404":{"description":"Report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Report not found"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to resolve report"}}}}}}},"/api-partner/organizations":{"post":{"summary":"Register an API-partner organization","description":"Creates a review-pending organization for an authenticated operator with an active verified wallet.","tags":["API Partners"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiPartnerOrganization"}}}},"responses":{"201":{"description":"Organization registered","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/ApiPartnerOrganization"}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"summary":"List current operator organizations","tags":["API Partners"],"responses":{"200":{"description":"Accessible organizations","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiPartnerOrganization"}}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api-partner/organizations/{organizationId}":{"get":{"summary":"Get an operator organization and applications","tags":["API Partners"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"organizationId","in":"path"}],"responses":{"200":{"description":"Organization detail","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/ApiPartnerOrganization"},"applications":{"type":"array","items":{"$ref":"#/components/schemas/ApiPartnerApplication"}}},"required":["organization","applications"]}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update an API-partner organization","description":"A business-name change to an active organization requires new review and immediately suspends its approved applications.","tags":["API Partners"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"organizationId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApiPartnerOrganization"}}}},"responses":{"200":{"description":"Organization updated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/ApiPartnerOrganization"}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api-partner/organizations/{organizationId}/applications":{"post":{"summary":"Register a partner application","description":"Registers exact HTTPS origins and redirects for review. Confidential registration never returns a credential; an approved client uses the separate one-time rotation endpoint.","tags":["API Partners"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"organizationId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiPartnerApplication"}}}},"responses":{"201":{"description":"Application registered","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"application":{"$ref":"#/components/schemas/ApiPartnerApplication"},"clientSecret":{"type":"string","nullable":true,"description":"Always null at registration. Confidential credentials are delivered once only after approval through the rotation endpoint."}},"required":["application","clientSecret"]}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"summary":"List partner applications","tags":["API Partners"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"organizationId","in":"path"}],"responses":{"200":{"description":"Applications","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiPartnerApplication"}}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api-partner/organizations/{organizationId}/applications/{applicationId}":{"get":{"summary":"Get a partner application","tags":["API Partners"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"organizationId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"applicationId","in":"path"}],"responses":{"200":{"description":"Application","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/ApiPartnerApplication"}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update and resubmit a partner application","description":"A material update clears prior approvals and blocks authorization until reviewed and provisioned again.","tags":["API Partners"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"organizationId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"applicationId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApiPartnerApplication"}}}},"responses":{"200":{"description":"Application updated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/ApiPartnerApplication"}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api-partner/organizations/{organizationId}/applications/{applicationId}/secret/rotate":{"post":{"summary":"Rotate a confidential client secret","description":"Synchronously updates the authorization server, stores only display metadata and a slow hash, and returns the new credential exactly once. Provisioning must be enabled.","tags":["API Partners"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"organizationId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"applicationId","in":"path"}],"responses":{"200":{"description":"Secret rotated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"application":{"$ref":"#/components/schemas/ApiPartnerApplication"},"clientSecret":{"type":"string","description":"One-time confidential credential. It cannot be recovered after this response."}},"required":["application","clientSecret"]}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api-partner/organizations/{organizationId}/applications/{applicationId}/suspend":{"post":{"summary":"Suspend a partner application","tags":["API Partners"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"organizationId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"applicationId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmApiPartnerAction"}}}},"responses":{"200":{"description":"Application lifecycle updated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/ApiPartnerApplication"}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api-partner/organizations/{organizationId}/applications/{applicationId}/revoke":{"post":{"summary":"Permanently revoke a partner application","tags":["API Partners"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"organizationId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"applicationId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmApiPartnerAction"}}}},"responses":{"200":{"description":"Application lifecycle updated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/ApiPartnerApplication"}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api-partner/organizations/{organizationId}/applications/{applicationId}/resume":{"post":{"summary":"Resubmit a suspended application for review","tags":["API Partners"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"organizationId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"applicationId","in":"path"}],"responses":{"200":{"description":"Application resubmitted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"$ref":"#/components/schemas/ApiPartnerApplication"}},"required":["success","data"]}}}},"400":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/oauth/partner/login":{"get":{"summary":"Load a hosted partner login interaction","description":"Validates an Ory login challenge against Dataing's current approved application registry. The challenge is credential-like and must not be logged.","tags":["Partner OAuth Interactions"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":2048},"required":true,"name":"login_challenge","in":"query"}],"responses":{"200":{"description":"Verified login interaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthLoginResponse"}}}},"400":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"401":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"403":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"409":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"429":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"503":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}}}}},"/oauth/partner/login/accept":{"post":{"summary":"Accept a hosted partner login interaction","description":"Requires a managed first-party Ory session and accepts the private Ory challenge with the same Dataing-managed pairwise value as both subject identifiers.","tags":["Partner OAuth Interactions"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthLoginChallengeBody"}}}},"responses":{"200":{"description":"Approved Ory continuation URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthRedirectResponse"}}}},"400":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"401":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"403":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"409":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"429":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"503":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}}}}},"/oauth/partner/login/reject":{"post":{"summary":"Cancel a hosted partner login interaction","tags":["Partner OAuth Interactions"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthLoginChallengeBody"}}}},"responses":{"200":{"description":"Rejected Ory continuation URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthRedirectResponse"}}}},"400":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"401":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"403":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"409":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"429":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"503":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}}}}},"/oauth/partner/consent":{"get":{"summary":"Load a hosted partner consent interaction","description":"Requires the managed account whose pairwise subject was accepted during the corresponding login interaction.","tags":["Partner OAuth Interactions"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":2048},"required":true,"name":"consent_challenge","in":"query"}],"responses":{"200":{"description":"Verified consent interaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthConsentResponse"}}}},"400":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"401":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"403":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"409":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"429":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"503":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}}}}},"/oauth/partner/consent/preview":{"post":{"summary":"Render authoritative partner consent copy","description":"Returns the exact server-authored, versioned consent document and digest for the selected scopes and independent capabilities.","tags":["Partner OAuth Interactions"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthConsentPreviewBody"}}}},"responses":{"200":{"description":"Exact consent document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthConsentPreviewResponse"}}}},"400":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"401":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"403":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"409":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"429":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"503":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}}}}},"/oauth/partner/consent/accept":{"post":{"summary":"Accept a hosted partner consent interaction","description":"Revalidates the one-time Ory challenge and consent digest, commits the authoritative Dataing grant, and only then accepts the provider challenge.","tags":["Partner OAuth Interactions"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthConsentAcceptBody"}}}},"responses":{"200":{"description":"Approved Ory continuation URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthRedirectResponse"}}}},"400":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"401":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"403":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"409":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"429":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"503":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}}}}},"/oauth/partner/consent/reject":{"post":{"summary":"Decline a hosted partner consent interaction","tags":["Partner OAuth Interactions"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthConsentChallengeBody"}}}},"responses":{"200":{"description":"Rejected Ory continuation URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthRedirectResponse"}}}},"400":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"401":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"403":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"409":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"429":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}},"503":{"description":"Interaction rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthInteractionErrorResponse"}}}}}}},"/partner/oauth/operator-access":{"get":{"summary":"Verify partner organization operator access","description":"Verifies that the signed-in Dataing user is an active OWNER or ADMIN of the organization that owns the exact partner OAuth application. Returns only the pairwise subject and application-bound operator role.","security":[{"PartnerBearer":[]}],"tags":["Partner OAuth Resources"],"responses":{"200":{"description":"Application-bound operator access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOperatorAccessResponse"}}}},"401":{"description":"Partner operator verification failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOperatorAccessErrorResponse"}}}},"403":{"description":"Partner operator verification failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOperatorAccessErrorResponse"}}}},"429":{"description":"Partner operator verification failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOperatorAccessErrorResponse"}}}},"503":{"description":"Partner operator verification failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOperatorAccessErrorResponse"}}}}}}},"/partner/oauth/userinfo":{"get":{"summary":"Read scoped partner user information","description":"Validates an opaque partner access token against the distinct partner issuer and audience, then rechecks the current app, grant, scopes, preferences, and authoritative wallet state. Returns no global Dataing user identifier or private profile payload.","security":[{"PartnerBearer":[]}],"tags":["Partner OAuth Resources"],"responses":{"200":{"description":"Scope-filtered partner claims","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerUserinfoResponse"}}}},"401":{"description":"Partner resource request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerUserinfoErrorResponse"}}}},"403":{"description":"Partner resource request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerUserinfoErrorResponse"}}}},"429":{"description":"Partner resource request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerUserinfoErrorResponse"}}}},"503":{"description":"Partner resource request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerUserinfoErrorResponse"}}}}}}},"/internal/ory/sms":{"post":{"summary":"Deliver an Ory identity SMS","description":"Secret-authenticated courier bridge for the self-hosted Ory task. Recipient and message bodies are never logged.","tags":["Internal"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"recipient":{"type":"string","minLength":8,"maxLength":32},"body":{"type":"string","minLength":1,"maxLength":480},"templateType":{"type":"string","enum":["login_code_valid","registration_code_valid","recovery_code_valid","verification_code_valid"]}},"required":["recipient","body","templateType"]}}}},"responses":{"202":{"description":"Accepted by the SMS provider","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success"]}}}},"401":{"description":"Invalid courier credential","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success"]}}}},"404":{"description":"Courier is disabled","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success"]}}}},"429":{"description":"Destination rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success"]}}}},"502":{"description":"SMS provider rejected delivery","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success"]}}}},"503":{"description":"Abuse protection unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success"]}}}}}}},"/internal/ory/registration":{"post":{"summary":"Provision or confirm a Dataing user for an Ory identity","description":"Secret-authenticated registration/login hook. It stores Ory's immutable subject, allows freshly code-proved phone accounts to link once, and never treats an email trait as proof of an existing Google account.","tags":["Internal"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"identityId":{"type":"string","format":"uuid"},"traits":{"type":"object","properties":{"phone":{"type":"string","minLength":8,"maxLength":32},"email":{"type":"string","maxLength":320,"format":"email"},"name":{"type":"string","minLength":1,"maxLength":120},"acceptedPrivacyPolicy":{"type":"boolean","enum":[true]},"acceptedAiDataPolicy":{"type":"boolean","enum":[true]}},"required":["acceptedPrivacyPolicy","acceptedAiDataPolicy"]}},"required":["identityId","traits"]}}}},"responses":{"200":{"description":"Identity mapped","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success"]}}}},"401":{"description":"Invalid hook credential","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success"]}}}},"404":{"description":"Hook is disabled","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success"]}}}},"409":{"description":"Identity or account conflict","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success"]}}}},"503":{"description":"Provisioning unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success"]}}}}}}},"/sse/events":{"get":{"summary":"Stream real-time events (SSE)","description":"Establishes an SSE connection for real-time updates. Must be called via Lambda Function URL, not API Gateway. Returns chat messages, context updates, and other real-time events.","tags":["SSE Streaming"],"responses":{"200":{"description":"SSE stream of real-time events","content":{"text/event-stream":{"schema":{"type":"string","description":"Server-Sent Events stream with event types and JSON data payloads","example":"retry: 5000\n\nevent: connected\ndata: {}\n\nid: msg-123\nevent: message\ndata: {\"content\":\"Hello world\"}\n\n"}}}},"401":{"description":"Unauthorized - valid session required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/sse/test":{"get":{"summary":"Test streaming endpoint","description":"A simple test endpoint that streams numbered chunks. Use to verify Lambda Function URL streaming is working correctly.","tags":["SSE Streaming"],"responses":{"200":{"description":"Streaming text response with numbered chunks","content":{"text/plain":{"schema":{"type":"string","description":"Plain text streaming response for testing","example":"chunk 1\nchunk 2\nchunk 3\n..."}}}}}}},"/sse/health":{"get":{"summary":"SSE endpoint health check","description":"Returns health status of the SSE streaming endpoint","tags":["SSE Streaming"],"responses":{"200":{"description":"Health status","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"streaming":{"type":"boolean"},"timestamp":{"type":"string"}},"required":["status","streaming","timestamp"]}}}}}}},"/waitlist/count":{"get":{"summary":"Get waitlist count","description":"Returns the total number of users currently on the waitlist","tags":["Waitlist"],"responses":{"200":{"description":"Waitlist count retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"count":{"type":"number","example":42}},"required":["count"]}},"required":["success","data"]},"example":{"success":true,"data":{"count":42}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"success":false,"message":"Failed to retrieve waitlist count"}}}}}}}}}