Update Marketing Subscription Status
PUT/client/users/:correlation_id/profile/marketing-subscription
Description
Update marketing communication preferences for a member via email and/or SMS. The update only affects:
-
Email: LOYALTY preference
-
SMS: Default shortcode identifier
Request Body
{
"email": {
"preference": "OPT_IN"
},
"sms": {
"preference": "OPT_OUT"
}
}
Body
| Attribute | Description | Format | Note |
|---|---|---|---|
| Used to set preference for email communication | Type - Object Optional | This affects "LOYALTY" | |
| email.preference | Value can be OPT_IN or OPT_OUT | Type - Enum Required if email is present | |
| sms | Used to set preference for SMS communication | Type - Object Optional | This affects default shortcode |
| sms.preference | Value can be OPT_IN or OPT_OUT | Type - Enum Required if sms is present |
Response
| Attribute | Description | Format | Note |
|---|---|---|---|
| message | Returns results of marketing subscription update | String | Value: "Marketing subscription status updated." |
Error Responses
| statusCode | errorMessage | errorCode | Definition |
|---|---|---|---|
| 400 Bad Request | Invalid preference option sent for {{channel}}. | INVALID_REQUEST | Must be OPT_IN or OPT_OUT and {{channel}} is email or sms. |
| 400 Bad Request | Invalid communication channel present in the request: {{InvalidCommunicationChannel}}. | INVALID_REQUEST | Channel must be email or sms. |
| 400 Bad Request | Preference for email is not sent in the request. | INVALID_REQUEST | There must be a valid preference, OPT_IN or OPT_OUT, in the email object. |
| 400 Bad Request | Preference for sms is not sent in the request. | INVALID_REQUEST | There must be a valid preference, OPT_IN or OPT_OUT, in the sms object. |
| 400 Bad Request | Either Email or SMS Preference is required. | INVALID_REQUEST | Request must include email or sms object with preference or both. |
| 400 Bad Request | Account does not have an email for email communication. | INVALID_REQUEST | Email requires email address to change status. |
| 400 Bad Request | Account does not have a phone number for sms communication. | INVALID_REQUEST | Account requires phone number for sms status change. |
Request
Responses
- 200
- 400
200 - Suscription Status Updated for Email and SMS
Response Headers
Date
Example:
Fri, 11 Apr 2025 17:30:52 GMTContent-Length
Example:
52Connection
Example:
keep-alivex-amzn-RequestId
Example:
2f345d68-242e-404d-bc0c-a8456d5de3afReferrer-Policy
Example:
no-referrerX-XSS-Protection
Example:
1;mode=blockAccess-Control-Allow-Origin
Example:
*MCK-APPID
Example:
ES-CB-V1MCK-MSGID
Example:
mck-1bf57d0e-5f9f-440f-b623-1732074bee0eExpect-CT
Example:
max-age=86400Strict-Transport-Security
Example:
max-age=31536000; includeSubDomains; preloadFeature-Policy
Example:
vibrate 'none'; geolocation 'none'X-Frame-Options
Example:
sameoriginContent-Security-Policy
Example:
connect-src 'none';object-src https://*.cloudfront.net;script-src https://*.cloudfront.netMCK-MSGTIMESTAMP
Example:
April 11th 2025, 5:30:50x-amz-apigw-id
Example:
I3m3oHa2oAMEhaQ=cache-control
Example:
no-cache, no-store, must-revalidateMCK_CORRELATIONID
Example:
CORRELATION_ID_NOT_PROVIDED_IN_REQUESTX-Content-Type-Options
Example:
nosniffX-Amzn-Trace-Id
Example:
Root=1-67f951ca-5edda60e21233b496a3fb6e0;Parent=292f176fd113c468;Sampled=0;Lineage=1:8112f1f4:0400 - Invalid Preference
Response Headers
Date
Example:
Fri, 11 Apr 2025 17:21:58 GMTContent-Length
Example:
121Connection
Example:
keep-alivex-amzn-RequestId
Example:
02efd482-b29e-40c8-ad12-561181195076Referrer-Policy
Example:
no-referrerX-XSS-Protection
Example:
1;mode=blockAccess-Control-Allow-Origin
Example:
*MCK-APPID
Example:
ES-CB-V1MCK-MSGID
Example:
mck-df9a61f2-e510-4eb9-913e-689585eb206cExpect-CT
Example:
max-age=86400Strict-Transport-Security
Example:
max-age=31536000; includeSubDomains; preloadFeature-Policy
Example:
vibrate 'none'; geolocation 'none'X-Frame-Options
Example:
sameoriginContent-Security-Policy
Example:
connect-src 'none';object-src https://*.cloudfront.net;script-src https://*.cloudfront.netMCK-MSGTIMESTAMP
Example:
April 11th 2025, 5:21:58x-amz-apigw-id
Example:
I3lkhEk3IAMEuRw=cache-control
Example:
no-cache, no-store, must-revalidateMCK_CORRELATIONID
Example:
CORRELATION_ID_NOT_PROVIDED_IN_REQUESTX-Content-Type-Options
Example:
nosniffX-Amzn-Trace-Id
Example:
Root=1-67f94fb6-3b695842624a9d0f6c19667e;Parent=2956307b33d10546;Sampled=0;Lineage=1:8112f1f4:0