Get started

    API Endpoint

    Endpoint: https://new.registry.co.ug/api/v2

                

This is an application that enable registrars who are accredited with UG cc-TLD registrars manage .ug domain names. Designed by Infinity Computers and Communications Company(http://www.i3c.co.ug/) on behalf of Uganda Online.

To use this API, you need an API key. Please login in into your registry account and navigate to API Keys to generate your own API key.

Response Formatting



                

The Client API is designed as an HTTP-REST interface. Responses follow the JSend style. (https://github.com/omniti-labs/jsend)



Result example :

{
  query:{
    offset: 0,
    limit: 50,
    house: [
      "Stark",
      "Bolton"
    ],
  }
  result: [
    {
      id: 1,
      first_name: "Jon",
      last_name: "Snow",
      alive: true,
      house: "Stark",
      gender: "m",
      age: 14,
      location: "Winterfell"
    },
    {
      id: 2,
      first_name: "Eddard",
      last_name: "Stark",
      alive: false,
      house: "Stark",
      gender: "m",
      age: 35,
      location: 'Winterfell'
    },
    {
      id: 3,
      first_name: "Catelyn",
      last_name: "Stark",
      alive: false,
      house: "Stark",
      gender: "f",
      age: 33,
      location: "Winterfell"
    },
    {
      id: 4,
      first_name: "Roose",
      last_name: "Bolton",
      alive: false,
      house: "Bolton",
      gender: "m",
      age: 40,
      location: "Dreadfort"
    },
    {
      id: 5,
      first_name: "Ramsay",
      last_name: "Snow",
      alive: false,
      house: "Bolton",
      gender: "m",
      age: 15,
      location: "Dreadfort"
    },
  ]
}
                

QUERY PARAMETERS

Field Type Description
secret_key String Your API key.
search String (optional) A search word to find character by name.
house String (optional) a string array of houses:
alive Boolean (optional) a boolean to filter alived characters
gender String (optional) a string to filter character by gender:
m: male
f: female
offset Integer (optional - default: 0) A cursor for use in pagination. Pagination starts offset the specified offset.
limit Integer (optional - default: 10) A limit on the number of objects to be returned, between 1 and 100.

Error Handling

Registry API uses HTTP status codes to indicate success or failure of a request. Below is a summary of the HTTP status codes you should expect to handle.

Error Code Meaning
2XXX Codes in the 2XX range mean that the request was processed successfully.
4XX Codes in the 4XX range mean that something was wrong with the data that you sent. For example, you might have missed some required parameters, or you might be using an expired token for authentication.
5XX Codes in the 5XX range mean that there is a glitch in our servers.

Authentication

API authenticates clients with a HTTP Bearer token-based authentication scheme. The bearer token is passed in the Authorization header of the API request. To create your API key, simply login to your registry account and navigate to the API keys (V2) section. For security reasons, your API key bearer token will only be displayed once after creation and cannot be recovered in-case its lost.

Simply delete a lost or compromised API key and create a new one. It's good security practice to periodically change your API keys. A 401 (Unauthorized) HTTP response is returned when an API client request fails to authenticate.


                Curl example :
                
                curl "http://../api/v2/path-to-resource" \
                -X POST \
                -H "Content-Type: application/json" \
                -H "Authorization: Bearer 5c8e4327fd8b2bf3118f82b13890d89d" \
                                

Replace "5c8e4327fd8b2bf3118f82b13890d89d" with your actual token

Check Domain Availability



                

Http Method:
Path: /domains/check-availability
GET
Authentication Required: No




                REQUEST


        {
            "domains": [
                {"name": "mtn.co.ug"},
                {"name": "registry.co.ug"}
            ] 
         }


           RESPONSE 
{ "status": "success", "data": [ { "domain": "mtn.co.ug", "available": 0 }, { "domain": "registry.co.ug", "available": 0 } ] }

QUERY PARAMETERS

Parameter Type Description Required
Domains Array List of domains to check for availability. Yes

Response
Parameter
Description
Domain
Name of domain
Availability
Availability status. 1 indicates domain is available. 0 Indicates domain is not available.

Domain Whois Lookup



                REQUEST


                {
                    "domain_name": "registry.co.ug"
                }
                  
                

Http Method:
Path: /domains/whois
GET
Authentication Required: No



               
           RESPONSE ON SUCCESS  
{ "status": "success", "data": { "domain": { "name": "registry.co.ug", "status": "ACTIVE", "registration_date": "2000-12-01", "expiry_date": "2100-02-22", "contacts": { "registrant": { "firstname": "UNKNOWN", "email": "registrar@i3c.co.ug", "organization": "Infinity Computers and Communications Company LTD", "country": "Uganda", "city": "Kampala", "street_address": "Plot 6B Windsor Loop", "phone": "UNKNOWN", "postal_code": "P.O. Box 12510", "fax": "" }, "admin": { "firstname": "Charles", "lastname": "Musisi", "email": "cmusisi@cfi.co.ug", "organization": "UNKNOWN", "country": "Uganda", "city": "Kampala", "street_address": "Computer Frontiers InternationalPlot 6B Windsor LoopP.O. Box 12510 - Kampala", "phone": "+256 31 230 1800", "postal_code": "UNKNOWN", "fax": "" }, "billing": { "firstname": "Charles", "lastname": "Musisi", "email": "cmusisi@cfi.co.ug", "organization": "UNKNOWN", "country": "Uganda", "city": "Kampala", "street_address": "Computer Frontiers InternationalPlot 6B Windsor LoopP.O. Box 12510 - Kampala", "phone": "+256 31 230 1800", "postal_code": "UNKNOWN", "fax": "+256 41 434 0456" }, "tech": { "firstname": "Charles", "lastname": "Musisi", "email": "cmusisi@cfi.co.ug", "organization": "UNKNOWN", "country": "Uganda", "city": "Kampala", "street_address": "Computer Frontiers InternationalPlot 6B Windsor LoopP.O. Box 12510 - Kampala", "phone": "+256 31 230 1800", "postal_code": "UNKNOWN", "fax": "+256 41 434 0456" }, "nameservers": { "ns1": "ns1.cfi.co.ug", "ns2": "ns2.cfi.co.ug", "ns3": "ns3.cfi.co.ug", "ns4": "ns4.cfi.co.ug" } } } } }

QUERY PARAMETERS

Parameter Type Description Required
Domains String Domain name. Yes

Domain Register


        
        REQUEST 
{ "domain_name": "testdomain.co.ug", "period": 1 }

Http Method:POST
Path:/domains/register

Authentication Required: Yes



       
   RESPONSE ON SUCCESS  
{ "status": "success", "data": { "domain": { "name": "testdomain.co.ug", "status": "ACTIVE", "expiry_date": "2022-08-31" } } }

QUERY PARAMETERS

Parameter Type Description Required
Domain_name String Domain name to register. Yes
Period String Domain registration period. Yes

Domain Register


        
        REQUEST 
{ "domain_name": "testdomain.co.ug", "period": 1 }

Http Method:POST
Path:/domains/register

Authentication Required: Yes



       
   RESPONSE ON SUCCESS  
{ "status": "success", "data": { "domain": { "name": "testdomain.co.ug", "status": "ACTIVE", "expiry_date": "2022-08-31" } } }

QUERY PARAMETERS

Parameter Type Description Required
Domain_name String Domain name to register. Yes
Period String Domain registration period. Yes

Modify Domain


        
        REQUEST 
{ "domain_name": "testemail.co.ug", "contacts": { "registrant": { "firstname": "John Doe", "email": "test@vitalhash.com", "organization": "Test", "country": "UG", "city": "Kampala", "street_address": "Buziga", "phone": "0773454899", "postal_code": "256", "fax": "" }, "admin": { "firstname": "Derrick", "lastname": "Mugerwa", "email": "richard@vitalhash.com", "organization": "Vitalhash LTD", "country": "UG", "city": "Kampala", "street_address": "Buziga", "phone": "0773454899", "postal_code": "256", "fax": "" }, "billing": { "firstname": "Derrick", "lastname": "Mugerwa", "email": "richard@vitalhash.com", "organization": "Vitalhash LTD", "country": "UG", "city": "Kampala", "street_address": "Buziga", "phone": "0773454899", "postal_code": "256", "fax": "" }, "tech": { "firstname": "Derrick", "lastname": "Mugerwa", "email": "richard@vitalhash.com", "organization": "Vitalhash LTD", "country": "UG", "city": "Kampala", "street_address": "Buziga", "phone": "0773454899", "postal_code": "256", "fax": "" } }, "nameservers": { "ns1": { "name": "ns1.i3c.co.ug", "ip": "50.22.208.130" }, "ns2": { "name": "ns2.i3c.co.ug", "ip": "174.36.245.66" }, "ns3": { "name": "ns3.i3c.co.ug", "ip": "174.36.245.67" }, "ns4": { "name": "ns4.i3c.co.ug", "ip": "212.88.97.141" } } }

Http Method:POST
Path:/domains/modify

Authentication Required: Yes



       
   RESPONSE ON SUCCESS  
{ "status": "success", "data": { "domain": { "name": "vitalhash.co.ug", "status": "ACTIVE", "registration_date": "2021-08-31", "expiry_date": "2022-08-31", "contacts": { "registrant": { "firstname": "Mark P", "email": "richard@vitalhash.com", "organization": "Vitalhash LTD", "country": "UG", "city": "Kampala", "street_address": "Buziga", "phone": "0773454899", "postal_code": "256", "fax": "" }, "admin": { "firstname": "Derrick", "lastname": "Mugerwa", "email": "richard@vitalhash.com", "organization": "Vitalhash LTD", "country": "UG", "city": "Kampala", "street_address": "Buziga", "phone": "0773454899", "postal_code": "256", "fax": "" }, "billing": { "firstname": "Derrick", "lastname": "Mugerwa", "email": "richard@vitalhash.com", "organization": "Vitalhash LTD", "country": "UG", "city": "Kampala", "street_address": "Buziga", "phone": "0773454899", "postal_code": "256", "fax": "" }, "tech": { "firstname": "Derrick", "lastname": "Mugerwa", "email": "richard@vitalhash.com", "organization": "Vitalhash LTD", "country": "UG", "city": "Kampala", "street_address": "Buziga", "phone": "0773454899", "postal_code": "256", "fax": "" }, "nameservers": { "ns1": "ns1.i3c.co.ug", "ns2": "ns2.i3c.co.ug", "ns3": "ns3.i3c.co.ug", "ns4": "ns4.i3c.co.ug" } } } } }

QUERY PARAMETERS

Parameter Type Description Required
Domain_name String Domain name to modify. Yes
Contacts JSON Object Contact Info Yes

Renew Domain


        
        REQUEST 
{ "domain_name": "testdomain.ug", "period": 1 }

Http Method:POST
Path:/domains/renew

Authentication Required: Yes



       
   RESPONSE ON SUCCESS  
{ "status": "success", "message": "Domain successfully renewed.", "data": { "domain": { "name": "testdomain.ug", "status": "ACTIVE", "expiry_date": "2023-03-05" } } }

QUERY PARAMETERS

Parameter Type Description Required
Domain_name String Domain name to renew. Yes
Period JSON Object Domain renew period Yes

Request Domain Transfer


        
        REQUEST 
{ "domain_name": "testdomain.ug" }

Http Method:POST
Path:/domains/request-transfer

Authentication Required: Yes



       
    RESPONSE ON SUCCESS  
{ "status": "success", "message": "Request domain transfer successfully initiated." }

QUERY PARAMETERS

Parameter Type Description Required
Domain_name String Domain name to transfer Yes

Confirm Domain Transfer


        
        REQUEST 
{ "domain_name": "testdomain.ug", "transfer_id": 234 }

Http Method:POST
Path:/domains/confirm-transfer

Authentication Required: Yes



       
    RESPONSE ON SUCCESS  
{ "status": "success", "message": "Successfully transfered domain testdomain.ug" }

QUERY PARAMETERS

Parameter Type Description Required
Domain_name String Domain name to confirm domain transfer. Yes
Transfer_id Integer Transfer request ID. Yes

Lock Domain


        
        REQUEST 
{ "domain_name": "testdomain.ug" }

Path:/domains/lock



 
  

    
        

UnLock Domain


        
        REQUEST 
{ "domain_name": "testdomain.ug" }

Path: /domains/unlock