Channel Preference API

The Channel Preference API is designed to manage customer opt-in/opt-out preferences for various communication channels like Email, SMS, WhatsApp, and more. These APIs help businesses manage customer consent efficiently, ensuring compliance with communication policies and privacy regulations.

API Endpoint and Method

URL

Copy
https://rcdp-us-east-1.algonomy.com/callback/rest/events/{APP_API_KEY}/eventSubscription

HTTP Method

POST

Parameters

The following parameters are used to manage customer communication preferences through the Channel Preference API:

Parameter

Type Required or Optional

Description

requestTime Number

Required

Specifies the request origination time in epoch format.
consentTime Number

Required

Specifies the time of consent capture in epoch format.
channel String Required

The communication channel for which the customer is opting in or opting out.

Example: "EMAIL", "SMS", "WHATSAPP", "DM"

allCommCategory

Boolean

Required

Indicates whether channel preferences apply to all configured senders on the specified channel. When set to true, it overrides the commCategory value.

Default: false

commCategory

String

Required

The type of communication or category the customer is subscribing to or opting out of. commCategory is the Sender ID in the campaign.

Example: "Promotional", "Newsletter"

identifier

String

Required

The unique identifier is used to recognize the customer, such as their email address or mobile number.

Example: "john@example.com"

status

Integer

Required

Indicates whether the customer is opting in (1) or opting out (0).

Example: 1 (for opt-in), 0 (for opt-out)

srcType

String

Optional

The platform or source from which the opt-in/opt-out action is being initiated.

Example: "Sorrento", "WBSTR"

srcId

String

Optional

The source identifier, often representing the platform or channel through which the request is processed.

Example: "WBSTR", "MobileApp"

GCR COM_SenderId

The GCR COM_SenderId field defines the sender identifier for communication preferences, helping to identify the source from which a customer consent request is initiated.

Sample Request

Copy
{
  "requestTime": 1721139747269,
  "consentTime": 1721139749269,
  "channel": "Email",
  "allCommCategory": true,
  "commCategory":"Newsletter",
  "identifier": "senthilkumar.r@algonomy.com",
  "status": 1,
  "srcType": "Sorrento",
  "srcId": "WBSTR"
  }

HTTP Response Codes

Response Code

Description

202 Accepted Request accepted.
200 OK Request was sent successful.
400 BAD REQUEST Invalid or missing parameter in the request.
405 Method not allowed Only HTTP POST supported.
404 NOT FOUND Page not found.
401 Unauthorized Request required user authentication (APP_API_KEY).