Skip to main content

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

AttributeDescriptionFormatNote
emailUsed to set preference for email communicationType - Object
Optional
This affects "LOYALTY"
email.preferenceValue can be OPT_IN or OPT_OUTType - Enum
Required if email is present
smsUsed to set preference for SMS communicationType - Object
Optional
This affects default shortcode
sms.preferenceValue can be OPT_IN or OPT_OUTType - Enum
Required if sms is present

Response

AttributeDescriptionFormatNote
messageReturns results of marketing subscription updateStringValue: "Marketing subscription status updated."

Error Responses

statusCodeerrorMessageerrorCodeDefinition
400 Bad RequestInvalid preference option sent for {{channel}}.INVALID_REQUESTMust be OPT_IN or OPT_OUT and {{channel}} is email or sms.
400 Bad RequestInvalid communication channel present in the request: {{InvalidCommunicationChannel}}.INVALID_REQUESTChannel must be email or sms.
400 Bad RequestPreference for email is not sent in the request.INVALID_REQUESTThere must be a valid preference, OPT_IN or OPT_OUT, in the email object.
400 Bad RequestPreference for sms is not sent in the request.INVALID_REQUESTThere must be a valid preference, OPT_IN or OPT_OUT, in the sms object.
400 Bad RequestEither Email or SMS Preference is required.INVALID_REQUESTRequest must include email or sms object with preference or both.
400 Bad RequestAccount does not have an email for email communication.INVALID_REQUESTEmail requires email address to change status.
400 Bad RequestAccount does not have a phone number for sms communication.INVALID_REQUESTAccount requires phone number for sms status change.

Request

Responses

200 - Suscription Status Updated for Email and SMS

Response Headers
    Date
    Example: Fri, 11 Apr 2025 17:30:52 GMT
    Content-Length
    Example: 52
    Connection
    Example: keep-alive
    x-amzn-RequestId
    Example: 2f345d68-242e-404d-bc0c-a8456d5de3af
    Referrer-Policy
    Example: no-referrer
    X-XSS-Protection
    Example: 1;mode=block
    Access-Control-Allow-Origin
    Example: *
    MCK-APPID
    Example: ES-CB-V1
    MCK-MSGID
    Example: mck-1bf57d0e-5f9f-440f-b623-1732074bee0e
    Expect-CT
    Example: max-age=86400
    Strict-Transport-Security
    Example: max-age=31536000; includeSubDomains; preload
    Feature-Policy
    Example: vibrate 'none'; geolocation 'none'
    X-Frame-Options
    Example: sameorigin
    Content-Security-Policy
    Example: connect-src 'none';object-src https://*.cloudfront.net;script-src https://*.cloudfront.net
    MCK-MSGTIMESTAMP
    Example: April 11th 2025, 5:30:50
    x-amz-apigw-id
    Example: I3m3oHa2oAMEhaQ=
    cache-control
    Example: no-cache, no-store, must-revalidate
    MCK_CORRELATIONID
    Example: CORRELATION_ID_NOT_PROVIDED_IN_REQUEST
    X-Content-Type-Options
    Example: nosniff
    X-Amzn-Trace-Id
    Example: Root=1-67f951ca-5edda60e21233b496a3fb6e0;Parent=292f176fd113c468;Sampled=0;Lineage=1:8112f1f4:0