--- title: abandonmentEmailStateUpdate - GraphQL Admin description: Updates the email state value for an abandonment. api_version: 2025-10 api_name: admin type: mutation api_type: graphql source_url: html: https://shopify.dev/docs/api/admin-graphql/latest/mutations/abandonmentemailstateupdate md: https://shopify.dev/docs/api/admin-graphql/latest/mutations/abandonmentemailstateupdate.md --- # abandonment​Email​State​Update mutation Requires `write_marketing_events` access scope. Deprecated. Use [abandonmentUpdateActivitiesDeliveryStatuses](https://shopify.dev/docs/api/admin-graphql/latest/mutations/abandonmentUpdateActivitiesDeliveryStatuses) instead. Updates the email state value for an abandonment. ## Arguments * email​Sent​At [Date​Time](https://shopify.dev/docs/api/admin-graphql/latest/scalars/DateTime) The date and time for when the email was sent, if that is the case. * email​State [Abandonment​Email​State!](https://shopify.dev/docs/api/admin-graphql/latest/enums/AbandonmentEmailState) required The new email state of the abandonment. * email​State​Change​Reason [String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String) The reason why the email was or was not sent. * id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required The ID of the abandonment that needs to be updated. *** ## Abandonment​Email​State​Update​Payload returns * abandonment [Abandonment](https://shopify.dev/docs/api/admin-graphql/latest/objects/Abandonment) The updated abandonment. * user​Errors [\[Abandonment​Email​State​Update​User​Error!\]!](https://shopify.dev/docs/api/admin-graphql/latest/objects/AbandonmentEmailStateUpdateUserError) non-null The list of errors that occurred from executing the mutation. *** ## Examples * ### abandonmentEmailStateUpdate reference ## Mutation Reference ```graphql mutation abandonmentEmailStateUpdate($id: ID!, $emailState: AbandonmentEmailState!, $emailSentAt: DateTime, $emailStateChangeReason: String) { abandonmentEmailStateUpdate(id: $id, emailState: $emailState, emailSentAt: $emailSentAt, emailStateChangeReason: $emailStateChangeReason) { abandonment { # Abandonment fields } userErrors { field message } } } ``` ## Input ```json { "id": "gid://shopify//10079785100", "emailState": "NOT_SENT", "emailSentAt": "2019-09-07T15:50:00Z", "emailStateChangeReason": "" } ``` ##### Variables ``` { "id": "gid://shopify//10079785100", "emailState": "NOT_SENT", "emailSentAt": "2019-09-07T15:50:00Z", "emailStateChangeReason": "" } ```