Assign Custom Subscriber Attributes

Learn how you can add and update the Custom Subscriber Attributes assigned to your individual subscribers.

Custom Subscriber Attributes are used to store data of any type that you choose to define for your subscribers. These attributes can be added and updated manually through the platform, automatically from your subscribers via SMS with a workflow, and with the MTA API.

This page describes how to assign Custom Subscriber Attributes, see Custom Subscriber Attributes to learn how to create these fields with the API.

Manage Custom Subscriber Attributes in the Dashboard

Visit the Manage Custom Attributes tab in the platform dashboard by selecting Subscribers > Attributes. Here you can view and search all attributes currently available for your subscribers.

Edit or Delete Attributes

Click on a specific attribute to edit it, or click the "trash bin" icon to delete an attribute.

Add Attributes

  1. Click the Add Attribute button.

  2. Enter the Name of the new attribute.

  3. Select the from the following data types under Attribute Type:

    • Text (plain text)

    • Number (digits only)

    • Date (you will need to specify the date format)

    • Checkbox (a flag option that allows either checked or unchecked)

    • Option/Multi Options (this will allow you to create an enum of possible options)

    • Address (text for storing subscriber addresses)

Example: To create a field to store subscribers' birthdays, you could create the following attribute:

  • Name: "Birthday" with the Attribute Type: Date.

Assign Attributes to Subscribers

After your attributes are created, you can assign the data for those attributes to your subscribers manually on the Manage Subscribers page, or by importing a spreadsheet.

You can also configure your account's sign-up page to collect subscriber data as part of the enrollment process.

Use a Workflow to collect Subscriber Attributes

Workflow Builder allows you to automatically collect data from your subscribers via SMS.

Click here to learn more.

Manage Subscriber Attributes with the MTA API

Add/Update a Subscriber's attributes

This section explains how to add/update attributes for individual subscribers on your account. To learn how to manage the attributes that are configured for your account, visit Custom Subscriber Attributes.

Subscriber attributes can be added or updated by including key/value pairs in subscriberFields as part of the request body to one of the /subscribers endpoints.

The data type of the Custom Subscriber Attribute must match what is configured for that field. For example, the below request uses the following Custom Subscriber Attribute: "name":"Birthday","type":"date","format":"MM/DD/YYYY"

Example Request to Create a Subscriber POST /subscribers

curl -XPOST --location 'https://api.mobile-text-alerts.com/v3/subscribers' \
  --header 'Authorization: Bearer 89fa747a-e01b-5940-99c2-4e96fa996258' 
  --header 'Content-Type:application/json' \
  --data-raw '{  
    "firstName": "FirstName", 
    "lastName": "LastName", 
    "number": 8002223333, 
    "email": "[email protected]"
    "subscriberFields": {
      "": "01/01/2000"
    } 
}'

MTA will assign each custom attribute a SubscriberFieldId and each subscriber attribute will have a unique id assigned for that instance. This data can be retrieved by viewing the subscriber data from the API.

View Subscriber Attributes

Custom subscriber attributes are returned by the Mobile Text Alerts API in the field subscriberFieldData which contains:

  • id - Refers to the specific instance of that field for the specified subscriber

  • subscriberFieldId - Identifies the CustomFieldId of the Custom Subscriber Attribute, this can be used to retrieve or update the Custom Subscriber Attribute.

  • data - the data of this field for the specified subscriber

For example when retrieving a subscriber's data from GET /subscribers:

Example Response:

{"id":109021626,
    "firstName":"Test",
    "lastName":"Example",
    "email":"[email protected]",
    "number":0,
    "date":"2025-03-20T19:09:38.000Z",
    "countryId":null,
    "groups":[],
    "":
        [{"id":21323389,"subscriberFieldId":7506,"data":"01/01/2000"},
        {"id":21323390,"subscriberFieldId":7507,"data":"ExampleAttribute"}],
    "signupMethod":11,
    "longNumber":0,
    "carrierId":41
}

Last updated

Was this helpful?