v1

latestOpenAPI 3.0.02026-07-2491237338.9 KB
Unsubscribers

Create an unsubscriber

Creates an unsubscriber. An unsubscriber is a configuration item representing that customers opt out of receiving messages from your business. A customer and a channel form a unique identifier for an unsubscriber.

post/unsubscribers

Request body

type'PHONE_NUMBER' required

Type of unsubscriber.

  • PHONE_NUMBER: Indicates that the customer is a phone number in E.164 format.
customerstring required

The customer who has opted out. For type=PHONE_NUMBER, it should be a phone number in E.164 format.

channel'whatsapp' required

Channel of unsubscriber.

  • whatsapp: Indicates that the customer opts out of receiving WhatsApp messages from your business.
regionCodestring

The customer's region code, formatted in ISO 3166-1 alpha-2 country code.

Example request

{
  "customer": "+16315551111",
  "regionCode": "US"
}

Response

Successfully created an unsubscriber.

type'PHONE_NUMBER'

Type of unsubscriber.

  • PHONE_NUMBER: Indicates that the customer is a phone number in E.164 format.
customerstring

The customer who has opted out. For type=PHONE_NUMBER, it should be a phone number in E.164 format.

channel'whatsapp'

Channel of unsubscriber.

  • whatsapp: Indicates that the customer opts out of receiving WhatsApp messages from your business.
regionCodestring

The customer's region code, formatted in ISO 3166-1 alpha-2 country code.

source'Whatsapp' | 'API' | 'Manual'

The source from which a customer resumed their subscription

  • Whatsapp: The customer resumed their subscription on the whatsapp client
  • API: You remove the customer from the unsubscribe list through the OpenAPI of YCloud
  • Manual: You remove the customer from the unsubscribe list on the Contact page of YCloud.
createTimestring date-time

The time at which this object was created, formatted in RFC 3339. e.g., 2022-06-01T12:00:00.000Z.

Example response

{
  "customer": "+16315551111",
  "regionCode": "US",
  "source": "Whatsapp",
  "createTime": "2022-06-01T12:00:00.000Z"
}