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

# Update a contact

Update a contact by id. <br><br> op is the operation to be performed, and path specifies what resource to patch. <br><br> Use the path contacts/0/fieldName to update fields that are user-entered for this resource, i.e. name, description, etc. <br> <br> Use the path contacts/0/links/fieldName to update this contact's links to other resources within Nutshell, i.e. accounts, owner, territory, emAudiences, etc. When performing an 'add', include a /- at the end of the path, i.e. contacts/0/links/fieldName/- .  <br><br> When using the remove operation, include the id at the end of the path (i.e. contacts/0/links/accounts/1-accounts) - no need to include a value. <br><br> Value can alternatively be a list of objects, which can be used with the replace operation and the path contacts/0/urls, contacts/0/addresses, contacts/0/phones, contacts/0/phones, contacts/0/links/emAudiences, or contacts/0/links/accounts to replace the existing list with a list of new objects. For certain replace operations like accounts and emAudiences, provide an array of strings as the value. <br><br> Visit <a href='https://developers.nutshell.com/reference/get_contacts-id-3'>the contact docs</a> for more detail on the structure of these objects. 

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Nutshell API",
    "description": "The most powerful API in the world",
    "version": "2.0.0"
  },
  "servers": [
    {
      "url": "app.nutshell.com/rest"
    }
  ],
  "paths": {
    "/contacts/{id}": {
      "patch": {
        "tags": [
          "Contacts (People)"
        ],
        "summary": "Update a contact",
        "description": "Update a contact by id. <br><br> op is the operation to be performed, and path specifies what resource to patch. <br><br> Use the path contacts/0/fieldName to update fields that are user-entered for this resource, i.e. name, description, etc. <br> <br> Use the path contacts/0/links/fieldName to update this contact's links to other resources within Nutshell, i.e. accounts, owner, territory, emAudiences, etc. When performing an 'add', include a /- at the end of the path, i.e. contacts/0/links/fieldName/- .  <br><br> When using the remove operation, include the id at the end of the path (i.e. contacts/0/links/accounts/1-accounts) - no need to include a value. <br><br> Value can alternatively be a list of objects, which can be used with the replace operation and the path contacts/0/urls, contacts/0/addresses, contacts/0/phones, contacts/0/phones, contacts/0/links/emAudiences, or contacts/0/links/accounts to replace the existing list with a list of new objects. For certain replace operations like accounts and emAudiences, provide an array of strings as the value. <br><br> Visit <a href='https://developers.nutshell.com/reference/get_contacts-id-3'>the contact docs</a> for more detail on the structure of these objects. ",
        "operationId": "cb995ae09d7e0e99e91b122bcc9358ed",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Ids are of the form 'n-contacts', where n is an integer.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/patchInput"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "patchInput": {
        "type": "array",
        "items": {
          "properties": {
            "op": {
              "description": "The operation to perform",
              "type": "string",
              "enum": [
                "add",
                "remove",
                "replace",
                "move",
                "copy"
              ],
              "example": "add"
            },
            "path": {
              "description": "The path to the attribute to patch. Can be used to update custom fields as well, such as using /leads/0/{customFieldName}",
              "type": "string",
              "example": "/leads/0/links/accounts/337-accounts"
            },
            "value": {
              "description": "The value to set, can be various types, please refer to our guide on JSON Patch for more information",
              "type": "string",
              "example": "337-accounts"
            }
          },
          "type": "object"
        }
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "tags": [
    {
      "name": "Contacts (People)",
      "description": "Contacts (People)"
    }
  ]
}
```