> ## 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 Contact
>
Update a local personal contact owned by the authenticated user. Contacts imported by the Microsoft Exchange server-to-server sync cannot be updated and return `404` with `error-contact-not-found`.
### Changelog
| Version | Description |
| ------- | ----------- |
| 9.1.0 | Added |
## OpenAPI
````json POST /api/v1/contacts.update
{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Miscellaneous"
},
"servers": [
{
"url": "https://apiexplorer.support.rocket.chat"
}
],
"tags": [
{
"name": "Commands"
},
{
"name": "Email Inbox"
},
{
"name": "Licenses"
},
{
"name": "Mailer"
},
{
"name": "Calendar Events"
},
{
"name": "Exchange"
},
{
"name": "Contacts"
},
{
"name": "WhatsApp"
},
{
"name": "Rasa App"
},
{
"name": "Jitsi App"
}
],
"paths": {
"/api/v1/contacts.update": {
"post": {
"summary": "Update Contact",
"tags": [
"Contacts"
],
"operationId": "post-api-v1-contacts.update",
"description": "\n\nUpdate a local personal contact owned by the authenticated user. Contacts imported by the Microsoft Exchange server-to-server sync cannot be updated and return `404` with `error-contact-not-found`.\n\n### Changelog\n| Version | Description |\n| ------- | ----------- |\n| 9.1.0 | Added |",
"parameters": [
{
"$ref": "#/components/parameters/Auth-Token"
},
{
"$ref": "#/components/parameters/UserId"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"contactId",
"givenName"
],
"additionalProperties": false,
"properties": {
"contactId": {
"type": "string",
"description": "Enter the contact ID to update."
},
"givenName": {
"type": "string",
"description": "Enter the contact's given name."
},
"surname": {
"type": "string",
"description": "Enter the contact's surname. Omit the field to clear it."
},
"companyName": {
"type": "string",
"description": "Enter the contact's company name."
},
"emails": {
"type": "array",
"maxItems": 10,
"items": {
"type": "object",
"required": [
"address"
],
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
},
"label": {
"type": "string"
}
}
}
},
"phones": {
"type": "array",
"maxItems": 10,
"items": {
"type": "object",
"required": [
"raw"
],
"additionalProperties": false,
"properties": {
"raw": {
"type": "string"
},
"label": {
"type": "string"
}
}
}
}
}
},
"examples": {
"Example 1": {
"value": {
"contactId": "690c2b2d4e7e8bcf6985b3d8",
"givenName": "John",
"surname": "Renamed"
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"contact": {
"$ref": "#/components/schemas/Contact"
},
"success": {
"type": "boolean"
}
}
},
"examples": {
"Example 1": {
"value": {
"contact": {
"_id": "690c2b2d4e7e8bcf6985b3d8",
"source": "local",
"displayName": "John Renamed",
"givenName": "John",
"surname": "Renamed",
"emails": [],
"phones": [],
"_updatedAt": "2025-11-05T08:10:00Z"
},
"success": true
}
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
}
}
},
"examples": {
"Missing Contact ID": {
"value": {
"success": false,
"error": "must have required property 'contactId' [error-invalid-params]"
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/authorizationError"
},
"403": {
"$ref": "#/components/responses/forbiddenError"
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
}
}
},
"examples": {
"Not Found": {
"value": {
"success": false,
"error": "error-contact-not-found"
}
}
}
}
}
}
}
}
}
},
"components": {
"parameters": {
"Auth-Token": {
"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"
}
},
"schemas": {
"Contact": {
"type": "object",
"description": "A personal contact returned by the Contacts API. Sync-only fields (`uid`, `externalId`, `folderId`, `lastSyncAt`) are never included.",
"properties": {
"_id": {
"type": "string"
},
"source": {
"type": "string",
"description": "`local` for contacts created in Rocket.Chat. `outlook` for contacts imported by Microsoft Exchange server-to-server sync.",
"enum": [
"local",
"outlook"
]
},
"displayName": {
"type": "string"
},
"givenName": {
"type": "string"
},
"surname": {
"type": "string"
},
"companyName": {
"type": "string"
},
"officeLocation": {
"type": "string"
},
"emails": {
"type": "array",
"items": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"label": {
"type": "string",
"description": "Present on local contacts. Exchange imports may omit it."
}
}
}
},
"phones": {
"type": "array",
"items": {
"type": "object",
"properties": {
"raw": {
"type": "string"
},
"e164": {
"type": "string",
"description": "E.164 form when `raw` includes a resolvable country code."
},
"label": {
"type": "string"
}
}
}
},
"categories": {
"type": "array",
"items": {
"type": "string"
}
},
"favorite": {
"type": "boolean"
},
"syncProvider": {
"type": "string",
"description": "Set on Outlook-synced contacts. Either `ews` or `graph`.",
"enum": [
"ews",
"graph"
]
},
"_updatedAt": {
"type": "string"
}
}
}
},
"responses": {
"authorizationError": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
}
}
},
"examples": {
"Authorization Error": {
"value": {
"success": false,
"error": "You must be logged in to do this."
}
}
}
}
}
},
"forbiddenError": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
},
"errorType": {
"type": "string"
}
}
},
"examples": {
"Permission Error": {
"value": {
"success": false,
"error": "User does not have the permissions required for this action",
"errorType": "error-forbidden"
}
}
}
}
}
}
}
}
}
````