Core Resources
Customer notification preferencesNew
Notification preferences record whether a
Customer has opted in or out of transactional, promotional and replenishment communication over email and SMS, and when and where each choice was last made.This resource is new in the V2 reference. It also works when you send X-Recharge-Version: 2021-11.
#The notification preferences object
Attributes
- emailobjectDetails of the customer's notification preferences for email.
Show child attributesHide child attributes3
- transactionalobjectDetails of the customer's notification preferences for transactional communication on this channel.
Show child attributesHide child attributes5
- statusstringStatus of the notification preference.
unspecifiedwhen the customer has never opted in or out.Possible valuesaccepteddeclinedunspecified - last_opt_in_atdatetime · nullableThe date and time when the customer last opted in.
- last_opt_in_sourcestring · nullableThe interface or process through which the customer last opted in.
- last_opt_out_atdatetime · nullableThe date and time when the customer last opted out.
- last_opt_out_sourcestring · nullableThe interface or process through which the customer last opted out.
- promotionalobjectDetails of the customer's notification preferences for promotional communication on this channel.
Show child attributesHide child attributes5
- statusstringStatus of the notification preference.
unspecifiedwhen the customer has never opted in or out.Possible valuesaccepteddeclinedunspecified - last_opt_in_atdatetime · nullableThe date and time when the customer last opted in.
- last_opt_in_sourcestring · nullableThe interface or process through which the customer last opted in.
- last_opt_out_atdatetime · nullableThe date and time when the customer last opted out.
- last_opt_out_sourcestring · nullableThe interface or process through which the customer last opted out.
- replenishmentobjectDetails of the customer's notification preferences for replenishment communication on this channel.
Show child attributesHide child attributes5
- statusstringStatus of the notification preference.
unspecifiedwhen the customer has never opted in or out.Possible valuesaccepteddeclinedunspecified - last_opt_in_atdatetime · nullableThe date and time when the customer last opted in.
- last_opt_in_sourcestring · nullableThe interface or process through which the customer last opted in.
- last_opt_out_atdatetime · nullableThe date and time when the customer last opted out.
- last_opt_out_sourcestring · nullableThe interface or process through which the customer last opted out.
- smsobjectDetails of the customer's notification preferences for SMS.
Show child attributesHide child attributes3
- transactionalobjectDetails of the customer's notification preferences for transactional communication on this channel.
Show child attributesHide child attributes5
- statusstringStatus of the notification preference.
unspecifiedwhen the customer has never opted in or out.Possible valuesaccepteddeclinedunspecified - last_opt_in_atdatetime · nullableThe date and time when the customer last opted in.
- last_opt_in_sourcestring · nullableThe interface or process through which the customer last opted in.
- last_opt_out_atdatetime · nullableThe date and time when the customer last opted out.
- last_opt_out_sourcestring · nullableThe interface or process through which the customer last opted out.
- promotionalobjectDetails of the customer's notification preferences for promotional communication on this channel.
Show child attributesHide child attributes5
- statusstringStatus of the notification preference.
unspecifiedwhen the customer has never opted in or out.Possible valuesaccepteddeclinedunspecified - last_opt_in_atdatetime · nullableThe date and time when the customer last opted in.
- last_opt_in_sourcestring · nullableThe interface or process through which the customer last opted in.
- last_opt_out_atdatetime · nullableThe date and time when the customer last opted out.
- last_opt_out_sourcestring · nullableThe interface or process through which the customer last opted out.
- replenishmentobjectDetails of the customer's notification preferences for replenishment communication on this channel.
Show child attributesHide child attributes5
- statusstringStatus of the notification preference.
unspecifiedwhen the customer has never opted in or out.Possible valuesaccepteddeclinedunspecified - last_opt_in_atdatetime · nullableThe date and time when the customer last opted in.
- last_opt_in_sourcestring · nullableThe interface or process through which the customer last opted in.
- last_opt_out_atdatetime · nullableThe date and time when the customer last opted out.
- last_opt_out_sourcestring · nullableThe interface or process through which the customer last opted out.
{
"notification_preferences": {
"email": {
"transactional": {
"status": "accepted",
"last_opt_in_at": "2026-08-03T15:22:10+00:00",
"last_opt_in_source": "api",
"last_opt_out_at": null,
"last_opt_out_source": null
},
"promotional": {
"status": "declined",
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": "2026-08-20T09:41:55+00:00",
"last_opt_out_source": "customer_portal"
},
"replenishment": {
"status": "unspecified",
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null
}
},
"sms": {
"transactional": {
"status": "unspecified",
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null
},
"promotional": {
"status": "unspecified",
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null
},
"replenishment": {
"status": "unspecified",
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null
}
}
}
}#Retrieve a customer's notification preferences
GET/customers/{id}/notification_preferences
Retrieves the notification preferences of a
Customer. Preferences that the customer has never set are returned with a status of unspecified.Scope
read_customerscurl 'https://api.rechargeapps.com/customers/129593/notification_preferences' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"notification_preferences": {
"email": {
"transactional": {
"status": "accepted",
"last_opt_in_at": "2026-08-03T15:22:10+00:00",
"last_opt_in_source": "api",
"last_opt_out_at": null,
"last_opt_out_source": null
},
"promotional": {
"status": "declined",
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": "2026-08-20T09:41:55+00:00",
"last_opt_out_source": "customer_portal"
},
"replenishment": {
"status": "unspecified",
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null
}
},
"sms": {
"transactional": {
"status": "unspecified",
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null
},
"promotional": {
"status": "unspecified",
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null
},
"replenishment": {
"status": "unspecified",
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null
}
}
}
}#Update a customer's notification preferences
PUT/customers/{id}/notification_preferences
Updates one or more notification preferences of a
Customer. Only the preferences passed in the request are changed, and the opt in or opt out time is set to the time of the request. The response contains the preferences changed by the request; preferences that were not changed are returned with their default values.Scope
write_customersBody parameters
- emailobjectThe email notification preferences to update.
Show child attributesHide child attributes3
- transactionalobjectThe preference for transactional communication on this channel.
statusis required when this object is passed.Show child attributesHide child attributes3
- statusstringThe new status of the notification preference.Possible values
accepteddeclined - last_opt_in_sourcestringThe interface or process through which the customer opted in. Used when
statusisaccepted.Possible valuesapibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_page - last_opt_out_sourcestringThe interface or process through which the customer opted out. Used when
statusisdeclined.Possible valuesapibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_page
- promotionalobjectThe preference for promotional communication on this channel.
statusis required when this object is passed.Show child attributesHide child attributes3
- statusstringThe new status of the notification preference.Possible values
accepteddeclined - last_opt_in_sourcestringThe interface or process through which the customer opted in. Used when
statusisaccepted.Possible valuesapibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_page - last_opt_out_sourcestringThe interface or process through which the customer opted out. Used when
statusisdeclined.Possible valuesapibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_page
- replenishmentobjectThe preference for replenishment communication on this channel.
statusis required when this object is passed.Show child attributesHide child attributes3
- statusstringThe new status of the notification preference.Possible values
accepteddeclined - last_opt_in_sourcestringThe interface or process through which the customer opted in. Used when
statusisaccepted.Possible valuesapibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_page - last_opt_out_sourcestringThe interface or process through which the customer opted out. Used when
statusisdeclined.Possible valuesapibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_page
- smsobjectThe SMS notification preferences to update.
Show child attributesHide child attributes3
- transactionalobjectThe preference for transactional communication on this channel.
statusis required when this object is passed.Show child attributesHide child attributes3
- statusstringThe new status of the notification preference.Possible values
accepteddeclined - last_opt_in_sourcestringThe interface or process through which the customer opted in. Used when
statusisaccepted.Possible valuesapibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_page - last_opt_out_sourcestringThe interface or process through which the customer opted out. Used when
statusisdeclined.Possible valuesapibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_page
- promotionalobjectThe preference for promotional communication on this channel.
statusis required when this object is passed.Show child attributesHide child attributes3
- statusstringThe new status of the notification preference.Possible values
accepteddeclined - last_opt_in_sourcestringThe interface or process through which the customer opted in. Used when
statusisaccepted.Possible valuesapibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_page - last_opt_out_sourcestringThe interface or process through which the customer opted out. Used when
statusisdeclined.Possible valuesapibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_page
- replenishmentobjectThe preference for replenishment communication on this channel.
statusis required when this object is passed.Show child attributesHide child attributes3
- statusstringThe new status of the notification preference.Possible values
accepteddeclined - last_opt_in_sourcestringThe interface or process through which the customer opted in. Used when
statusisaccepted.Possible valuesapibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_page - last_opt_out_sourcestringThe interface or process through which the customer opted out. Used when
statusisdeclined.Possible valuesapibulk_updateconciergecustomer_portalcustomer_smsmerchant_portalrecharge_checkoutrechargesms_appsci_cartscriptshopify_checkoutsms_reminderstore_opt_in_widgetsubscription_checkout_extensionthank_you_page
- email_addressstring · nullableThe email address the consent applies to. Recorded with the change when email preferences are updated.
- phone_numberstring · nullableThe phone number the consent applies to. Recorded with the change when SMS preferences are updated.
- source_detailsobject · nullableAdditional free-form details about where the consent was collected.
- attestation_providedboolean · nullableWhether the customer's consent was attested to when it was collected.
curl -X PUT 'https://api.rechargeapps.com/customers/129593/notification_preferences' \
-H 'X-Recharge-Version: v2' \
-H 'X-Recharge-Access-Token: your_api_token'{
"notification_preferences": {
"email": {
"transactional": {
"status": "unspecified",
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null
},
"promotional": {
"status": "accepted",
"last_opt_in_at": "2026-09-02T11:05:42+00:00",
"last_opt_in_source": "api",
"last_opt_out_at": null,
"last_opt_out_source": null
},
"replenishment": {
"status": "unspecified",
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null
}
},
"sms": {
"transactional": {
"status": "unspecified",
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null
},
"promotional": {
"status": "unspecified",
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null
},
"replenishment": {
"status": "unspecified",
"last_opt_in_at": null,
"last_opt_in_source": null,
"last_opt_out_at": null,
"last_opt_out_source": null
}
}
}
}