Contacts hold a recipient’s number and details. Groups collect contacts so you can message them together from the web interface. You don’t need contacts to send messages through the API, but keeping them in sync lets your team see names in conversations and reports.
Contacts
| Task | Endpoint |
|---|---|
| List or search contacts | List contacts |
| Get a contact | Get contact |
| Create a contact | Create contact |
| Update a contact | Update contact |
| Delete a contact | Delete contact |
A contact needs a number. A name and email are optional.
- Add to a group on create. Pass
groupwith a group’s title. The group is created if it doesn’t exist. - Avoid duplicates. Pass
update_if_exists: trueto update the contact with that number if one exists, instead of creating another. - Custom fields.
metadatastores custom fields on the contact. Custom fields need to be set up on your account first; ask your account manager.
List contacts supports search, sort_by, sort_order and per_page (10 to 200). See Pagination.
Global contacts
Accounts with shared, account-wide contacts can include them in results by passing with_global=true to List contacts.
Groups
Groups are read-only over the API. Create and manage them in MessagePort, or create one implicitly by passing group when you create a contact.
| Task | Endpoint |
|---|---|
| List groups | List groups |
| Get a group | Get group |