All contact commands: (check) (create) (delete) (info) (modify)
You check the existence of contact by sending a contact:check command. For speed purposes, the system will only return if the contact object exists, no extra information is returned.
In this example we are checking MTR00001 and MTR00002 for availability.
<?xml version="1.0" encoding="UTF-8"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0 xmlns:contact="urn:ietf:params:xml:ns:contact-1.0">
<command>
<check>
<contact:check>
<contact:id>MTR00001</contact:id>
</contact:check>
</check>
<clTRID>57c42c1b5a0ba</clTRID>
</command>
</epp>
<?xml version="1.0" encoding="UTF-8"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:contact="urn:ietf:params:xml:ns:contact-1.0">
<response>
<result code="1000">
<msg>Command completed successfully</msg>
</result>
<resData>
<contact:chkData>
<contact:cd>
<contact:id avail="true">MTR00001</contact:id>
</contact:cd>
</contact:chkData>
</resData>
<trID>
<svTRID>MTR_7f32961e5acbda045b0a85a69c9b15de0f66c627</svTRID>
<clTRID>57c42c1b5a0ba</clTRID>
</trID>
</response>
</epp>
The 'avail=true' result above indicates that the contact object is available, that means that it does not exist.
Create the contact object first if you want to use it in a domain name. When the result indicates 'avail=false', the contact exists and you can use the contact object in a domain name command.