v1

latestOpenAPI 3.1.02026-07-26620219.6 KB

Create or update subscriber

Sync subscribers from any subscription collection tool, for example, a third-party subscription popup.

post/messaging/v3/stores/store_id/subscribers (COPY)

Path parameters

store_idstring required

The store ID (app_key).

Query parameters

access_tokenstring required

Your Yotpo access token. Click here to learn how to generate one

Request body

phonestring required

The phone number of the customer in E.164 format. Max length: 15 characters

emailstring

The customer's email address

list_idinteger required

The ID of the list the customers will be added to. If a list ID isn’t provided, the customer will be assigned to the default list of the account. See below for instructions on how to find the List ID.

consentstring required

This is the state of the customer consent for SMS and/or email messages. The possible values are ‘subscribed’ or ‘unsubscribed’. If the field is left blank, the consent will be marked as ‘never subscribed’

first_namestring

The customer's first name

last_namestring

The customer's last name

sourcestring

This is the source of the SMS and/or email consent, for example, ‘welcome_popup’. The field is optional. Min length: 3 characters; Max length: 40 characters

suppress_emailstring

The status of the suppression of the email. The possible values are ‘true’ or ‘false’. If left blank, the value of the field will default to ‘false’. The field is optional

suppression_reasonstring

The reason for suppressing the email. The possible values are ‘soft_bounce’, ‘hard_bounce’, and ‘manual_suppression’. If left blank, it defaults to ‘manual_suppression’.

timestampstring date

The timestamp of the suppression. The format of this date field is Y-m-d\TH:i:s.u\Z (example - 2014-06-24T22:37:13.151Z). If left blank, it defaults to the time and date when the endpoint is hit. The field is optional.

suppress_welcome_messagesstring

This field’s value defines whether the subscriber will receive welcome flow messages for the channel(s) they’re subscribed to using the endpoint. The possible values are: _ ‘true’ - No welcome message will be sent _ ‘false’ - A welcome message will be sent If left blank, the value defaults to ‘false’. The field is optional

trigger_double_opt_instring

This field's value defines whether the subscriber will receive a double opt-in message to confirm their subscription for SMS.

Response

200

OR
OR

Example response

{
  "sms": {
    "unsubscriber": {
      "phone": "12025550333",
      "email": "janedoe@example.com",
      "list_id": "null"
    }
  },
  "email": {
    "unsubscriber": {
      "phone": "12025550333",
      "email": "janedoe@example.com",
      "list_id": "null"
    }
  }
}