Skip to main content
Version: 2.0.0

UnsubscribeCustomer

Description

Unsubscribes an e-mail address from newsletter subscriptions. Operation name: unsubscribeCustomer.

The subscriber record is retained and marked as unsubscribed for history/audit purposes.

Endpoint

mutation unsubscribeCustomer($email: String!) {
unsubscribeCustomer(email: $email) {
success
message
subscribedEmail
alreadyExists
wasReactivated
}
}

Arguments

ArgumentTypeRequiredDescription
emailStringYesSubscriber e-mail address.

Return Values

Returns CustomerSubscription:

FieldTypeDescription
successBooleanWhether operation completed successfully.
messageStringHuman-readable result message.
subscribedEmailStringE-mail that was processed.
alreadyExistsBooleanWhether subscriber record exists.
wasReactivatedBooleanAlways not applicable for unsubscribe flow.

Usage Example

mutation {
unsubscribeCustomer(email: "customer@example.com") {
success
message
alreadyExists
}
}

Notes

  • Plugin setting customerSubscriptionEnabled must be enabled.
  • Runtime code tracks wasUnsubscribed, but this key is not exposed in GraphQL type; use success + message in clients.