Contacts

The contacts resource has full CRUD functionality. It allows you to Create, Retrieve, Update, and Delete contacts. The following actions can be performed on this resource...

Retrieve All Contacts

Retrieves all contacts associated with your brand.

By default, the first set of 50 contacts will be returned, but you can modify this number with limit and offset values in the query string. The max limit for a single request is 10,000. You can also retrieve your data with pagination. You do this by passing the page and pageSize query string parameters. Page determines which page number to bring back and pageSize determines the number of contacts to bring back in that page.

When retrieving multiple contacts, you may also want to include additional criteria in the query string to filter the results by.Any field that is included in the resources is available for use as a filter. These are exact matches; they are case-sensitive and do not allow wildcards.

GET https://dev.slicktext.com/v1/contacts

Example Response:

{ "data": [ { "contact_id": 7778, "_brand_id": 123456789, "first_name": "Marty", "last_name": "McFly", "mobile_number": "+16155553338", "mobile_number_carrier": null, "email": "marty@slicktext.com", "birthdate": "1968-06-12", "address": "9303 Lyon Drive", "city": "Hill Valley", "state": "CA", "zip": 95420, "country": "US", "source": "api", "_source_id": "null", "sub_source": "null", "_sub_source_id": "null", "custom_fields": { "member": 1, "member_number": 12345, "membership_date": "1985-10-26" }, "timezone": "America/Los_Angeles", "language": "en", "opt_in_status": "subscribed", "last_opt_in_status_change": null, "created": "1955-11-12 06:38:00", "last_updated": "2015-10-15 07:28:00" } ], "pagingData": { "prevPage": null, "currentPage": null, "nextPage": null, "currentPageString": null, "hasMore": true } }

Retrieve a Specific Contact

Retrieves the single contact with the ID equal to {id}

GET https://dev.slicktext.com/v1/contacts/{{id}}

Example Response:

{ "contact_id": 7778, "_brand_id": 123456789, "first_name": "Marty", "last_name": "McFly", "mobile_number": "+16155553338", "mobile_number_carrier": null, "email": "marty@slicktext.com", "birthdate": "1968-06-12", "address": "9303 Lyon Drive", "city": "Hill Valley", "state": "CA", "zip": 95420, "country": "US", "source": "api", "_source_id": null, "sub_source": "api", "_sub_source_id": "api", "custom_fields": { "member": 1, "member_number": 12345, "membership_date": "1985-10-26" }, "timezone": "America/Los_Angeles", "language": "en", "opt_in_status": "subscribed", "last_opt_in_status_change": null, "created": "1955-11-12 06:38:00", "last_updated": "2015-10-15 07:28:00" }

Edit a Specific Contact

Allows you to edit existing contacts. You can target an existing contact by passing the contact ID OR their mobile number in your PUT request.

Arguments

PARAMETER DESCRIPTION
id The ID of the contact you are attempting to update
mobile_number The US phone number of the contact. Must be at least 10 digits. It will be normalized to digits-only, preceded by a +.
first_name The first name of contact
last_name The last name of contact
email The email address of contact
birthdate The birthday of the contact formatted as: YYYY-MM-DD
address The street address of contact
city The city of contact
state The state of contact
zip The zip code of contact
country The country of contact
timezone The time zone of contact
  • America/New_York
  • America/Chicago
  • America/Denver
  • America/Los_Angeles
language The primary language of contact
opt_in_status The opt-in status of contact.
  • Not Subscribed
  • Subscribed
  • Unsubscribed
  • Blocked

Example Response:

{ "contact_id": 25056, "_brand_id": 5, "first_name": "Marty", "last_name": "McFly", "mobile_number": "+16155553338", "mobile_number_carrier": null, "email": "mcfly@slicktext.com", "birthdate": "1968-06-12", "address": "9303 Lyon Drive", "city": "Hill Valley", "state": "CA", "zip": 95420, "country": "US", "source": "api", "custom_fields": { "member": 1, "member_number": 12345, "membership_date": "1985-10-26" }, "timezone": "America/Los_Angeles", "language": "en", "opt_in_status": "subscribed", "last_opt_in_status_change": null, "created": "1955-11-12 06:38:00", "last_updated": "2015-10-15 07:28:00" }

Create a Contact

Creates a new contact in the Brand. Using this action, the contact will receive no confirmation that they were subscribed. Only contacts who have given explicit permission to be sent text messages may be set to a Subscribed status. SlickText holds a zero tolerance policy for sending unsolicited text messages.

POST https://dev.slicktext.com/v1/contacts

Arguments

PARAMETER DESCRIPTION
mobile_number (mandatory) The US phone number of the contact. Must be at least 10 digits. It will be normalized to digits-only, preceded by a +.
first_name The first name of contact
last_name The last name of contact
email The email address of contact
birthdate The birthday of the contact formatted as: YYYY-MM-DD
address The street address of contact
city The city of contact
state The state of contact
zip The zip code of contact
country The country of contact
timezone The time zone of contact
language The primary language of contact (“en”)
opt_in_status The opt-in status of contact.
  • Not Subscribed
  • Subscribed
  • Unsubscribed
  • Blocked
force_double_opt_in Set to “true” to force the user to agree to subscribing via double opt-in message.

Example Response:

{ "contact_id": 25056, "_brand_id": 5, "first_name": "Marty", "last_name": "McFly", "mobile_number": "+16155553338", "mobile_number_carrier": null, "email": "mcfly@slicktext.com", "birthdate": "1968-06-12", "address": "9303 Lyon Drive", "city": "Hill Valley", "state": "CA", "zip": 95420, "country": "US", "source": "api", "custom_fields": { "member": 1, "member_number": 12345, "membership_date": "1985-10-26" }, "timezone": "America/Los_Angeles", "language": "en", "opt_in_status": "subscribed", "last_opt_in_status_change": null, "created": "1955-11-12 06:38:00", "last_updated": "2015-10-15 07:28:00", "force_double_opt_in": "true" }

Delete a Specific Contact

Deletes an existing contact with the ID equal to {id} from your brand. Using this action, the contact is simply removed completely from the brand. The contact can be re-opted in via the API at a later time. The contact will receive no confirmation that they were removed.

DELETE https://dev.slicktext.com/v1/contacts/{{id}}

Example Response:

[]