Official API documentation for the Tanzania Network Information Centre domain registry operations
The .TZ Registry EPP API provides a modern interface to domain registration, transfer, and management operations for the .tz domain space via the FRED EPP protocol. This API acts as a bridge between HTTP/JSON applications and the EPP protocol used by the Tanzania domain registry.
With this API, you can:
All API requests require authentication via an API key issued by the .TZ Registry. This key identifies your registrar account and determines what operations you can perform. Your API key can be provided in one of three ways:
Include the X-API-KEY header in your request
X-API-KEY: your_api_key_here
Append the api_key parameter to the URL
https://fred.yatosha.com/v1?api_key=your_api_key_here
Include the API key in the JSON request body (POST requests only)
{
"api_key": "your_api_key_here",
"action": "checkDomain",
"domainName": "example.co.tz"
}
Main API endpoint for all operations. The action to perform is specified by the action parameter in the request body.
Content-Type: application/json
Check if a domain is available for registration.
{
"action": "checkDomain",
"domainName": "example.tz"
}
Response:
{
"status": "success",
"data": {
"available": true,
"domain": "example.tz"
}
}
Get detailed information about a domain.
{
"action": "getDomainInfo",
"domainName": "example.tz",
"authCode": "optional-epp-code"
}
Response:
{
"status": "success",
"data": {
"domain": "example.tz",
"status": ["ok"],
"registrant": "REG12345",
"admin": ["ADM12345"],
"created": "2023-01-15T14:30:00.0Z",
"expires": "2025-01-15T14:30:00.0Z",
"nsset": "NSSET12345"
}
}
Get nameservers for a domain.
{
"action": "getNameservers",
"domainName": "example.tz"
}
Response:
{
"status": "success",
"data": {
"nameservers": [
"ns1.tzregistry.co.tz",
"ns2.tzregistry.co.tz"
]
}
}
Update nameservers for a domain.
{
"action": "updateNameservers",
"domainName": "example.tz",
"nameservers": [
"ns1.tzregistry.co.tz",
"ns2.tzregistry.co.tz"
]
}
Response:
{
"status": "success",
"data": {
"updated": true
}
}
Register a new domain.
{
"action": "registerDomain",
"domainName": "example.tz",
"period": 1,
"registrantInfo": {
"name": "John Doe",
"organization": "Tanzania Tech Ltd",
"address1": "123 Nyerere Road",
"city": "Dar es Salaam",
"state": "Dar es Salaam",
"postcode": "11101",
"country": "TZ",
"phone": "+255.754123456",
"email": "john.doe@tanzaniatech.co.tz"
},
"adminInfo": {
"name": "Jane Doe",
"organization": "Tanzania Tech Ltd",
"address1": "123 Nyerere Road",
"city": "Dar es Salaam",
"state": "Dar es Salaam",
"postcode": "11101",
"country": "TZ",
"phone": "+255.754123457",
"email": "jane.doe@tanzaniatech.co.tz"
},
"nameservers": [
"ns1.tzregistry.co.tz",
"ns2.tzregistry.co.tz"
]
}
Response:
{
"status": "success",
"data": {
"registered": true
}
}
Transfer a domain to your registrar.
{
"action": "transferDomain",
"domainName": "example.tz",
"authCode": "domain-epp-code"
}
Response:
{
"status": "success",
"data": {
"transferInitiated": true
}
}
Renew a domain registration.
{
"action": "renewDomain",
"domainName": "example.tz",
"period": 1
}
Response:
{
"status": "success",
"data": {
"renewed": true
}
}
Get contact details for a domain.
{
"action": "getContactDetails",
"domainName": "example.tz"
}
Response:
{
"status": "success",
"data": {
"contacts": {
"registrant": {
"id": "REG12345",
"name": "John Doe",
"organization": "Tanzania Tech Ltd",
"address1": "123 Nyerere Road",
"city": "Dar es Salaam",
"state": "Dar es Salaam",
"postcode": "11101",
"country": "TZ",
"phone": "+255.754123456",
"email": "john.doe@tanzaniatech.co.tz"
},
"admin": [
{
"id": "ADM12345",
"name": "Jane Doe",
"organization": "Tanzania Tech Ltd",
"address1": "123 Nyerere Road",
"city": "Dar es Salaam",
"state": "Dar es Salaam",
"postcode": "11101",
"country": "TZ",
"phone": "+255.754123457",
"email": "jane.doe@tanzaniatech.co.tz"
}
]
}
}
}
Update contact details for a domain.
{
"action": "updateContactDetails",
"domainName": "example.tz",
"registrantInfo": {
"name": "New Registrant Name",
"organization": "New Company Name",
"address1": "123 New Street",
"city": "New City",
"state": "New State",
"postcode": "54321",
"country": "TZ",
"phone": "+255.987654321",
"email": "new-contact@example.com"
},
"adminInfo": {
"name": "New Admin Name",
"organization": "New Company Name",
"address1": "123 New Street",
"city": "New City",
"state": "New State",
"postcode": "54321",
"country": "TZ",
"phone": "+255.987654321",
"email": "new-admin@example.com"
}
}
Response:
{
"status": "success",
"data": {
"updated": true
}
}
Get the EPP/Auth code for a domain.
{
"action": "getEPPCode",
"domainName": "example.tz"
}
Response:
{
"status": "success",
"data": {
"eppCode": "ABCD1234"
}
}
Set a new EPP/Auth code for a domain.
{
"action": "setEPPCode",
"domainName": "example.tz",
"newEppCode": "new-epp-code"
}
Response:
{
"status": "success",
"data": {
"updated": true
}
}
Get account credit balance information for all zones.
{
"action": "getBalance"
}
Response:
{
"status": "success",
"data": {
"balance": {
"tz": 1500000,
"co.tz": 1200000,
"or.tz": 800000
}
}
}
All API responses are in JSON format with a consistent structure:
When an operation is successful, the API returns a 200 OK HTTP status code and a JSON response with the following structure:
{
"status": "success",
"data": {
// Action-specific response data
}
}
When an operation fails, the API returns an appropriate HTTP status code (4xx or 5xx) and a JSON response with the following structure:
{
"status": "error",
"message": "Error description",
"errorCode": 2302 // Optional EPP error code
}
The following error codes may be returned in API responses:
If you need assistance with the API or have any questions, please contact our technical support team:
Additional Resources: