Create
/api/v1/contactsThis endpoint allows you to add a new contact to your contact list in klink.cloud. To add a contact, you must provide their klink.cloud username and phone number.
Request
Authorization
Bearer Token
Provide your API token in the Authorization header. See Authentication to issue one.
Example:Authorization: Bearer ********************
usernamestringrequiredThe username for the contact.
emailarray[object] | array[string<email>] | stringrequiredAccepts one of three formats: (1) an array of objects with email and isPrimary keys, (2) an array of email strings, or (3) a single string of semicolon-separated emails, e.g. "user_a@mih.com; user_b@mih.com;". For formats 2 and 3, the first email is treated as primary. (can be provided as an empty array or empty string)
Possible formats
- Array of email objectsarray[object]
An array of objects which has email and isPrimary as keys. (can be provided as empty array)
Child attributes
emailstring<email>requiredisPrimarybooleanrequired
- Array of email stringsarray[string<email>]
An array of email addresses. The first email is treated as primary.
- Semicolon-separated stringstring
One or more email addresses separated by semicolons, e.g. "user_a@mih.com; user_b@mih.com;". Whitespace and trailing semicolons are ignored. The first email is treated as primary.
phonearray[object]requiredAn array of objects which has phone and isPrimary as keys. (can be provided as empty array)
Child attributes
phonestringrequiredisPrimarybooleanrequired
companystringoptionalName of the company associated with the contact.
tagsarray[string]optionalAssociated tags with this contact. (an array of tags'names and will create new tag if not exists)
channelstringoptionalThe channel where received the contact. Example: phone, email, viber, etc. (accept only name of the channel you have in app).
addressstringoptionalAddress of the contact.
notesstringoptionalThe contact's note that saved by agent.
customFieldsobjectoptionalA key value pair object with name of custom field as key.
Responses
201Created
Created
namestringrequiredcompanynullrequiredidstringrequiredemailarray[string]requiredphonearray[object]requiredChild attributes
phonestringoptionalisPrimarybooleanoptional