---
title: "Update a contact"
method: PATCH
path: "/v1/contacts/{id}"
tags: ["Contacts"]
---

# Update a contact

`PATCH /v1/contacts/{id}`

## Request

- Base URL: `https://api.honkio.ca`
- URL: `https://api.honkio.ca/v1/contacts/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Requires `contacts:m`.

## Path parameters

- `id` string, required

## Request body

- object
  - `phone_number` string, nullable: E.164, or null to clear (refused with 409 CONTACT_IN_USE while the contact is in a group or list, and with 422 when the contact would be left with neither identifier).
  - `email` string, email, nullable
  - `name` string, nullable
  - `notes` string, nullable

## Response `200`

The updated contact.

- Contact: A contact: a phone number, an email, or both.
  - `id` string, required
  - `phone_number` string, nullable, required: E.164; null for an email-only contact. Only contacts with a phone can join groups and lists.
  - `email` string, nullable, required: Lower-cased; null for a phone-only contact. At least one of phone_number and email is set.
  - `name` string, nullable, required
  - `notes` string, nullable, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `401`: Missing, invalid, revoked or expired API key.
- `402`: The account has no balance, or a LIVE key was used before the first top-up.
- `403`: LIVE_KEY_REQUIRED when a test key tries to change something a live key's allow/deny list references. Also FORBIDDEN when the key lacks the permission.
- `404`: CONTACT_NOT_FOUND.
- `409`: CONTACT_ALREADY_EXISTS (the new phone number or email is another contact's) or CONTACT_IN_USE (clearing the phone of a contact that is in a group or a list).
- `422`: VALIDATION_ERROR (the contact would be left with neither phone_number nor email) or INVALID_PHONE_NUMBER.
- `429`: Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/honkio/apis/honkio-api.md) · [All operations](https://skmtc.dev/honkio/apis/honkio-api/llms.txt) · [OpenAPI document](https://skmtc.dev/honkio/apis/honkio-api/revisions/ce4ed3fe9691?raw)
