Commands and responses
Every command has the same shape, and so does every answer. Once your client handles this envelope properly, each individual command is only a matter of what goes inside it.
The envelope
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<!-- exactly one of: check, info, create, update, delete, renew, transfer, poll -->
<extension> ... </extension> <!-- optional, and only what you declared at login -->
<clTRID>your-own-identifier</clTRID>
</command>
</epp>
<?xml version="1.0" encoding="UTF-8"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="1000">
<msg>Command completed successfully</msg>
</result>
<resData> ... </resData> <!-- present when the command returns data -->
<extension> ... </extension> <!-- present when an extension adds something -->
<trID>
<clTRID>your-own-identifier</clTRID>
<svTRID>NSPC-19700101000000-A1B2C3D4E5F6</svTRID>
</trID>
</response>
</epp>
A refused command
Every refusal has the same shape: a code, a sentence, and the two transaction identifiers. There is no <resData>, because nothing happened.
<?xml version="1.0" encoding="UTF-8"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="2304">
<msg lang="en">Domain status prohibits renewal</msg>
</result>
<trID>
<clTRID>EXAMPLE-1-rnw-0001</clTRID>
<svTRID>NSPC-19700101000000-A1B2C3D4E5F6</svTRID>
</trID>
</response>
</epp>
Three things in this answer matter.
The code is the contract. 2304 means what RFC 5730 says it means, in every command and for ever. Branch on it.
The sentence is not. It is there for the person reading your log, it is translated into the language you chose at login where we have a translation, and lang tells you which language you were given. A client that matches on the text breaks the day the wording improves or the day somebody logs in in another language. Each command page lists the sentences that command can return, so you can see them without provoking them.
Nothing was charged. A refusal is clean: no object changed, no money moved, and the same command can be corrected and sent again.
The two transaction identifiers
<clTRID> is yours. You choose it, and the server echoes it back untouched. Make it unique per command and store it with whatever you were doing — it is how you tie an answer, and later an audit record, to the operation that caused it.
<svTRID> is ours. NSPC- then a timestamp then twelve random hex digits. Keep it: it is the one thing that identifies a command in our logs. A support question that quotes an svTRID is answered in minutes; one that says "a create failed yesterday afternoon" is not.
Both appear in the answer to a failed command too, which is exactly when you want them.
One command at a time
EPP over TCP is strictly request–response on a single connection. Write a frame, read the answer, then write the next. The server does not pipeline and will not answer out of order, so a client that writes two commands before reading is not twice as fast — it has only lost track of which answer belongs to which command.
Parallelism comes from more sessions, and you may hold three. More is rarely needed: even a registrar doing thousands of operations a day sends a few commands a minute.
The verbs
| Verb | Objects | What it does |
|---|---|---|
check | domain, host, contact | is the name free? — never changes anything |
info | domain, host, contact | the full record, as much of it as you are entitled to see |
create | domain, host, contact | bring an object into existence |
update | domain, host, contact | change one |
delete | domain, host, contact | remove one |
renew | domain | extend a registration term |
transfer | domain, contact | move an object between registrars |
poll | — | read the message queue |
hello, login and logout are session commands and carry no object: see Hello and Greeting and Login and Logout.
Reading the result
The code attribute is the whole verdict. Read the number, never the message — <msg> is language-dependent prose for a human, and it changes.
- 1xxx — it worked.
1000is the ordinary success.1001means accepted, not finished — see below. - 2xxx — it did not work. Nothing was changed and nothing was charged.
A <result> may carry <value> and <extValue> with the specific element at fault, which is worth logging verbatim when you are debugging a rejected frame.
The full list, with what each one means here, is on Result codes.
1001 — accepted, not finished
Some operations cannot complete while you wait. The answer is 1001 and the object is left in a pending state; the outcome arrives later as a poll message, which is the only place it is reported.
A client that treats 1001 as failure will retry an operation that is already under way — and a client that treats it as success will tell a customer their domain is registered when it is not. It is a third case, separate from the first two: record it, and close it from the message queue.
Which operations can answer 1001 depends on the zone; the pages for each command say when it happens.
Fees, before you commit
Declare urn:ietf:params:xml:ns:epp:fee-1.0 at login and a check will tell you what an operation would cost, and a create, renew or transfer will tell you what it did cost. The amount in the answer is the amount taken from your balance — it is not an estimate.
Asking costs nothing, and it is the right habit: a price depends on the zone, the operation, the term and whether the name is premium. None of those are things to guess.
If the answer does not arrive
If the answer does not arrive, do not resend the command. Reconnect and find out what happened first — a create you sent twice is not a failure you can correct afterwards. The procedure, and the reason <clTRID> exists, are on Sessions and recovery.
On this page