Messaging API

Contacts

Create, list, update, import, and export messaging contacts.

Contacts are the people you message. They also provide the audience for campaigns.

Create a contact

POSThttps://api.tryvox.io/v1/messaging/contacts
FieldTypeRequiredDescription
phone_numberstringYesThe contact's number. Use E.164 format
namestringNoDisplay name
emailstringNoEmail address
tagsstringNoTags, used to select campaign audiences
country_codestringNoCountry of the number
curl -X POST https://api.tryvox.io/v1/messaging/contacts \
  -u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN \
  -H "Content-Type: application/json" \
  -d '{"phone_number": "+919812345678", "name": "Asha", "tags": "vip"}'

List contacts

GEThttps://api.tryvox.io/v1/messaging/contacts
ParameterDescription
tagOnly contacts with this tag
searchFree-text search
opted_intrue or false
page, per_pagePage number, and page size up to 100 (default 20)

Other operations

MethodPathPurpose
GET/v1/messaging/contacts/{id}Get one contact
PUT/v1/messaging/contacts/{id}Update name, email, tags, or opted_in
DELETE/v1/messaging/contacts/{id}Delete a contact
GET/v1/messaging/contacts/exportExport contacts

Import from CSV

Upload a CSV file as the multipart field file. It must have a phone column.

curl -X POST https://api.tryvox.io/v1/messaging/contacts/import \
  -u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN \
  -F "file=@contacts.csv"
DataAccepted column names
Phone (required)phone, phone_number, phonenumber, mobile
Namename, full_name, fullname, contact_name
Emailemail, email_address
Tagstags, tag, labels
Countrycountry, country_code

The response reports how many rows were imported and skipped.

On this page