contacts
Create contact
Create a new contact. Optionally create a platform channel in the same request by providing accountId, platform, and platformIdentifier.
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
profileIdstring
namestring
email?string
company?string
tags?array<string>
isSubscribed?boolean
Default
truenotes?string
accountId?string
Optional. Creates a channel if provided with platform + platformIdentifier
platform?string
platformIdentifier?string
displayIdentifier?string
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.contacts.createContact({ body: { profileId: 'profile_abc123', name: 'Example', },});console.log(data);{
"success": true,
"contact": {
"id": "string",
"name": "string",
"email": "string",
"company": "string",
"tags": [
"string"
],
"isSubscribed": true,
"isBlocked": true,
"customFields": {},
"notes": "string",
"createdAt": "2019-08-24T14:15:22Z"
},
"channel": {
"id": "string",
"platform": "string",
"platformIdentifier": "string",
"displayIdentifier": "string"
},
"warning": "string"
}{
"error": "Unauthorized"
}Empty