Contacts

Update contact tags and groups

Adds and removes tags and groups on an existing contact addressed by its E.164 phone number. The API resolves the current contact and ETag, merges each requested bucket case-insensitively, and applies the result with an optimistic PATCH; existing memberships are not wiped. Supply at least one add or remove value. A concurrent change between lookup and write returns 412.

post/contacts/by-phone/{phone}/memberships

Request

  • Base URL
    https://api.textla.com/v1
  • Auth
    HTTP bearer

Path parameters

phonestring required

E.164 phone number identifying the contact

Request body

OR
OR
OR

Example request

{
  "$schema": "/v1/schemas/UpdateContactMembershipsBody.json"
}

Response

OK

$schemastring uri

A URL to the JSON Schema for this object.

account_idstring required
birth_datestring nullable required
carrierstring nullable required
citystring nullable required
companystring nullable required
contact_typestring required
countrystring nullable required
created_atinteger required

When the contact record was created, as milliseconds since the Unix epoch

emailstring nullable required
first_namestring nullable required
groupsstring[] nullable required
idinteger required
keywordsstring[] nullable required
last_active_atinteger nullable required

When the contact was last active (used for aging), as milliseconds since the Unix epoch. Null when never recorded

last_communicated_atinteger nullable required

When a message was last sent to this contact, as milliseconds since the Unix epoch. Null until the first send

last_namestring nullable required
marked_invalid_atinteger nullable required

When the contact's phone number was marked invalid (for example, after a hard delivery failure), as milliseconds since the Unix epoch. Null while the number is considered valid

opted_in_atinteger nullable required

When the contact opted in to messaging, as milliseconds since the Unix epoch. Null if the contact has never opted in

opted_out_atinteger nullable required

When the contact opted out of messaging, as milliseconds since the Unix epoch. Null while the contact is opted in. A non-null value means the contact must not be messaged

phonestring required
postal_codestring nullable required
signed_up_atinteger nullable required

When the contact signed up, as milliseconds since the Unix epoch. Null when not provided

soft_opted_out_atinteger nullable required

When the contact was soft opted out, as milliseconds since the Unix epoch. Null while the contact is not soft opted out

statestring nullable required
streetstring nullable required
tagsstring[] nullable required
updated_atinteger required

When the contact record was last changed, as milliseconds since the Unix epoch

Example response

{
  "$schema": "/v1/schemas/Contact.json"
}

Changes

No recorded changes to this operation across all 1 revision of this API.