Contact

Create

POST/api/v1/contacts

This 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 ********************

Body Paramsapplication/json
  • usernamestringrequired

    The username for the contact.

  • emailarray[object] | array[string<email>] | stringrequired

    Accepts 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>required
      • isPrimarybooleanrequired
    • 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]required

    An array of objects which has phone and isPrimary as keys. (can be provided as empty array)

    Child attributes
    • phonestringrequired
    • isPrimarybooleanrequired
  • companystringoptional

    Name of the company associated with the contact.

  • tagsarray[string]optional

    Associated tags with this contact. (an array of tags'names and will create new tag if not exists)

  • channelstringoptional

    The channel where received the contact. Example: phone, email, viber, etc. (accept only name of the channel you have in app).

  • addressstringoptional

    Address of the contact.

  • notesstringoptional

    The contact's note that saved by agent.

  • customFieldsobjectoptional

    A key value pair object with name of custom field as key.

Responses

201

Created

  • namestringrequired
  • companynullrequired
  • idstringrequired
  • emailarray[string]required
  • phonearray[object]required
    Child attributes
    • phonestringoptional
    • isPrimarybooleanoptional