# Update Contact

Update an existing contact in your address book. This endpoint allows you to modify contact details such as the phone number or associated metadata.

### <mark style="color:green;">`POST`</mark> `/addressbook/contacts/{contact_id}`&#x20;

Replace `{contact_id}` with the associated contact ID of the record you want to update.

#### Required Permission

```
update:Contacts
```

Your API key must have this permission enabled in order to use this endpoint.

### Example Request

```bash
curl --location 'https://<hostname>/addressbook/contacts/3392287d-7a79-4789-9ef8-7dc174836688' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data '{
    "msisdn": "55555555555",
    "alias": "john",
    "meta": {
      "NAME": "John Doe"
    }
  }'
```

Replace `YOUR_API_KEY` with your API key.

{% hint style="info" %}
All endpoints shown in this documentation use a **sample base URL**. The production API endpoint is provided by our team upon request.
{% endhint %}

#### Request Parameters

Path Parameters

| Field       | Type   | Required | Description                                                 |
| ----------- | ------ | -------- | ----------------------------------------------------------- |
| contact\_id | string | Yes      | The associated contact ID of the record you want to update. |

Body Parameters

| Field  | Type   | Required | Description                                   |
| ------ | ------ | -------- | --------------------------------------------- |
| msisdn | string | No       | Updated phone number in international format. |
| alias  | string | No       | Updated alias for the contact.                |
| meta   | object | No       | Updated metadata associated with the contact. |

#### Responses

#### Success (HTTP 200)

Returned when the contact is successfully updated.

```json
{
  "success": true,
  "record": {
    "id": "3392287d-7a79-4789-9ef8-7dc174836688",
    "alias": "john",
    "msisdn": "55555555555",
    "updated_on": "2025-11-10T20:45:30.000Z"
  }
}
```

#### Validation Error (HTTP 400)

Returned when the specified contact does not exist.

```json
{
  "success": false,
  "error": {
    "name": "NotFoundError",
    "statusCode": 404,
    "message": "Contact not found"
  }
}
```

{% hint style="info" %}
Updating a contact does not affect historical message records.
{% endhint %}
