Contacts

Create a contact

Creates one contact under the authenticated account. The account ID is taken from the bearer token. Duplicate phone numbers are rejected; use the bulk endpoint for upsert behavior. Custom fields may identify an existing definition by its opaque field_id or by name.

post/contacts

Request

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

Request body

$schemastring uri

A URL to the JSON Schema for this object.

birth_datestring
citystring
companystring
contact_type'subscriber' | 'lead'

Type of contact: subscriber or lead

countrystring
emailstring
first_namestring
groupsstring[]
keywordsstring[]
last_namestring
manually_addedboolean
opted_in_atinteger nullable

When the contact opted in, as milliseconds since the Unix epoch. Null is the same as omitting it

phonestring required
postal_codestring
signed_up_atinteger nullable

When the contact joined the list, as milliseconds since the Unix epoch. Defaults to the current time if omitted or null

statestring
streetstring
tagsstring[]

Example request

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

Response

Created

$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.