# Change a domain's contacts

> Replace a domain's contacts with inline details or handle codes, and when that counts as an ownership change.

## PUT /api/v1/domains/contacts/update

Replaces the contact details for one or more roles on a single domain.

**Request**

```json
{
  "domainName": "apiname.com",
  "contacts": [
    {
      "contactType": "Admin",
      "firstName": "Mehmet",
      "lastName": "Kaya",
      "companyName": "Apiname Ltd",
      "eMail": "admin@apiname.com",
      "address": "Ataturk Caddesi No 12 Kat 3",
      "city": "Ankara",
      "state": "Ankara",
      "postalCode": "06000",
      "country": "TR",
      "phoneCountryCode": "90",
      "phone": "5551234567"
    }
  ]
}
```

:::caution[No auto-fill here, and no partial updates]
- Roles you do not include are **left untouched**. This endpoint does not copy one contact into the other roles the way registration does.
- Each contact you do include is **replaced wholesale**. Send every field.
- Omitting `contactType` makes the entry resolve to **Registrant** — which is almost certainly not what you meant. Always set it explicitly.
:::

**Response — 204, no body**

:::danger[Changing the registrant's name starts an ownership verification]
If you change `firstName`, `lastName` or `companyName` on the Registrant, that is an **ownership change**. An approval e-mail goes to the current owner, the domain is transfer-locked, and for some extensions the registry demands documents. Read [Contact verification](https://www.domainnameapi.com/docs/contacts/verification/) before using this endpoint on a registrant.

Changing only the address, phone or e-mail is not an ownership change — though changing the e-mail does start a new e-mail verification.
:::

**Errors**

| Code | Meaning and fix |
| --- | --- |
| `Dna.DomainService:Domain:10007` | Domain not found or not yours. |
| `Dna.DomainService:Domain:10037` | The domain uses the trustee service; its contacts cannot be changed. |
| `Dna.DomainService:Contact:10022` | Two entries resolved to the same role. |
| `Dna.DomainService:Contact:10012 / :10013 / :10014` | Country, phone country code or phone invalid. |
| `Dna.DomainService:Contact:Verification:10008` | An ownership change is already awaiting verification. |
| `Dna.DomainService:Contact:Verification:10010` | You are changing the name but the contact's e-mail is unverified. Verify it first. |
| `Dna.DomainService:Contact:10020` | The handle is shared with a domain you do not own. |
| `Dna.DomainService:Epp:10001` | The registry rejected the change. |

## PUT /api/v1/domains/contacts/update-with-handle

Points a domain's roles at handles that already exist in your account. No contact details are sent — just the handle codes.

**Request**

```json
{
  "domainName": "apiname.com",
  "handleItems": [
    { "contactType": "Registrant", "handle": "D-174829301847" },
    { "contactType": "Admin",      "handle": "D-174830552193" },
    { "contactType": "Tech",       "handle": "D-174830552193" },
    { "contactType": "Billing",    "handle": "D-174830998471" }
  ]
}
```

**Response — 204, no body**

:::note[Supply all four roles]
Use the exact names `Registrant`, `Admin`, `Billing`, `Tech`. Check `isHandleUpdateAvailable` in the TLD catalogue — a few extensions do not support re-pointing contacts this way.
:::

**Errors**

| Code | Meaning and fix |
| --- | --- |
| `Dna.DomainService:Domain:10007` | Domain not found or not yours. |
| `Dna.DomainService:Contact:10008` | A handle does not exist in your account. |
| `Dna.DomainService:Contact:10018` | A role was not supplied. |
| `Dna.DomainService:Contact:10026` | The handle is shared across domains in a way that cannot be re-pointed safely. Create a dedicated handle for this domain instead. |
| `Dna.DomainService:Domain:10037` | Trustee domain. |
