# Edit a contact

Updates fields on an existing contact. Send only the fields that change.

Source: https://dev.alterestate.com/contacts/edit
Last updated: 2026-10-13

```http
PATCH https://secure.alterestate.com/api/v1/contacts/edit/{uid}/
```

Authentication: `Authorization: Token your_api_key_here`

| Parameter | In | Type | Required | Group | Description |
| --- | --- | --- | --- | --- | --- |
| `uid` | path | string | yes |  | Contact uid from List contacts or Retrieve a contact. |
| `full_name` | body | string | no | Contact | Display name. |
| `email` | body | string | no | Contact | Stored lowercase. |
| `phone` | body | string | no | Contact | Main phone. Stored in E.164. |
| `description` | body | string | no | Contact | Notes. |
| `ctype` | body | number | no | Contact | Contact type id. |
| `tag` | body | string | no | Contact | Tag uid, or null to clear it. |
| `language` | body | string | no | Contact | es_ES or en_US. |
| `is_company` | body | boolean | no | Contact | true when the contact is a company. |
| `ced_rnc` | body | string | no | Identity | Identity document. An agency that requires it rejects clearing a value that was already set. |
| `doc_type` | body | string | no | Identity | dni, passport, rnc, license or ssn. |
| `job_position` | body | string | no | Work | Job title. |
| `job_place` | body | string | no | Work | Company or workplace. |
| `address` | body | string | no | Work | Free-text address. |
| `related` | body | array | no | Agents | Numeric user ids of the assigned agents. Replaces the list. These are ids, not uids. |
| `phones` | body | array | no | Extra phones | Extra phones. Include id to update one that already exists. A new item is added when id is omitted. |
| `custom_fields` | body | object | no | Custom fields | Keys you omit stay as they are. Send null to clear a key. Keys come from GET /api/v1/custom-fields/?app=contacts. |

Example request:

```bash
curl --request PATCH \
  --url 'https://secure.alterestate.com/api/v1/contacts/edit/D9dEML2g39/' \
  --header 'Authorization: Token your_api_key_here' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "phone": "8095550123",
  "description": "Visit confirmed for Saturday.",
  "custom_fields": {
    "has_financing": true
  }
}'
```

Response 200 OK:

```json
{
  "uid": "D9dEML2g39",
  "full_name": "Ana Martinez",
  "email": "ana@example.com",
  "phone": "+18095550123",
  "description": "Visit confirmed for Saturday.",
  "custom_fields": {
    "original_source": "instagram",
    "has_financing": true
  }
}
```

Response 400 Bad Request:

```json
{
  "error": 2,
  "message": "Este correo electrónico ya existe en tu Inmobiliaria."
}
```

Response 403 Forbidden:

```json
{
  "error": "No tienes permiso para editar este contacto."
}
```

Response 404 Not Found:

```json
{
  "detail": "Not found."
}
```

## Partial updates

Send only the fields you want to change. created_by is ignored. The response is the updated contact, including custom_fields.

## Duplicates on edit

When the agency does not allow duplicates, a phone, email or WhatsApp username that already belongs to another contact returns 400. error is 1 for phone, 2 for email and 3 for WhatsApp username. The message is in Spanish.

## Who can edit

can_edit and is_owner on Retrieve a contact tell you whether this token can change it. Anyone else receives 403 with "No tienes permiso para editar este contacto." The contact stays with the user who registered it.

## Status codes

| Status | Meaning |
| --- | --- |
| 200 | The request succeeded. |
| 400 | A parameter or the body is invalid. The response names the field. |
| 401 | The token is missing or invalid. |
| 403 | The contact already exists, or this user cannot edit it. |
| 404 | The contact does not exist, or this account cannot open it. |
| 429 | Too many requests. Wait and retry. |
| 500 | Server error while processing the request. |

- [Retrieve a contact](https://dev.alterestate.com/contacts/retrieve)
- [Create a contact](https://dev.alterestate.com/contacts/create)
- [List contacts](https://dev.alterestate.com/contacts/list)

## FAQ

### Do I have to send every contact field?

No. PATCH updates only the fields you send. related replaces the assigned-agent list when you send it.

### Can I change who registered the contact?

No. created_by is ignored on PATCH. The contact stays with the user who registered it.
