Mutations
All mutations are sent as POST /graphql with the operation in the request body. Mutations return a { success, errors } shape or a payload type containing the affected resource. Include the Clerk JWT in the SessionToken header.
← Back to GraphQL API Reference
acceptAllyInvite
Accepts an accountability-partner invite by token. Creates or upgrades the relationship to an accepted partnership.
Returns: AcceptAllyInvitePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
inviteToken | String! | Yes | Token from the invite deep link. |
acceptAllyRequest
Accepts a pending ally request.
Returns: AcceptAllyRequestPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
requestId | ID! | Yes | public_id of the UserAlly record (the pending request) to accept. |
acceptHabitIntegrationMapping
Accepts a proposed (or manual) mapping from a connected provider activity type to a habit.
Returns: AcceptHabitIntegrationMappingPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
confidenceScore | Float | No | Score from the auto-mapping engine, if any. |
goalId | ID! | Yes | public_id of the habit to map the activity type to. |
integrationConnectionId | ID! | Yes | public_id of the connection being mapped. |
providerActivityType | String! | Yes | e.g. "Strava.run", "Chess.com.game". |
acceptPaceSuggestion
Applies a pace suggestion's computed target date to the goal (one-tap accept).
Returns: AcceptPaceSuggestionPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
goalId | ID! | Yes | public_id of the goal the suggestion targets. |
acceptPartnerRequest
Accepts a pending accountability partner request from an ally.
Returns: AcceptPartnerRequestPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
allyPublicId | ID! | Yes | public_id of the ally whose partner request to accept. |
acceptStreakMercy
Accepts the Streak Mercy offer — backfills system-granted freeze completions for all missed days to genuinely restore the habit streak, then marks the offer consumed.
Returns: AcceptStreakMercyPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
goalId | ID! | Yes | public_id of the habit goal to restore. |
acceptTeamInvite
Called by the invitee once they are signed up and authenticated. No team-scoped authorization — the accepting user has no membership yet.
Returns: AcceptTeamInvitePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
code | String! | Yes | — |
acknowledgeAction
Marks a gamification action as acknowledged, clearing it from the user action queue.
Returns: AcknowledgeActionPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Yes | The public ID of the user action to acknowledge. |
acknowledgeAllNotifications
Marks every unread notification as acknowledged for the authenticated user, optionally scoped to a single team (mirrors notificationHistory's teamId).
Returns: AcknowledgeAllNotificationsPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | ID | No | Scope to one team's notifications instead of the whole inbox. |
acknowledgeCollectiveGoalPrivacyContract
First-time-only server-side acknowledgment of TeamPrivacyContractView (N18/GOALS-16). Persists in UserAction, never localStorage. Gated by the teams_collective_goals kill switch.
Returns: AcknowledgeCollectiveGoalPrivacyContractPayload! (↗)
acknowledgeNotification
Marks a notification as acknowledged (read/dismissed) for the authenticated user.
Returns: AcknowledgeNotificationPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Yes | The public ID of the notification to acknowledge. |
addCommunitySuggestion
Submits a suggestion for a new community topic or interest area.
Returns: AddCommunitySuggestionPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
content | String! | Yes | A description of the suggested community topic or interest area. |
goalCategoryId | ID | No | Optional public ID of a goal category to associate with the suggestion. |
goalTypeId | ID | No | Optional public ID of a goal type that best represents the suggested community. |
addGoal
Creates a new goal for the authenticated user.
Returns: AddGoalPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
appLink | String | No | External app URL (https:// or a custom app scheme, e.g. duolingo://) opened on check-in for one-click redirect to another app. |
content | String | No | Optional longer description or motivation note. |
daysToUpdate | Int | No | How frequently in days the user plans to log progress. |
durationMinutes | Int | No | Optional time-per-session in minutes for habits. |
file | Upload (↗) | No | Cover image file upload. Takes precedence over image_url when provided. |
fromTemplateId | ID | No | public_id of the GoalTemplate this goal is created from. Triggers milestone creation and goal_created_from_template telemetry. |
goalCategoryId | ID | No | ID of the goal category (fitness, learning, etc.). Fetch options via goalCategories query. |
goalTypeId | ID | No | ID of the goal type (habit, milestone, quantity). Fetch options via goalKinds query. |
identityPrompt | String | No | Optional free-text identity framing (e.g. "Who you're becoming"). Personalizes Coach messaging when present. Max 240 chars. |
imageUrl | String | No | URL of a cover image for the goal. |
lifeArea | String | No | The area of life this goal belongs to (e.g. career, health). |
milestones | [MilestoneInput!] (↗) | No | Ordered milestone steps to create atomically with the goal. Consumed when fromTemplateId is present. |
name | String! | Yes | Display name of the goal (e.g. "Run a 5K"). |
parentGoalId | ID | No | public_id of a parent goal to nest this under as a milestone. |
pastAttemptContext | String | No | Optional free-text context on a prior attempt at this goal. Personalizes Coach messaging when present. Max 200 chars. |
private | Boolean | No | Deprecated; use visibility. When true, the goal is visible only to the owner. Defaults to false. |
recurrenceDays | [String!] | No | Days for weekly/custom_days recurrence (e.g. ["mon", "wed", "fri"]). |
recurrenceInterval | Int | No | Number of days between check-ins for interval recurrence. |
recurrenceType | String | No | Recurrence pattern for habits: daily, weekly, custom_days, or interval. |
targetDate | String | No | ISO date string for the target completion date (e.g. "2026-12-31"). |
visibility | GoalVisibilityEnum (↗) | No | Who can see the goal. Wins over private when both are sent. |
addGoalEvent
Logs a progress event for a goal. Each event is immutable once created.
Returns: AddGoalEventPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
clientEventId | String | No | Client-generated UUID for idempotent retry of offline-queued events. Repeat calls with the same client_event_id return the original event. |
clientTimestamp | String | No | ISO-8601 local timestamp when the event actually occurred. Used as effective time for streak calculation. |
content | String! | Yes | The progress update text describing what was accomplished. |
file | Upload (↗) | No | Image file upload. Takes precedence over image_url when provided. |
goalId | ID! | Yes | public_id of the goal this progress event belongs to. |
imageUrl | String | No | Optional URL of an image to attach to the progress event. |
mood | String | No | Optional mood at the time of logging (e.g. amazing, happy, calm, meh, tired, low). |
addGoalEventComment
Adds a comment to a goal progress event.
Returns: AddGoalEventCommentPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
content | String | No | The text body of the comment. |
goalEventId | ID! | Yes | public_id of the goal event to comment on. |
addGoalToCommunity
Shares an existing goal into a community feed.
Returns: AddGoalToCommunityPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
communityId | ID! | Yes | public_id of the community to share the goal into. |
goalId | ID! | Yes | public_id of the goal to share into the community. |
addMoodLog
Records a mood check-in for the authenticated user. Mood options: amazing, happy, calm, meh, tired, low.
Returns: AddMoodLogPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
goalId | ID | No | Optional public ID of a goal to associate with this mood check-in. |
mood | String! | Yes | The mood value for this check-in. Accepted values: amazing, happy, calm, meh, tired, low. |
note | String | No | An optional free-text note accompanying the mood entry (max 300 characters). |
addPostComment
Adds a comment to a community post.
Returns: AddPostCommentPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
content | String! | Yes | Text content of the comment. |
postId | ID! | Yes | ID of the community post to comment on. |
adjustTeamSeats
Owner-only. Updates a team's seat count.
Returns: AdjustTeamSeatsPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
seatCount | Int! | Yes | — |
teamId | String! | Yes | — |
approveAiArtifact
Approves a pending AI artifact, optionally applying an edited payload.
Returns: ApproveAiArtifactPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
artifactId | String! | Yes | — |
editedPayload | String | No | — |
archiveFeedbackTag
Archives a feedback tag, hiding it from the pickable list without detaching it from posts (admin only).
Returns: ArchiveFeedbackTagPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
tagId | ID! | Yes | Public ID of the feedback tag. |
archiveSubCommunity
Owner/Admin-only. Starts the 30-day read-only archive window for a sub-community.
Returns: ArchiveSubCommunityPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
communityId | String! | Yes | — |
teamId | String! | Yes | — |
beginDataImport
Parses an uploaded goals/habit_completions CSV pair into a staged DataImport preview.
Returns: BeginImportPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
goalsFile | Upload (↗) | No | goals.csv upload. |
habitCompletionsFile | Upload (↗) | No | habit_completions.csv upload. |
blockAlly
Blocks a user, preventing ally requests in either direction.
Returns: BlockAllyPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
targetUserId | ID! | Yes | public_id of the user to block. |
bulkReviewContentFlags
Reviews up to 50 content flags atomically. Requires moderator+ role.
Returns: BulkReviewContentFlagsPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
action | String! | Yes | "approve" or "reject". |
flagIds | [String!]! | Yes | Array of flag public_ids (max 50). |
reason | String! | Yes | Bulk reason (min 3 chars, recorded per flag). |
cancelSupporterSubscription
Cancels the current Supporter subscription at the end of the billing period.
Returns: CancelSupporterSubscriptionPayload! (↗)
cancelTeamSubscription
Owner-only. Cancels a team's subscription.
Returns: CancelTeamSubscriptionPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | String! | Yes | — |
checkInHabit
Records a one-tap check-in for a habit goal.
Returns: CheckInHabitPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
clientEventId | String | No | Client-generated UUID for idempotent retry of offline-queued check-ins. Repeat calls with the same client_event_id return the original completion. |
completedDate | String | No | ISO date string (YYYY-MM-DD) to credit this check-in to, for offline/widget syncs made before the current day. Must be within the last 7 days in the user's timezone; omit to default to today. |
goalId | ID! | Yes | public_id of the habit goal to check in. |
note | String | No | Optional one-sentence journal note for this check-in (max 280 characters). Ignored when the micro_journal_enabled flag is off for the user. |
checkValidUsername
Checks whether a username is available and meets formatting requirements.
Returns: CheckValidUsernamePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
username | String! | Yes | The username to check for availability and format validity. |
claimAiArtifact
Claims a pending AI artifact for the reviewing operator without resolving it.
Returns: ClaimAiArtifactPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
artifactId | String! | Yes | — |
claimStreakInsurance
Claims the Supporter monthly streak insurance benefit, restoring a broken streak with no XP cost.
Returns: ClaimStreakInsurancePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
goalId | ID! | Yes | public_id of the habit goal to restore via insurance. |
commitDataImport
Commits a staged DataImport, creating the imported goals and check-ins asynchronously.
Returns: CommitImportPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Yes | public_id of the staged DataImport to commit. |
skipGoalExternalIds | [String!] | No | external_ids of collision-flagged goal rows to skip. |
completeOnboardingAndCreateGoal
Atomically completes onboarding and creates the first goal.
Returns: CompleteOnboardingAndCreateGoalPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
goalCategoryId | ID | No | — |
goalName | String! | Yes | — |
onboardingAnswers | JSON (↗) | No | — |
connectChessCom
Connects the current user's Chess.com account by username.
Returns: ConnectChessComPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
externalUsername | String! | Yes | Chess.com username to connect. |
connectStrava
Starts the Strava OAuth connect flow. Open the returned URL in an in-app browser.
Returns: ConnectStravaPayload! (↗)
createAllyInvite
Creates a new accountability-partner invite token for the authenticated user.
Returns: CreateAllyInvitePayload! (↗)
createCheckoutSession
Creates a Stripe Checkout session for a Supporter plan. Returns a redirect URL.
Returns: CreateCheckoutSessionPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
amountCents | Int | No | Custom amount in cents for lifetime plan (min 10000 = $100). Ignored for other plans. |
cancelUrl | String! | Yes | URL to redirect to if the user cancels checkout. |
planSlug | String! | Yes | Plan to purchase: monthly, yearly, or lifetime. |
successUrl | String! | Yes | URL to redirect to after successful checkout. |
createCollectiveGoal
Owner/Admin-only. Creates a team- or sub-community-scoped collective goal (GOALS-10). Gated by the teams_collective_goals kill switch.
Returns: CreateCollectiveGoalPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
communityId | String | No | — |
description | String | No | — |
name | String! | Yes | — |
targetMetric | String! | Yes | — |
targetValue | Int! | Yes | — |
teamId | String! | Yes | — |
createCommunity
Creates a new community that users can join to share goals and support each other.
Returns: CreateCommunityPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
category | String! | Yes | The interest category that best represents this community (e.g. fitness, learning, wellness). |
coverImageFile | Upload (↗) | No | Cover image file upload. Takes precedence over cover_image_url. |
coverImageUrl | String | No | Optional URL for the community cover or banner image. |
description | String! | Yes | A short description of the community purpose and focus. |
guidelines | String | No | Optional community rules or participation guidelines shown to members. |
name | String! | Yes | The display name of the community. |
privacy | String! | Yes | Visibility setting for the community. Accepted values: public or private. |
createCommunityChallenge
Creates a time-boxed challenge inside a community. Community admin only.
Returns: CreateCommunityChallengePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
badgeIcon | String! | Yes | Emoji or icon for the completion badge. |
badgeName | String! | Yes | Name of the completion badge. |
communityId | ID! | Yes | public_id of the community to create the challenge in. |
description | String | No | Optional description of the challenge. |
endDate | ISO8601Date! (↗) | Yes | Date when the challenge ends. |
name | String! | Yes | Display name of the challenge. |
startDate | ISO8601Date! (↗) | Yes | Date when the challenge begins. |
targetGoalCount | Int | No | Number of qualifying goal events needed to complete. Defaults to 1. |
targetGoalTypeId | ID | No | Optional GoalType ID to restrict which events count. Nil means any goal event counts. |
createCommunityPost
Creates a post in a community. Supports text updates and goal shares.
Returns: CreateCommunityPostPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
communityId | ID! | Yes | The public ID of the community in which to create the post. |
content | String! | Yes | The text body of the post. |
type | String! | Yes | The post type. Accepted values: update (text post) or goal_share (sharing a goal with the community). |
createFeedbackComment
Adds a comment to a feedback post.
Returns: CreateFeedbackCommentPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
body | String! | Yes | Comment text (max 1000 chars). |
isOfficial | Boolean | No | Mark as official team response (admin only). |
postId | ID! | Yes | Public ID of the feedback post. |
createFeedbackPost
Creates a new feedback post (feature request, improvement, bug report).
Returns: CreateFeedbackPostPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
category | String! | Yes | Category: feature, improvement, bug, or other. |
description | String | No | Detailed description (max 2000 chars). |
tagIds | [ID!] | No | Public IDs of feedback tags to attach (max 3). |
title | String! | Yes | Title of the feedback post (max 200 chars). |
createFeedbackTag
Creates a new feedback tag (admin only).
Returns: CreateFeedbackTagPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
description | String | No | Optional description of the tag. |
name | String! | Yes | Display name of the tag. |
createSeasonalEvent
Admin only. Creates a platform-wide seasonal event.
Returns: CreateSeasonalEventPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
badgeIcon | String! | Yes | — |
badgeName | String! | Yes | — |
description | String | No | — |
endDate | ISO8601Date! (↗) | Yes | — |
name | String! | Yes | — |
slug | String! | Yes | — |
startDate | ISO8601Date! (↗) | Yes | — |
targetGoalCount | Int | No | — |
createSubCommunity
Owner/Admin-only. Creates a new sub-community (room) scoped to the team.
Returns: CreateSubCommunityPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
description | String | No | — |
icon | String | No | — |
joinPolicy | String | No | — |
leadMembershipId | String | No | — |
makeDefault | Boolean | No | — |
name | String! | Yes | — |
teamId | String! | Yes | — |
createTeamInvite
Owner/Admin-only. Creates a link (and optionally email-targeted) invite for a team. Email delivery additionally requires the teams_bulk_invite kill switch — the invite/link is always created regardless.
Returns: CreateTeamInvitePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
email | String | No | — |
preselectedCommunityIds | [String!] | No | — |
teamId | String! | Yes | — |
teamRole | String | No | — |
declineAllyRequest
Declines a pending ally request.
Returns: DeclineAllyRequestPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
requestId | ID! | Yes | public_id of the UserAlly record (the pending request) to decline. |
declinePartnerRequest
Declines a pending accountability partner request from an ally.
Returns: DeclinePartnerRequestPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
allyPublicId | ID! | Yes | public_id of the ally whose partner request to decline. |
deleteDemoEntity
Delete a demo user/goal/community. super_admin only.
Returns: DeleteDemoEntityPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
entityId | ID! | Yes | — |
entityType | String! | Yes | — |
deleteNotification
Permanently deletes a notification record for the authenticated user.
Returns: DeleteNotificationPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
id | ID! | Yes | The public ID of the notification to delete. |
deleteOwnAccount
Permanently deletes the authenticated user account and all personal data.
Returns: DeleteOwnAccountPayload! (↗)
disconnectIntegrationConnection
Disconnects a connected provider. Past check-ins stay; future activity stops syncing.
Returns: DisconnectIntegrationConnectionPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
integrationConnectionId | ID! | Yes | public_id of the connection to disconnect. |
dismissDashboardHint
Permanently dismisses a v4.15 dashboard hierarchy one-time surface (migration note or a relocation hint) for the authenticated user.
Returns: DismissDashboardHintPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
hint | String! | Yes | migration_note | relocation_community | relocation_achieve |
dismissEnneagramCard
Permanently dismisses the Enneagram dashboard prompt card for the authenticated user.
Returns: DismissEnneagramCardPayload! (↗)
dismissHabitIntegrationMapping
Removes a habit mapping.
Returns: DismissHabitIntegrationMappingPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
mappingId | ID! | Yes | public_id of the mapping to dismiss. |
editHabitIntegrationMapping
Re-points an existing habit mapping at a different habit.
Returns: EditHabitIntegrationMappingPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
goalId | ID! | Yes | public_id of the new habit to map to. |
mappingId | ID! | Yes | public_id of the mapping to edit. |
endPartnership
Ends the current accountability partnership with an ally.
Returns: EndPartnershipPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
allyPublicId | ID! | Yes | public_id of the accountability partner to end partnership with. |
enqueueClear
Enqueues a full demo-data clear. super_admin only.
Returns: EnqueueClearPayload! (↗)
enqueueReseed
Enqueues a full demo-data reseed. super_admin only.
Returns: EnqueueReseedPayload! (↗)
enqueueScopeReset
Enqueues a scope reset for a single demo domain. super_admin only.
Returns: EnqueueScopeResetPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
scope | String! | Yes | — |
ensureTodaysCoachMessage
Ensures a coach message exists for the user today, generating one via AI on the first daily call.
Returns: EnsureTodaysCoachMessagePayload! (↗)
executeGdprDeletion
Runs the GDPR deletion cascade for a request. super_admin + step-up required.
Returns: ExecuteDeletionPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
publicId | String! | Yes | — |
executeGdprExport
Enqueues the export build job for a GDPR request. super_admin or support only.
Returns: ExecuteExportPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
publicId | String! | Yes | — |
followCommunity
Follows a community to receive updates without becoming a full member.
Returns: FollowCommunityPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
communityId | ID! | Yes | The public ID of the community to follow. |
userId | ID! | Yes | The public ID of the user following the community. |
generateGoalDraft
Uses AI to draft a complete goal (title, category, kind, target date, why, milestones) from a freeform idea.
Returns: GenerateGoalDraftPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
idea | String! | Yes | The user's freeform sentence describing what they want to achieve. |
generateMilestones
Uses AI to generate a suggested list of milestone sub-goals for a given goal.
Returns: GenerateMilestonesPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
goalContext | String | No | Optional additional context about the goal (e.g. timeframe, current progress, constraints) to improve milestone relevance. |
goalName | String! | Yes | The name or title of the goal for which milestones should be generated. |
getAdvice
Uses AI to provide personalized advice and tips for making progress on a goal.
Returns: GetAdvicePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
goalId | String | No | public_id of the goal the user is currently viewing, if any. |
page | String! | Yes | The page/context from which the user is asking for advice. |
userMessage | String! | Yes | The user's question or message to the coach. |
getBillingPortalUrl
Returns a Stripe Billing Portal URL for managing the Supporter subscription.
Returns: GetBillingPortalUrlPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
returnUrl | String! | Yes | URL to redirect back to after the user leaves the portal. |
getInsight
Uses AI to generate insights about the user progress, patterns, and trends across their goals.
Returns: GetInsightPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
pageContext | String! | Yes | A string describing the current page or view the user is on, used to tailor the insight to what they are looking at (e.g. "goals dashboard", "mood log history"). |
grantAchievementDebug
Debug/seed-only: grants a badge to the current user. Not available in production.
Returns: GrantAchievementDebugPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
achievementKey | String! | Yes | Badge key from the achievement catalog to grant to the current user. |
inviteAllyToCommunity
Invites an accepted ally to join a community the current user is a member of.
Returns: InviteAllyToCommunityPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
allyPublicId | ID! | Yes | public_id of the ally to invite. |
communityPublicId | ID! | Yes | public_id of the community to invite the ally to. |
joinCommunity
Joins the authenticated user to an existing community.
Returns: JoinCommunityPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
communityId | ID! | Yes | The public ID of the community to join. |
joinCommunityChallenge
Joins the authenticated user to an active community challenge.
Returns: JoinCommunityChallengePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
communityChallengeId | ID! | Yes | public_id of the challenge to join. |
joinSeasonalEvent
Joins the authenticated user to an active seasonal event. Gated by the seasonal_events_enabled kill switch.
Returns: JoinSeasonalEventPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
seasonalEventId | ID! | Yes | public_id of the event to join. |
joinSubCommunity
Any team member may join an open sub-community.
Returns: JoinSubCommunityPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
communityId | String! | Yes | — |
teamId | String! | Yes | — |
leaveCommunity
Removes the authenticated user from a community they are a member of.
Returns: LeaveCommunityPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
communityId | ID! | Yes | The public ID of the community to leave. |
userId | ID! | Yes | The public ID of the user leaving the community. |
leaveCommunityChallenge
Removes the authenticated user from a community challenge.
Returns: LeaveCommunityChallengePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
communityChallengeId | ID! | Yes | public_id of the challenge to leave. |
leaveSeasonalEvent
Removes the authenticated user from a seasonal event. Gated by the seasonal_events_enabled kill switch.
Returns: LeaveSeasonalEventPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
seasonalEventId | ID! | Yes | public_id of the event to leave. |
leaveSubCommunity
Self-service leave for a sub-community. Idempotent; the default room cannot be left.
Returns: LeaveSubCommunityPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
communityId | String! | Yes | — |
teamId | String! | Yes | — |
mintCheckInToken
Mints a durable, device-scoped check-in token for background widget check-ins. Returns no token when widget_background_sync_enabled is off for the user.
Returns: MintCheckInTokenPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
deviceId | String! | Yes | Client-generated, stable identifier for this device. |
optIntoCollectiveGoal
Links a personal goal to a collective goal as a contribution (GOALS-11). Gated by the teams_collective_goals kill switch.
Returns: OptIntoCollectiveGoalPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
collectiveGoalId | String! | Yes | — |
personalGoalId | String! | Yes | — |
optOutOfCollectiveGoal
Self-service opt-out from a collective goal (GOALS-12). Preserves contribution history — never destroys the row. Gated by the teams_collective_goals kill switch.
Returns: OptOutOfCollectiveGoalPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
collectiveGoalId | String! | Yes | — |
pauseAiEmployee
—
Returns: PauseAiEmployeePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
active | Boolean! | Yes | true to resume, false to pause |
employeeId | String! | Yes | — |
pauseIntegrationConnection
Pauses a connected provider — stops syncing new activity until resumed.
Returns: PauseIntegrationConnectionPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
integrationConnectionId | ID! | Yes | public_id of the connection to pause. |
promoteTeamMember
Owner/Admin-only. Changes a team member's role. Cannot set role to owner — use transferTeamBillingOwnership for ownership transfer.
Returns: PromoteTeamMemberPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
role | String! | Yes | — |
teamId | String! | Yes | — |
teamMembershipId | String! | Yes | — |
recordCriticalPathPlay
Records a completed Critical Path play for today. Idempotent — re-submitting returns the original play.
Returns: RecordCriticalPathPlayPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
cols | Int | No | Puzzle grid column count (5–7); used for grid-size-scoped pace comparisons. |
elapsedSeconds | Int! | Yes | Time taken to solve the puzzle in seconds (1–86400). |
rows | Int | No | Puzzle grid row count (5–7); used for grid-size-scoped pace comparisons. |
recordShare
—
Returns: RecordSharePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
channel | String | No | Share destination, e.g. "native", "link". |
code | String | No | v4.56 Phase 5 (REF-01) — the shareCode reserved by shareableMoment and already handed to the OS share sheet. Persisted verbatim when valid; omit to keep the legacy server-minted behavior. |
kind | String! | Yes | One of: badge, goal_completion, milestone, streak. |
subjectPublicId | ID! | Yes | public_id of the subject (or badge key for kind: badge). |
recordUserAction
Records an onboarding-funnel UserAction event from the client (METRIC-01). Allow-listed onboarding action names only.
Returns: RecordUserActionPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
action | String! | Yes | One of the wizard_* onboarding action names. Other UserAction enum values are rejected. |
metadata | JSON (↗) | No | Optional payload (e.g. { slideId, variantId }). Unknown top-level keys are dropped. |
refineDescription
Uses AI to refine or generate a compelling goal description.
Returns: RefineDescriptionPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
currentDescription | String | No | Optional existing description to improve upon. |
goalName | String! | Yes | The name or title of the goal. |
refineGoal
Uses AI to critique a not-yet-saved goal for specificity, a realistic target date, and right-sizing, returning up to 3 one-tap-acceptable suggestions.
Returns: RefineGoalPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
categoryName | String | No | — |
description | String | No | — |
kindName | String | No | — |
milestones | [String!] | No | — |
name | String! | Yes | The goal title as currently typed. |
targetDate | String | No | ISO8601 target date, if set. |
rejectAiArtifact
Rejects a pending AI artifact with a mandatory reason (minimum 10 characters).
Returns: RejectAiArtifactPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
artifactId | String! | Yes | — |
rejectionReason | String! | Yes | — |
removeAlly
Removes an accepted ally relationship.
Returns: RemoveAllyPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
targetUserId | ID! | Yes | public_id of the ally to remove. |
removeTeamMember
Owner/Admin-only. Removes a member: clears their sub-community memberships, anonymizes their leaderboard entries, and soft-deletes their seat. The member's personal account is untouched.
Returns: RemoveTeamMemberPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | String! | Yes | — |
teamMembershipId | String! | Yes | — |
reorderMilestones
Atomically reorders a goal's milestone/roadmap steps by public_id.
Returns: ReorderMilestonesPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
goalId | ID! | Yes | public_id of the parent goal. |
orderedMilestoneIds | [ID!]! | Yes | Milestone public_ids in the desired order. |
repairStreak
Repairs a broken streak by charging XP and backfilling system-granted freeze completions for all missed days within the 24–48h repair window.
Returns: RepairStreakPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
goalId | ID! | Yes | public_id of the habit goal to repair. |
reportContent
—
Returns: ReportContentPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
details | String | No | — |
reason | String! | Yes | — |
reportableId | ID! | Yes | — |
reportableType | String! | Yes | — |
requestDataExport
Requests a GDPR data export for the authenticated user. Subject to a 24h cooldown.
Returns: RequestDataExportPayload! (↗)
requestMagicCode
Sends a 6-character sign-in code to the given email. Always returns success to avoid leaking account existence.
Returns: RequestMagicCodePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
email | String! | Yes | — |
rerunHabitIntegrationMapping
Re-scores a connection's not-yet-checked-in activities against the user's current habits.
Returns: RerunHabitIntegrationMappingPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
integrationConnectionId | ID! | Yes | public_id of the connection to re-run. |
resetOnboarding
Clears the onboarding completion blob so the wizard re-triggers. Omit userPublicId to reset self (any authenticated user). Pass userPublicId to target another user (admin only). Idempotent.
Returns: ResetOnboardingPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
userPublicId | ID | No | Target user public ID. Admin-only. Omit to reset self. |
resumeIntegrationConnection
Resumes a paused connection.
Returns: ResumeIntegrationConnectionPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
integrationConnectionId | ID! | Yes | public_id of the connection to resume. |
revertLastGoalEvent
Soft-deletes the most recent progress event for a goal (Undo action).
Returns: RevertLastGoalEventPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
goalId | ID! | Yes | public_id of the goal whose last event should be reverted. |
reviewContentFlag
—
Returns: ReviewContentFlagPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
action | String! | Yes | "approve" or "reject" |
flagId | String! | Yes | Public ID of the content flag |
reviewContentReport
—
Returns: ReviewContentReportPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
action | String! | Yes | "review" or "dismiss" |
reportId | String! | Yes | Public ID of the content report |
revokeAllyInvite
Revokes an active accountability-partner invite. Only the inviter may revoke.
Returns: RevokeAllyInvitePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
inviteToken | String! | Yes | Token of the invite to revoke. |
revokeCheckInToken
Revokes the check-in token(s) for a device — call on sign-out or device removal.
Returns: RevokeCheckInTokenPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
deviceId | String! | Yes | Identifier of the device being signed out or removed. |
revokeTeamInvite
Owner/Admin-only. Revokes a pending team invite.
Returns: RevokeTeamInvitePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
teamId | String! | Yes | — |
teamInviteId | String! | Yes | — |
seedIntegrationActivityDebug
Debug/seed-only: seeds a fresh IntegrationActivity for the current user and surfaces it through the real auto-map pipeline (NewHabitToast). Not available in production.
Returns: SeedIntegrationActivityDebugPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
providerSlug | String! | Yes | 'strava' or 'chess_com'. |
tier | String! | Yes | 'auto' (auto-check-in tier) or 'propose' (review-band tier). |
sendAllyRequest
Sends an ally request to another user.
Returns: SendAllyRequestPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
targetUserId | ID! | Yes | public_id of the user to send an ally request to. |
sendEncouragement
Sends a peer encouragement notification to another user. Idempotent: one per sender→receiver per day.
Returns: SendEncouragementPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
toUserPublicId | ID! | Yes | public_id of the user to encourage. |
sendPartnerNudge
Sends a nudge notification to an accountability partner. Idempotent: one nudge per partnership per direction per day.
Returns: SendPartnerNudgePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
allyPublicId | ID! | Yes | public_id of the accountability partner to nudge. |
sendPartnerRequest
Sends an accountability partner request to an accepted ally.
Returns: SendPartnerRequestPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
allyPublicId | ID! | Yes | public_id of the ally to request as accountability partner. |
setColorTheme
Sets the Supporter color theme for the authenticated user, synced across devices.
Returns: SetColorThemePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
slug | String! | Yes | Theme slug to activate. |
setCommunityEditorialSlot
Admin only. Sets or clears the editorial slot for a community. Slot null unsets.
Returns: SetCommunityEditorialSlotPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
communityId | ID! | Yes | — |
position | Int | No | — |
slot | String | No | — |
setCommunityFeatured
Admin only. Toggles whether a community is featured on the discovery page.
Returns: SetCommunityFeaturedPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
communityId | ID! | Yes | — |
featured | Boolean! | Yes | — |
setCriticalPathActiveTheme
Sets the active visual theme for the authenticated user. Theme must be unlocked.
Returns: SetCriticalPathActiveThemePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
theme | String! | Yes | Theme key to activate. |
setCriticalPathReminderPreferences
Sets the daily reminder preferences for the authenticated user.
Returns: SetCriticalPathReminderPreferencesPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
enabled | Boolean! | Yes | Whether to enable daily Critical Path reminders. |
timeOfDay | String | No | Preferred local send time in HH:MM format (e.g. '08:00'). |
timezone | String | No | IANA timezone string. Only applied when enabling reminders and user is on UTC default. |
setDefaultSubCommunity
Owner/Admin-only. Reassigns the team's default landing room.
Returns: SetDefaultSubCommunityPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
communityId | String! | Yes | — |
teamId | String! | Yes | — |
setGoalPartnerSharing
Toggles whether a confirmed accountability partner can see a private goal. Owner-only.
Returns: SetGoalPartnerSharingPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
goalId | ID! | Yes | public_id of the goal to update. |
sharedWithPartner | Boolean! | Yes | When true, a confirmed accountability partner can see this goal. |
setGoalVisibility
Sets who can see a goal: everyone, accepted allies only, or just the owner. Owner-only.
Returns: SetGoalVisibilityPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
goalId | ID! | Yes | public_id of the goal to update. |
visibility | GoalVisibilityEnum! (↗) | Yes | The new visibility tier for the goal. |
setLeaderboardVisibility
Member-level opt-out from the team leaderboard (LEADERBOARD-3). Gated by the teams_leaderboards kill switch.
Returns: SetLeaderboardVisibilityPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
optedOut | Boolean! | Yes | — |
teamId | String! | Yes | — |
setSeasonalEventActive
Admin only. Activates or deactivates a seasonal event. Events are historical once run, so this flips a flag rather than deleting the row.
Returns: SetSeasonalEventActivePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
eventId | ID! | Yes | — |
isActive | Boolean! | Yes | — |
setTeamNotificationPreferences
Sets the team notification preferences for the authenticated user.
Returns: SetTeamNotificationPreferencesPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
enabled | Boolean! | Yes | Whether to enable team notifications (in-app and push). |
setWeeklyDigestPreferences
Sets the weekly digest email preferences for the authenticated user.
Returns: SetWeeklyDigestPreferencesPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
deliveryDay | String | No | Day to deliver the digest: 'sun', 'sat', or 'mon'. |
enabled | Boolean! | Yes | Whether to enable the weekly digest email. |
startTeamBillingPortal
Owner-only. Returns a Stripe Billing Portal URL for managing the team's subscription.
Returns: StartTeamBillingPortalPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
returnUrl | String! | Yes | URL to redirect back to after the user leaves the portal. |
teamId | String! | Yes | — |
startTeamCheckout
Opens a Stripe Checkout session for a new or re-subscribing Team.
Returns: StartTeamCheckoutPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
cancelUrl | String! | Yes | — |
planSlug | String! | Yes | teams_monthly or teams_annual. |
seatCount | Int | No | Number of seats (1-200, default 5). |
successUrl | String! | Yes | — |
teamId | String | No | Existing team public_id when re-subscribing. |
teamName | String | No | Required for a brand-new team. |
storeDeviceToken
Registers a device push notification token for the authenticated user (iOS/Android).
Returns: StoreDeviceTokenPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
deviceToken | ID! | Yes | The push notification token issued by APNs (iOS) or FCM (Android). |
platform | String | No | The device platform. Accepted values: ios or android. |
storeFeatureTourState
Writes feature-tour completion/dismissal state into UserDetail.data["feature_tours"], keyed by tour id.
Returns: StoreFeatureTourStatePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
completed | Boolean | No | Mark the tour completed (sets completed_at). |
dismissed | Boolean | No | Mark the tour dismissed/skipped. |
tourId | String! | Yes | Tour identifier, e.g. "dashboard-first-run". |
storeOnboardingState
Writes v1.8 onboarding completion or progress into UserDetail.data["onboarding"]. Accepts completed_via: "complete" | "skip" only — "backfilled" is server-only.
Returns: StoreOnboardingStatePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
completedVia | OnboardingCompletedVia (↗) | No | Set to "complete" or "skip" on wizard exit. Omit when writing progress only. |
progress | OnboardingProgressInput (↗) | No | In-flight slide progress. Cleared on wizard exit when completed_via is set. |
storeUserDetails
Stores or updates arbitrary metadata on the user details JSON blob (e.g. onboarding state, preferences).
Returns: StoreUserDetailsPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
appFeedback | String | No | Free-text feedback submitted by the user from within the app. |
appVersion | String | No | The current version string of the client app (e.g. "1.4.2"). |
submitEnneagramAssessment
Submits a completed 40-question Enneagram assessment and persists the result.
Returns: SubmitEnneagramAssessmentPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
answers | [AnswerInput!]! (↗) | Yes | Array of exactly 40 forced-choice answers. |
submitTeamPulse
Submits the current member's quarterly team pulse survey response (score 0-10, optional comment). Objectuve-internal telemetry — no team-admin read path exists for this data.
Returns: SubmitTeamPulsePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
comment | String | No | — |
score | Int! | Yes | — |
teamId | String! | Yes | — |
suggestGoals
Uses AI to turn goal-discovery quiz answers into 3-5 suggested goals, each with a rationale.
Returns: SuggestGoalsPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
lifeAreas | [String!]! | Yes | Up to 3 life-area labels the user picked (Q1). |
pull | String! | Yes | What would move the needle most right now (Q2). |
rhythm | String! | Yes | How much time the user can realistically give (Q3). |
why | String | No | What's driving this — optional/skippable (Q4). |
syncUser
Syncs the authenticated Clerk user with the local database. Returns first_sign_in for onboarding detection.
Returns: SyncUserPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
referralCode | String | No | v4.56 Phase 5 (REF-02/REF-03) — a share-link code captured from ?ref= on first landing. Only attributed when this call is a genuine first sign-in. |
timezone | String | No | IANA timezone string from the client (e.g. "America/Chicago"). Used to evaluate day boundaries for streak calculations. |
toggleFeedbackVote
Toggles a vote on a feedback post. Adds a vote if not voted, removes if already voted.
Returns: ToggleFeedbackVotePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
postId | ID! | Yes | Public ID of the feedback post to vote on. |
toggleFollowGoal
Follows or unfollows a goal. Toggles the follow state for the authenticated user.
Returns: ToggleFollowGoalPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
goalId | ID! | Yes | public_id of the goal to follow or unfollow. |
toggleGoalEventEncouragement
Toggles an encouragement (like/cheer) reaction on a goal event. Creates one if absent, removes it if present.
Returns: ToggleGoalEventEncouragementPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
goalEventId | ID! | Yes | public_id of the goal event to encourage or un-encourage. |
toggleGoalEventReaction
Toggles an emoji reaction on a goal event. Creates if absent, removes if same emoji, replaces if different emoji.
Returns: ToggleGoalEventReactionPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
emoji | String! | Yes | Unicode emoji character for the reaction. |
goalEventId | ID! | Yes | public_id of the goal event to react to. |
transferTeamBillingOwnership
Owner-only. Transfers billing ownership to another existing team member.
Returns: TransferTeamBillingOwnershipPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
newOwnerId | String! | Yes | The new owner's user public_id. |
teamId | String! | Yes | — |
triggerAiRun
—
Returns: TriggerAiRunPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
employeeId | String! | Yes | — |
unarchiveSubCommunity
Owner/Admin-only. Reverses an in-progress sub-community archive within the 30-day window.
Returns: UnarchiveSubCommunityPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
communityId | String! | Yes | — |
teamId | String! | Yes | — |
unblockUser
Unblocks a user, restoring visibility of their content in both directions.
Returns: UnblockAllyPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
targetUserId | ID! | Yes | public_id of the user to unblock. |
unfollowCommunity
Unfollows a community the authenticated user is currently following.
Returns: UnfollowCommunityPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
communityId | ID! | Yes | The public ID of the community to unfollow. |
userId | ID! | Yes | The public ID of the user unfollowing the community. |
updateAiEmployee
—
Returns: UpdateAiEmployeePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
autonomyLevel | String | No | — |
confirmPromotion | Boolean | No | — |
crew | String | No | — |
description | String | No | — |
employeeId | String! | Yes | — |
mcpServers | [String!] | No | — |
modelPreference | String | No | — |
monthlyBudgetCents | Int | No | — |
name | String | No | — |
postFilterSkill | String | No | — |
scheduleCron | String | No | — |
skillRefs | [String!] | No | — |
taskPrompt | String | No | — |
updateCoachingPreferences
Updates the current user's AI Coach persona, tone, depth, focus areas, and communication frequency.
Returns: UpdateCoachingPreferencesPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
depth | Int | No | Response depth from 1 (brief) to 5 (detailed). |
focusPrimary | String | No | Primary coaching focus area. |
focusSecondary | String | No | Optional secondary coaching focus area (null to clear). |
persona | String | No | Coaching persona: captain, spark, mirror, rival, sage, or analyst. |
rhythm | String | No | Communication rhythm: morning, evening, bookends, or when_needed. |
toneBrevity | Int | No | Tone brevity from 0 to 4. |
toneWarmth | Int | No | Tone warmth from 0 to 4. |
updateCoachModel
Switches the runtime Coach Gemini model. Admin only.
Returns: UpdateCoachModelPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
model | String! | Yes | — |
updateCoachWarmupContext
Stores the user's post-wizard warmup answers for Coach personalization.
Returns: UpdateCoachWarmupContextPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
feedbackStyle | String! | Yes | The style of feedback the user prefers from Coach. |
missedDayResponse | String! | Yes | How the user wants Coach to respond when they miss a day. |
timeOfDay | String! | Yes | When the user typically works on goals (e.g. "morning", "after work"). |
updateDashboardPreferences
Updates the current user's dashboard mode and density preferences (v4.15).
Returns: UpdateDashboardPreferencesPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
density | String | No | Dashboard density: standard or detailed. |
migratedFromFull | Boolean | No | Set when this call performs the one-time legacy full→Detailed backfill. |
mode | String | No | Dashboard mode: focus, standard, detailed, or auto. |
updateDemoCommunity
Inline-edit a demo community. super_admin only.
Returns: UpdateDemoCommunityPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
attributes | DemoCommunityAttributesInput! (↗) | Yes | — |
communityId | ID! | Yes | — |
updateDemoGoal
Inline-edit a demo goal. super_admin only.
Returns: UpdateDemoGoalPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
attributes | DemoGoalAttributesInput! (↗) | Yes | — |
goalId | ID! | Yes | — |
updateDemoUser
Inline-edit a demo user. super_admin only.
Returns: UpdateDemoUserPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
attributes | DemoUserAttributesInput! (↗) | Yes | — |
userId | ID! | Yes | — |
updateFeedbackPostStatus
Updates the status of a feedback post (admin only).
Returns: UpdateFeedbackPostStatusPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
postId | ID! | Yes | Public ID of the feedback post. |
status | String! | Yes | New status: open, planned, in_progress, completed, or declined. |
updateFeedbackPostTags
Updates the tags on a feedback post (admin only).
Returns: UpdateFeedbackPostTagsPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
postId | ID! | Yes | Public ID of the feedback post. |
tagIds | [ID!]! | Yes | Public IDs of the tags to set on the post (up to 3). |
updateFeedbackTag
Updates an existing feedback tag (admin only).
Returns: UpdateFeedbackTagPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
description | String | No | New description. |
name | String | No | New display name. |
tagId | ID! | Yes | Public ID of the feedback tag. |
updateGoal
Updates an existing goal owned by the authenticated user.
Returns: UpdateGoalPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
appLink | String | No | Updated external app URL (https:// or a custom app scheme, e.g. duolingo://) opened on check-in for one-click redirect to another app. |
completed | Boolean | No | When true, marks the goal as completed. |
completionReflection | String | No | Optional free-text reflection captured when the goal is marked complete. Personalizes Coach messaging when present. Max 200 chars. |
content | String | No | Updated description or motivation note. |
daysToUpdate | Int | No | Updated frequency in days that the user plans to log progress. |
deleted | Boolean | No | When true, soft-deletes the goal. |
durationMinutes | Int | No | Optional time-per-session in minutes for habits. |
file | Upload (↗) | No | Cover image file upload. Takes precedence over image_url when provided. |
goalCategoryId | ID | No | Updated goal category ID. Fetch options via goalCategories query. |
goalId | ID! | Yes | public_id of the goal to update. |
goalTypeId | ID | No | Updated goal type ID. Fetch options via goalKinds query. |
identityPrompt | String | No | Optional free-text identity framing (e.g. "Who you're becoming"). Personalizes Coach messaging when present. Max 240 chars. |
imageUrl | String | No | Updated URL of a cover image for the goal. |
name | String | No | Updated display name for the goal. |
newMilestones | [String!] | No | Deprecated: Use steps: input. Will be removed in v2.0. List of milestone names to create as child goals. Deprecated; use steps. |
pastAttemptContext | String | No | Optional free-text context on a prior attempt at this goal. Personalizes Coach messaging when present. Max 200 chars. |
private | Boolean | No | Deprecated; use visibility. When true, the goal is visible only to the owner. |
recurrenceDays | [String!] | No | Updated days for weekly/custom_days recurrence. |
recurrenceInterval | Int | No | Updated number of days between check-ins for interval recurrence. |
recurrenceType | String | No | Updated recurrence pattern for habits: daily, weekly, custom_days, or interval. |
steps | [StepInput!] (↗) | No | Structured roadmap step diff. Upserts by public_id; omitted existing steps soft-delete. |
targetDate | String | No | Updated ISO date string for the target completion date (e.g. "2026-12-31"). |
visibility | GoalVisibilityEnum (↗) | No | Who can see the goal. Wins over private when both are sent. |
updateGoalEvent
Updates the content or media of an existing goal progress event.
Returns: UpdateGoalEventPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
content | String | No | Updated progress update text. |
deleted | Boolean | No | When true, soft-deletes the goal event. |
file | Upload (↗) | No | Image file upload. Takes precedence over image_url when provided. |
goalEventId | ID! | Yes | public_id of the goal event to update. |
goalId | ID | No | public_id of the goal this event belongs to. |
imageUrl | String | No | Updated URL of an image attached to the progress event. |
updateGoalMotivationSnapshot
Saves any subset of the four Goal Motivation Snapshot answers for the current user. Merge semantics — partial saves do not wipe existing keys.
Returns: UpdateGoalMotivationSnapshotPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
challenge | String | No | Biggest challenge: starting, staying_consistent, momentum_after_setbacks, knowing_progress. |
experience | String | No | Prior goal-tracking experience: never, a_few_times, many_still_going, many_struggled. |
socialContext | String | No | Preferred social context: solo, friend_or_partner, team_or_group. |
workTime | String | No | Preferred work time: morning, afternoon, evening, varies. |
updatePrivacySettings
Updates the authenticated user's privacy toggles (go_it_alone, private_mode). Self-only.
Returns: UpdatePrivacySettingsPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
goItAlone | Boolean | No | Opt out of ally/community/coach-social prompts. |
privateMode | Boolean | No | Hide the user from username search. |
updateSeasonalEvent
Admin only. Updates a platform-wide seasonal event.
Returns: UpdateSeasonalEventPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
badgeIcon | String! | Yes | — |
badgeName | String! | Yes | — |
description | String | No | — |
endDate | ISO8601Date! (↗) | Yes | — |
eventId | ID! | Yes | — |
name | String! | Yes | — |
slug | String! | Yes | — |
startDate | ISO8601Date! (↗) | Yes | — |
targetGoalCount | Int | No | — |
updateShowcasedAchievements
Updates the list of achievement identifiers the user displays on their public profile.
Returns: UpdateShowcasedAchievementsPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
achievementKeys | [String!]! | Yes | Ordered list of achievement identifier keys to display on the public profile. |
userId | ID! | Yes | The public ID of the user whose showcased achievements are being updated. |
updateSubCommunity
Owner/Admin-only. Edits an existing sub-community (room) — name, description, icon, join policy, and lead.
Returns: UpdateSubCommunityPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
communityId | String! | Yes | — |
description | String | No | — |
icon | String | No | — |
joinPolicy | String | No | — |
leadMembershipId | String | No | — |
name | String | No | — |
teamId | String! | Yes | — |
updateUser
Updates profile information for the authenticated user.
Returns: UpdateUserPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
deleteUser | Boolean | No | When true, soft-deletes the user account. |
email | String | No | A new email address for the user account. |
firstName | String | No | The user first name. |
lastName | String | No | The user last name. |
username | String | No | A new unique username for the user. |
updateUserPhoto
Updates the profile photo for the authenticated user.
Returns: UpdateUserPhotoPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
file | Upload (↗) | No | Image file upload. Takes precedence over image_url when provided. |
imageUrl | String | No | Publicly accessible URL of the new profile photo image. |
updateUserRoles
Updates an admin user's RBAC roles securely logging the execution.
Returns: UpdateUserRolesPayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
roles | [String!]! | Yes | — |
userId | ID! | Yes | — |
useStreakFreeze
Uses a streak freeze token to proactively cover a habit day before it lapses.
Returns: UseStreakFreezePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
goalId | ID! | Yes | public_id of the habit goal. |
missedDate | String! | Yes | ISO date string to freeze — today through 14 days out; earlier dates are rejected. |
verifyMagicCode
Verifies a magic sign-in code and returns a session token.
Returns: VerifyMagicCodePayload! (↗)
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
code | String! | Yes | — |
email | String! | Yes | — |
Last updated: 2026-09-19 (auto-generated from schema.graphql)