(BETA) Subscribe New Phone Number


Direct Subscriber Capture (Beta Feature)

Contact your Partner Success Manager to become a Beta tester.


Legal Disclosure

Note that a legal disclosure with an opt-in checkbox is required when collecting a subscribers mobile phone number for marketing purposes. Please confirm with your legal team before utilizing this feature. Upon a successful submission, Button will store the date and time of consent.

Direct Subscriber Capture

Using ButtonJS, you can make a call using our subscribePhoneNumber method to opt-in a user to an SMS marketing subscription. Upon success, a legally required "Welcome" SMS message will be sent to the subscriber's phone number informing them of their newly created subscription. If a subscription already exists, the method will try and record the attempt to create the subscription, and if successful, another "Welcome" message will be sent.

Request Options

Method Namerequired stringsubscribePhoneNumber is a static value required to subscribe a new user.
Phone Numberrequired stringA standard 10-digit US phone number encoded. String format, remove any formatting.
CallbackoptionalfuncCallback function to capture status of the response.

Integration Examples

Basic Example

bttnio('subscribePhoneNumber', '5551234567', function(res) {
  if(res.ok === false) {
    // error
  else {
  	// success

Advanced Example

bttnio('subscribePhoneNumber', '5551234567', function(res) {
  if(res.ok === false) {
    // error alert
    alert('Error processing request')
  } else {
    // add category campaign interests to your new subscriber
    // read more: https://developer.usebutton.com/docs/user-interest-segmentation
    bttnio('tagUser', {
      categories: ['Technology', 'Phones', 'Samsung']
    bttnio('tagUser', {
      categories: ['Direct Subscriber', 'Discount', 'FALLSHIPPING', 'September 2022']
    // set the customer id of the loggedin user
    // upon a successful subscription request.
    // read more: https://developer.usebutton.com/docs/synchronizing-user-journeys-across-sessions
    if(your_user.guid) {
      bttnio('setCustomerId', your_user.guid);
    // track a successful subscribed user
    // using your own onsite analytics
        event: 'sms subscribe',
        userId: 'your_user.guid'
    // success alert
    alert('Subscription created successfully')