Delete Customer
Delete an SSO user (customer) using soft delete. The userId parameter is the external user ID from the reseller system. The customer will be marked as deleted (is_deleted = true) but not removed from the database.
Mutation
mutation DeleteHandbookCustomer($userId: String!) {
deleteHandbookCustomer(userId: $userId)
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
userId | String! | Yes | External user ID from the reseller system identifying the customer to delete |
Response
{
"data": {
"deleteHandbookCustomer": true
}
}
Examples
Delete Customer
mutation {
deleteHandbookCustomer(userId: "external_user_123")
}
With Variables
mutation DeleteCustomer($userId: String!) {
deleteHandbookCustomer(userId: $userId)
}
Variables:
{
"userId": "external_user_123"
}
Error Responses
Customer Not Found
{
"errors": [
{
"message": "Customer not found or access denied",
"extensions": {
"code": "NOT_FOUND"
}
}
]
}
Access Denied
{
"errors": [
{
"message": "Customer not found or access denied",
"extensions": {
"code": "FORBIDDEN"
}
}
]
}
Notes
- Requires reseller API key authentication
- The customer must belong to the authenticated reseller
- This is a soft delete - the customer is marked as deleted but not removed from the database
- Deleted customers can be retrieved with
includeDeleted: truein queries (if supported) - The customer's
external_user_idandexternal_emailare modified to prevent conflicts - The customer's data and handbooks are preserved but the customer is no longer active