Update Omnichannel Contact
    • Dark
      Light
    • PDF

    Update Omnichannel Contact

    • Dark
      Light
    • PDF

    Article summary

    Post
    /api/v1/omnichannel/contacts.update

    Update omnichannel contact. Permission required: update-livechat-contact.

    Changelog

    VersionDescription
    6.1.0Added
    Header parameters
    X-Auth-Token
    stringRequired

    The authToken of the authenticated user.

    ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
    X-User-Id
    stringRequired

    The userId of the authenticated user.

    ExamplerbAXPnMktTFbNpwtJ
    Body parameters
    Example 1
    {
      "contactId": "67487f45e98719b7908d0f29",
      "name": "John",
      "phones": [
        "+123456789"
      ],
      "emails": [
        "[email protected]"
      ],
      "contactManager": "9sLvmAcQk4EAGdi6e",
      "customFields": {},
      "wipeConflicts": false
    }
    Expand All
    object
    contactId
    string Required

    The contact's ID.

    Default"67487f45e98719b7908d0f29"
    name
    string

    The contact's name.

    ExampleJohn
    phones
    Array of string

    An array of the contact's phone number(s).

    string
    Example+123456789
    emails
    Array of string

    An array of the contact's email address(es).

    string
    contactManager
    string

    The contact manager's ID.

    Example9sLvmAcQk4EAGdi6e
    customFields
    object

    Object defining the custom fields to be updated.

    wipeConflicts
    boolean

    Boolean to determine whether conflicts impacting contacts should be automatically resolved.

    Responses
    200

    OK

    Example 1
    {
      "contact": {
        "_id": "67487f45e98719b7908d0f29",
        "createdAt": "2024-11-28T14:33:41.487Z",
        "name": "John",
        "emails": [
          {
            "address": "[email protected]"
          }
        ],
        "phones": [
          {
            "phoneNumber": "+123383883838"
          }
        ],
        "channels": [
          {
            "name": "widget",
            "visitor": {
              "visitorId": "67499b2243725ce31dd57fc7",
              "source": {
                "type": "widget"
              }
            },
            "blocked": false,
            "verified": false,
            "details": {
              "type": "widget",
              "destination": "example.com"
            },
            "lastChat": {
              "_id": "bC5x3zmBdgtmA4m3W",
              "ts": "2024-11-29T10:44:55.016Z"
            }
          }
        ],
        "customFields": {},
        "unknown": false,
        "preRegistration": false,
        "_updatedAt": "2024-11-29T13:31:43.595Z",
        "conflictingFields": [],
        "lastChat": {
          "_id": "bC5x3zmBdgtmA4m3W",
          "ts": "2024-11-29T10:44:55.016Z"
        },
        "contactManager": "9sLvmAcQk4EAGdi6e"
      },
      "success": true
    }
    Expand All
    object
    contact
    object
    _id
    string
    createdAt
    string
    name
    string
    emails
    Array of object
    object
    address
    string
    phones
    Array of object
    object
    phoneNumber
    string
    channels
    Array of object
    object
    name
    string
    visitor
    object
    visitorId
    string
    source
    object
    type
    string
    blocked
    boolean
    verified
    boolean
    details
    object
    type
    string
    destination
    string
    lastChat
    object
    _id
    string
    ts
    string
    customFields
    object
    unknown
    boolean
    preRegistration
    boolean
    _updatedAt
    string
    conflictingFields
    Array of object
    object
    lastChat
    object
    _id
    string
    ts
    string
    contactManager
    string
    success
    boolean
    400

    Bad Request

    Example 1
    {
      "success": false,
      "error": "must have required property 'emails' [invalid-params]",
      "errorType": "invalid-params"
    }
    Example 2
    {
      "success": false,
      "error": "error-contact-manager-not-found"
    }
    object
    success
    boolean
    error
    string
    errorType
    string
    401

    Unauthorized

    Authorization Error
    {
      "status": "error",
      "message": "You must be logged in to do this."
    }
    object
    status
    string
    message
    string
    403

    Forbidden

    Example 1
    {
      "success": false,
      "error": "User does not have the permissions required for this action [error-unauthorized]"
    }
    Example 2
    {
      "success": false,
      "error": "unauthorized"
    }
    object
    success
    boolean
    error
    string

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.