Contact update

Changes a contact's details and statuses.

Request

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <update>
      <contact:update xmlns:contact="urn:ietf:params:xml:ns:contact-1.0">
        <contact:id>EXAMPLE-1-C1</contact:id>
        <contact:add>
          <contact:status s="clientUpdateProhibited"/>
        </contact:add>
        <contact:chg>
          <contact:email>new@example.com.ua</contact:email>
        </contact:chg>
      </contact:update>
    </update>
    <clTRID>EXAMPLE-1-cupd-0001</clTRID>
  </command>
</epp>

add and rem carry statuses; chg carries the data.

How a postal block is applied here

This server merges a <contact:postalInfo> in <chg> field by field into the block of that type it already holds. A field you leave out keeps its stored value; a field you send replaces it. The int and loc blocks are independent — changing one does not touch the other.

Send the complete block anyway. Not every registry merges: in some zones a partial block replaces the stored one, so a change that is safe here can drop a registrant's street address in the zone — behind a 1000. Read the contact with info, change what you need in the block it returns, and send the whole thing back.

That advice is worth the extra bytes. The failure it prevents is silent, and what it destroys is somebody's registration data.

Clearing a field

  • org, street and sp are optional in the schema, so an empty element is valid and clears them.
  • name, city and cc are not optional: an empty one is schema-invalid and comes back as a bare 2001 that names no element — a confusing answer whose cause is simply that these three must always have a value.
  • Clearing a phone number is not done with an empty element. Ask before you rely on a particular form: it differs by zone, and in some an empty <contact:voice/> is accepted with 1000 while changing nothing at all.

Here is how that looks together: the organisation is cleared with an empty element, and the rest of the postal block is sent whole, as the section above advises.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <update>
      <contact:update xmlns:contact="urn:ietf:params:xml:ns:contact-1.0">
        <contact:id>EXAMPLE-1-C1</contact:id>
        <contact:chg>
          <contact:postalInfo type="int">
            <contact:name>Ivan Petrenko</contact:name>
            <contact:org/>
            <contact:addr>
              <contact:street>12 Khreshchatyk</contact:street>
              <contact:city>Kyiv</contact:city>
              <contact:pc>01001</contact:pc>
              <contact:cc>UA</contact:cc>
            </contact:addr>
          </contact:postalInfo>
        </contact:chg>
      </contact:update>
    </update>
    <clTRID>EXAMPLE-1-cupd-0002</clTRID>
  </command>
</epp>

Statuses

You may add and remove your own: clientUpdateProhibited, clientDeleteProhibited, clientTransferProhibited. The server* ones are the registry's — a command carrying one is refused whole, so a single server* status in a batch takes the legitimate half of the change with it.

As with domains, clientUpdateProhibited blocks updates, and the only command that can lift it is one whose sole content is its removal.

Who it affects

A contact referenced by several domains is one object. An update made for one customer rewrites the registration data of every domain that references it — which is the reason not to share contacts between unrelated customers.

What the server refuses, in its own words

Each refusal arrives as a result code and a sentence in <result><msg>, in the shape Commands and responses shows. The sentence is translated into the language you chose at login where a translation exists, and the lang attribute says which language you are being given. Branch on the code, never on the sentence — the code is the contract, the wording is not.

CodeWhat the message says
2003A postal address (contact:postalInfo) is required
2005Country code must be 2 letters
2005Invalid email address
2304A domain that references this contact is under an operator freeze
2304Contact status prohibits update
2306An operator may show contact data only together with the evidence of consent to its publication
2306At most 3 street lines
2400Internal error
2400The consent to publication could not be recorded, so nothing was changed; retry the command

Result codes

CodeWhen
1000applied
2001schema-invalid — most often an empty name, city or cc
2005Cyrillic in an int block, a malformed e-mail or phone
2303no such contact
2304a status prohibits it
2306policy — a weak transfer code, or a server* status you may not set

On this page