---
title: "CustomerEmailMarketingConsentInput"
description: >
  Used by customers to consent/opt from receiving marketing communications via email
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/customers/inputs/customer-email-marketing-consent-input'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/customers/inputs/customer-email-marketing-consent-input.md'
---
# CustomerEmailMarketingConsentInput

Used by customers to consent/opt from receiving marketing communications via email

- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Input

## Type Signature

`CustomerEmailMarketingConsentInput`

## Input Fields

* `consentUpdatedAt`

  [Date](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/date.md)

  Subscription Date

* `marketingState`

  [CustomerEmailMarketingState](https://developer.shopline.com/docs/admin-graph-ql-api/customers/enums/customer-email-marketing-state.md)

  Subscription Status - When unsubscribed, the field is blank

## Schema Definition

```graphql
input CustomerEmailMarketingConsentInput { 
	consentUpdatedAt: Date
	marketingState: CustomerEmailMarketingState 
}
```

## Input field from

* [CustomerEmailMarketingConsentUpdateInput](https://developer.shopline.com/docs/admin-graph-ql-api/customers/inputs/customer-email-marketing-consent-update-input.md).emailMarketingConsent

  Email subscription information

* [CustomerInput](https://developer.shopline.com/docs/admin-graph-ql-api/customers/inputs/customer-input.md).emailMarketingConsent

  Used for customer consent to receive marketing information via email, such as newsletters.

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes).

