All Collections
Mobile Messaging
REST API & Transactional Messages
Add Custom Profile Details to an SMS Contact through an API Call
Add Custom Profile Details to an SMS Contact through an API Call

Learn more about the API calls used to include custom segmentation when creating a contact.

Support avatar
Written by Support
Updated over a week ago

Before moving to the following steps, be sure to have previously created your custom fields in the segmentation menu. Click here to learn more about creating custom fields.

You can locate the custom field ID through the Listrak Application or programmatically through an API call.

LOCATING THE CUSTOM FIELD ID

You can locate the custom field IDs by navigating to Contacts > SMS Contacts Profile Fields.

GETTING THE CALLS PROGRAMMATICALLY

Be sure to have previously authenticated yourself to fire the below calls.

1. Open https://api.listrak.com/sms in a tab.
2. Navigate to the Segmentation tab.
3. Then Get all Segmentation Fields.
4. Copy the relative Get all Segmentation Fields URL from the right-hand side of the page.

5. Navigate to Postman.
6. Paste the relative URL in the address bar.
7. Click Headers.
8. Click Send.
9. Locate the Segmentation Field ID that is necessary.

You now have the necessary Custom Field ID for the following API call. The next step is to update a contact, or create a new contact.

UPDATING A CONTACT

If you'd like to just update a contact instead of creating a new one, follow the below steps to do this programmatically.

1. Open https://api.listrak.com/sms.
2. Navigate to Contact.
3. Then Update Contact.
4. Copy the relative Update Contact URL from the right-hand side of the page.

5. Navigate to Postman.
6. Paste the relative URL in the address bar.
7. Ensure that a PUT call is used to update the contact's profile.
8. Click Send.

You've now updated a contact!

Did this answer your question?