Skip to content
Get Started

Contacts

Operations for managing contacts

Get contacts
contacts.list(ContactListParams**kwargs) -> ContactListResponse
GET/api/v2/contacts
Create a contact
contacts.create(ContactCreateParams**kwargs) -> ContactCreateResponse
POST/api/v2/contacts
Get contact count
contacts.count() -> ContactCountResponse
GET/api/v2/contacts/count
Verify a contact
contacts.verify(ContactVerifyParams**kwargs) -> ContactVerifyResponse
POST/api/v2/contacts/verify
Get a contact
contacts.retrieve(strphone_number) -> ContactRetrieveResponse
GET/api/v2/contacts/{phone_number}
Update a contact
contacts.update(strphone_number, ContactUpdateParams**kwargs) -> ContactUpdateResponse
PUT/api/v2/contacts/{phone_number}
Delete a contact
contacts.delete(strphone_number) -> ContactDeleteResponse
DELETE/api/v2/contacts/{phone_number}
Opt out a contact
contacts.opt_out(ContactOptOutParams**kwargs) -> ContactOptOutResponse
POST/api/v2/contacts/opt-out
ModelsExpand Collapse
class Contact:
assigned_to_email: Optional[str]

Email of assigned user

company_name: Optional[str]

Company name

created_at: Optional[datetime]

When the contact was created

formatdate-time
custom_variables: Optional[Dict[str, str]]

Custom key-value pairs stored on the contact. Keys are human-readable labels.

first_name: Optional[str]

First name

last_name: Optional[str]

Last name

opt_out: Optional[bool]

Whether the contact has opted out of SMS (from recipient opt-out state)

phone: Optional[str]

Phone number in E.164 format

sendblue_number: Optional[str]

Associated Sendblue phone number

tags: Optional[List[str]]

Tags associated with the contact

verified: Optional[bool]

Whether the contact is verified

List[Contact]
assigned_to_email: Optional[str]

Email of assigned user

company_name: Optional[str]

Company name

created_at: Optional[datetime]

When the contact was created

formatdate-time
custom_variables: Optional[Dict[str, str]]

Custom key-value pairs stored on the contact. Keys are human-readable labels.

first_name: Optional[str]

First name

last_name: Optional[str]

Last name

opt_out: Optional[bool]

Whether the contact has opted out of SMS (from recipient opt-out state)

phone: Optional[str]

Phone number in E.164 format

sendblue_number: Optional[str]

Associated Sendblue phone number

tags: Optional[List[str]]

Tags associated with the contact

verified: Optional[bool]

Whether the contact is verified

class ContactCreateResponse:
contact: Optional[Contact]
assigned_to_email: Optional[str]

Email of assigned user

company_name: Optional[str]

Company name

created_at: Optional[datetime]

When the contact was created

formatdate-time
custom_variables: Optional[Dict[str, str]]

Custom key-value pairs stored on the contact. Keys are human-readable labels.

first_name: Optional[str]

First name

last_name: Optional[str]

Last name

opt_out: Optional[bool]

Whether the contact has opted out of SMS (from recipient opt-out state)

phone: Optional[str]

Phone number in E.164 format

sendblue_number: Optional[str]

Associated Sendblue phone number

tags: Optional[List[str]]

Tags associated with the contact

verified: Optional[bool]

Whether the contact is verified

status: Optional[str]
class ContactCountResponse:
count: Optional[int]

Total number of contacts

class ContactVerifyResponse:
status: Optional[str]
class ContactRetrieveResponse:
contact: Optional[Contact]
assigned_to_email: Optional[str]

Email of assigned user

company_name: Optional[str]

Company name

created_at: Optional[datetime]

When the contact was created

formatdate-time
custom_variables: Optional[Dict[str, str]]

Custom key-value pairs stored on the contact. Keys are human-readable labels.

first_name: Optional[str]

First name

last_name: Optional[str]

Last name

opt_out: Optional[bool]

Whether the contact has opted out of SMS (from recipient opt-out state)

phone: Optional[str]

Phone number in E.164 format

sendblue_number: Optional[str]

Associated Sendblue phone number

tags: Optional[List[str]]

Tags associated with the contact

verified: Optional[bool]

Whether the contact is verified

status: Optional[str]
class ContactUpdateResponse:
contact: Optional[Contact]
assigned_to_email: Optional[str]

Email of assigned user

company_name: Optional[str]

Company name

created_at: Optional[datetime]

When the contact was created

formatdate-time
custom_variables: Optional[Dict[str, str]]

Custom key-value pairs stored on the contact. Keys are human-readable labels.

first_name: Optional[str]

First name

last_name: Optional[str]

Last name

opt_out: Optional[bool]

Whether the contact has opted out of SMS (from recipient opt-out state)

phone: Optional[str]

Phone number in E.164 format

sendblue_number: Optional[str]

Associated Sendblue phone number

tags: Optional[List[str]]

Tags associated with the contact

verified: Optional[bool]

Whether the contact is verified

status: Optional[str]
class ContactDeleteResponse:
status: Optional[str]
class ContactOptOutResponse:
number: Optional[str]

The normalized phone number

opted_out: Optional[bool]

The current opt-out status

status: Optional[str]

ContactsBulk

Operations for managing contacts

Delete multiple contacts
contacts.bulk.delete(BulkDeleteParams**kwargs) -> BulkDeleteResponse
DELETE/api/v2/contacts
Create multiple contacts
contacts.bulk.create(BulkCreateParams**kwargs) -> BulkCreateResponse
POST/api/v2/contacts/bulk
ModelsExpand Collapse
class BulkDeleteResponse:
amount: Optional[int]

Number of contacts deleted

status: Optional[str]
class BulkCreateResponse:
contacts: Optional[List[Contact]]
assigned_to_email: Optional[str]

Email of assigned user

company_name: Optional[str]

Company name

created_at: Optional[datetime]

When the contact was created

formatdate-time
custom_variables: Optional[Dict[str, str]]

Custom key-value pairs stored on the contact. Keys are human-readable labels.

first_name: Optional[str]

First name

last_name: Optional[str]

Last name

opt_out: Optional[bool]

Whether the contact has opted out of SMS (from recipient opt-out state)

phone: Optional[str]

Phone number in E.164 format

sendblue_number: Optional[str]

Associated Sendblue phone number

tags: Optional[List[str]]

Tags associated with the contact

verified: Optional[bool]

Whether the contact is verified

status: Optional[str]