Skip to main content
POST
/
v1
/
contacts
/
{contactId}
/
channels
Add channel to contact
curl --request POST \
  --url https://api.zavu.dev/v1/contacts/{contactId}/channels \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "channel": "email",
  "identifier": "john.work@company.com",
  "label": "work"
}
'
{
  "channel": {
    "id": "<string>",
    "channel": "sms",
    "identifier": "+14155551234",
    "isPrimary": true,
    "verified": true,
    "createdAt": "2023-11-07T05:31:56Z",
    "countryCode": "US",
    "label": "work",
    "metrics": {
      "successCount": 123,
      "failureCount": 123,
      "totalAttempts": 123,
      "avgDeliveryTimeMs": 123,
      "lastSuccessAt": "2023-11-07T05:31:56Z"
    },
    "lastInboundAt": "2023-11-07T05:31:56Z",
    "metadata": {},
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

contactId
string
required

Body

application/json

Request body to add a channel to a contact.

channel
enum<string>
required

Channel type.

Available options:
sms,
whatsapp,
email,
telegram,
voice
identifier
string
required

Channel identifier (phone number in E.164 format or email address).

Example:

"+14155551234"

countryCode
string

ISO country code for phone numbers.

Required string length: 2
Example:

"US"

label
string

Optional label for the channel.

Maximum string length: 50
Example:

"work"

isPrimary
boolean
default:false

Whether this should be the primary channel for its type.

Response

Channel added.

channel
object
required

A communication channel for a contact.