> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Omnichannel Contact

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

### Changelog
| Version      | Description |
| ---------------- | ------------|
|6.1.0             | Added       |

## OpenAPI

````json POST /api/v1/omnichannel/contacts.update
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "Omnichannel"
  },
  "servers": [
    {
      "url": "https://apiexplorer.support.rocket.chat"
    }
  ],
  "tags": [
    {
      "name": "Omnichannel Users"
    },
    {
      "name": "Omnichannel Agents"
    },
    {
      "name": "Omnichannel Monitors"
    },
    {
      "name": "Omnichannel Visitors"
    },
    {
      "name": "Omnichannel Contacts"
    },
    {
      "name": "Omnichannel Rooms"
    },
    {
      "name": "Omnichannel Departments"
    },
    {
      "name": "Omnichannel Custom Fields"
    },
    {
      "name": "Omnichannel Business Hours"
    },
    {
      "name": "Omnichannel Priorities"
    },
    {
      "name": "Omnichannel Tags"
    },
    {
      "name": "Omnichannel Units"
    },
    {
      "name": "SLA Policies"
    },
    {
      "name": "Canned Responses"
    },
    {
      "name": "Omnichannel Transcript"
    },
    {
      "name": "Omnichannel Statistics"
    },
    {
      "name": "Omnichannel Agent Stats"
    },
    {
      "name": "Omnichannel Dashboards"
    },
    {
      "name": "Reports"
    },
    {
      "name": "Omnichannel Inquiries"
    },
    {
      "name": "Omnichannel Webhooks"
    },
    {
      "name": "Livechat"
    },
    {
      "name": "Livechat Appearance"
    },
    {
      "name": "Livechat Triggers"
    },
    {
      "name": "Livechat Messages"
    },
    {
      "name": "Livechat Page Visited"
    }
  ],
  "paths": {
    "/api/v1/omnichannel/contacts.update": {
      "post": {
        "summary": "Update Omnichannel Contact",
        "tags": [
          "Omnichannel Contacts"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "contact": {
                      "type": "object",
                      "properties": {
                        "_id": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "emails": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "address": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "phones": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "phoneNumber": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "channels": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "visitor": {
                                "type": "object",
                                "properties": {
                                  "visitorId": {
                                    "type": "string"
                                  },
                                  "source": {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string"
                                      }
                                    }
                                  }
                                }
                              },
                              "blocked": {
                                "type": "boolean"
                              },
                              "verified": {
                                "type": "boolean"
                              },
                              "details": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string"
                                  },
                                  "destination": {
                                    "type": "string"
                                  }
                                }
                              },
                              "lastChat": {
                                "type": "object",
                                "properties": {
                                  "_id": {
                                    "type": "string"
                                  },
                                  "ts": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "customFields": {
                          "type": "object",
                          "properties": {}
                        },
                        "unknown": {
                          "type": "boolean"
                        },
                        "preRegistration": {
                          "type": "boolean"
                        },
                        "_updatedAt": {
                          "type": "string"
                        },
                        "conflictingFields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {}
                          }
                        },
                        "lastChat": {
                          "type": "object",
                          "properties": {
                            "_id": {
                              "type": "string"
                            },
                            "ts": {
                              "type": "string"
                            }
                          }
                        },
                        "contactManager": {
                          "type": "string"
                        }
                      }
                    },
                    "success": {
                      "type": "boolean"
                    }
                  }
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "contact": {
                        "_id": "67487f45e98719b7908d0f29",
                        "createdAt": "2024-11-28T14:33:41.487Z",
                        "name": "John",
                        "emails": [
                          {
                            "address": "email@example.com"
                          }
                        ],
                        "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"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string"
                    },
                    "errorType": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "success": "false",
                      "error": "must have required property 'emails' [invalid-params]",
                      "errorType": "invalid-params"
                    }
                  },
                  "Example 2": {
                    "value": {
                      "success": "false",
                      "error": "error-contact-manager-not-found"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/authorizationError"
          },
          "403": {
            "$ref": "#/components/responses/permissionError"
          }
        },
        "operationId": "post-api-v1-omnichannel-contacts.update",
        "description": "Update omnichannel contact. Permission required: `update-livechat-contact`.\n\n### Changelog\n| Version      | Description |\n| ---------------- | ------------|\n|6.1.0             | Added       |",
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthToken"
          },
          {
            "$ref": "#/components/parameters/UserId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "examples": {
                "Example 1": {
                  "value": {
                    "contactId": "67487f45e98719b7908d0f29",
                    "name": "John",
                    "phones": [
                      "+123456789"
                    ],
                    "emails": [
                      "email@example.com"
                    ],
                    "contactManager": "9sLvmAcQk4EAGdi6e",
                    "customFields": {},
                    "wipeConflicts": "false"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "authorizationError": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "Authorization Error": {
                "value": {
                  "status": "error",
                  "message": "You must be logged in to do this."
                }
              }
            }
          }
        }
      },
      "permissionError": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean"
                },
                "error": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "Permission Error": {
                "value": {
                  "success": "false",
                  "error": "User does not have the permissions required for this action [error-unauthorized]"
                }
              },
              "Unauthorized": {
                "value": {
                  "success": "false",
                  "error": "unauthorized"
                }
              }
            }
          }
        }
      }
    },
    "parameters": {
      "AuthToken": {
        "name": "X-Auth-Token",
        "in": "header",
        "description": "The `authToken` of the authenticated user.",
        "required": "true",
        "schema": {
          "type": "string"
        },
        "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f"
      },
      "UserId": {
        "name": "X-User-Id",
        "in": "header",
        "description": "The `userId` of the authenticated user.",
        "required": "true",
        "schema": {
          "type": "string"
        },
        "example": "rbAXPnMktTFbNpwtJ"
      }
    }
  }
}
````

