User Account Deletion
Application APIs
This workflow demonstrates how to process user-initiated account deletion requests. The workflow uses GraphQL mutations to manage account deletion status and remove associated user data.
Prerequisites
- End-User Authentication - User must be authenticated
- Account Creation and Consent - User account must be created
Environment URL:
- Client-Sandbox:
https://api.client-sandbox.icanbwell.com/v1/graphql
Workflow Steps
Step 1: Initiate Account Deletion Request
Use the updateUserAccountStatus mutation to send a user account deletion request. The mutation supports different operation types depending on your deletion requirements.
Available Operations:
| Operation | Description |
|---|---|
REQUEST_DELETE | Initiates account deletion request with configured waiting period |
CANCEL_DELETE | Cancels pending deletion request and restores account |
IMMEDIATE_EXECUTION | Executes immediate account deletion without waiting period |
GraphQL Mutation:
mutation delete($operation: Operation!) {
updateUserAccountStatus(operation: $operation) {
resourceType
issue {
code
severity
details {
text
}
}
}
}
Example Variables (Request Deletion):
{
"operation": "REQUEST_DELETE"
}Example Variables (Cancel Deletion):
{
"operation": "CANCEL_DELETE"
}Example Variables (Immediate Deletion):
{
"operation": "IMMEDIATE_EXECUTION"
}Step 2: Account and Data Deletion
Once the deletion request is processed (either after the waiting period for REQUEST_DELETE or immediately for IMMEDIATE_EXECUTION), the user's account and all associated data are permanently removed from b.well.
Deleted data includes:
- User profile and demographics
- Consent records
- Established data connections
- Retrieved health records
- Task and notification data
Updated 8 days ago
