# reg.ly reseller API

Register, renew, transfer and manage .ly domains from your own system. REST over HTTPS, form-encoded requests, JSON responses. The machine-readable contract is [openapi.yaml](https://reg.ly/ly-domain-reseller/api/openapi.yaml).

## Endpoint

```
https://api.reg.ly
```

Paths below are appended to the endpoint. One endpoint serves production and testing: register `.ote.ly` names to exercise every call without spending credit. No separate credentials, no separate URL.

## Authentication

Two headers on every request:

| Header | Value |
| --- | --- |
| `username` | Your reseller account email address. |
| `token` | `base64_encode( hash_hmac("sha256", apiKey, email . ":" . gmdate("y-m-d H")) )` |

The token is an HMAC-SHA256 of your API key, keyed by your email and the current UTC hour (hex digest, then base64). It expires on its own within the hour, so a captured token dies fast. You generate and rotate your API keys yourself in your reseller area, where your API email also lives. An IP allowlist on your account is optional.

```php
$headers = [
  "username: you@yourname.ly",
  "token: " . base64_encode(hash_hmac("sha256", $apiKey, "you@yourname.ly:" . gmdate("y-m-d H"))),
];
```

## Requests and responses

POST bodies are `application/x-www-form-urlencoded`. GET calls take their parameters in the path and query. Responses are JSON, with a shape specific to each call. No request limit applies to reseller accounts.

## Calls

### Orders

| Call | Method and path | Required | Optional |
| --- | --- | --- | --- |
| Register a domain | `POST /order/domains/register` | domain, regperiod, nameservers, contacts | domainfields, addons, idnLanguage |
| Transfer a domain in | `POST /order/domains/transfer` | domain, regperiod, nameservers, contacts | eppcode, domainfields, addons, idnLanguage |
| Renew a domain | `POST /order/domains/renew` | domain, regperiod | addons, idnLanguage |
| Order pricing | `GET /order/pricing/domains/{type}` | domain; type is register, renew or transfer | |

### Lookup

| Call | Method and path | Parameters |
| --- | --- | --- |
| Check availability | `POST /domains/lookup` | searchTerm, punyCodeSearchTerm, tldsToInclude[], isIdnDomain, premiumEnabled |
| Domain suggestions | `POST /domains/lookup/suggestions` | the lookup parameters plus suggestionSettings[] |

### Domains

| Call | Method and path | Also takes |
| --- | --- | --- |
| Domain information | `GET /domains/{domain}/information` | |
| Get the auth code | `GET /domains/{domain}/eppcode` | |
| Get contact details | `GET /domains/{domain}/contact` | |
| Save contact details | `POST /domains/{domain}/contact` | contactdetails |
| Get the registrar lock | `GET /domains/{domain}/lock` | |
| Set the registrar lock | `POST /domains/{domain}/lock` | lockstatus |
| Get DNS records | `GET /domains/{domain}/dns` | not currently supported for .ly names |
| Save DNS records | `POST /domains/{domain}/dns` | dnsrecords. Not currently supported for .ly names |
| Get email forwarding | `GET /domains/{domain}/email` | |
| Save email forwarding | `POST /domains/{domain}/email` | prefix[], forwardto[] |
| Toggle ID protection | `POST /domains/{domain}/protectid` | status (1 or 0) |
| Sync a domain | `POST /domains/{domain}/sync` | |
| Sync a transfer | `POST /domains/{domain}/transfersync` | |
| Release a domain | `POST /domains/{domain}/release` | transfertag |
| Request deletion | `POST /domains/{domain}/delete` | |

### Name servers

| Call | Method and path | Also takes |
| --- | --- | --- |
| Get name servers | `GET /domains/{domain}/nameservers` | |
| Save name servers | `POST /domains/{domain}/nameservers` | ns1, ns2 required, ns3 to ns5 optional |
| Register a host record | `POST /domains/{domain}/nameservers/register` | nameserver, ipaddress |
| Modify a host record | `POST /domains/{domain}/nameservers/modify` | nameserver, currentipaddress, newipaddress |
| Delete a host record | `POST /domains/{domain}/nameservers/delete` | nameserver |

### Pricing and account

| Call | Method and path |
| --- | --- |
| Available TLDs | `GET /tlds` |
| TLD pricing | `GET /tlds/pricing` |
| Account credits | `GET /billing/credits` |
| API version | `GET /version` |

## Models

- **nameservers**: ns1 and ns2 required, ns3 to ns5 optional.
- **contacts**: registrant, tech, billing, admin, each a contact. registrant also answers to owner, tech to technical.
- **contact**: firstname, lastname, fullname, companyname, email, address1, city, state, postcode, country, phonenumber required. address2 optional.
- **contactdetails**: Registrant, Technical, Billing, Admin, each a contact, all required.
- **dnsrecords**: a list of records. hostname, type, address, priority required. recid names an existing record.
- **addons**: dnsmanagement, emailforwarding, idprotection, each 1 or 0.

## Testing

Register a `.ote.ly` name and point every call at it. The test zone answers on the production endpoint with your production credentials and spends no credit.

## Changelog

Newest first. Fixes that change nothing for your integration ship inside a version.

| Version | Year | What changed |
| --- | --- | --- |
| v2.3 | 2026 | Automatic top-ups in the reseller account. When credits run low, funds are added through the payment method you chose. No change to the API surface. |
| v2.2 | 2025 | The WHMCS module ships two files of your own, one for custom registrar functions and one for hooks. |
| v2.1 | 2023 | The registrar module on the WHMCS Marketplace, then the Blesta extension. |
| v2 | 2021 | The API rebuilt as REST with JSON responses and signed hourly tokens. The v2 generation introduces availability lookup, domain suggestions, the TLD list, TLD and order pricing, account credits, domain information, transfer sync and a version call, structured models for nameservers, DNS records and contacts, a generated WHMCS module and the .ote.ly test zone. |
| v1 | 2017 | The first reseller API. Static API key authentication, an IP allowlist, the core registry operations and a generated WHMCS registrar module. |

## Ready-made modules

The WHMCS registrar module and the Blesta extension connect the same account with the same credentials and no custom code. Reseller program details and tiers: https://reg.ly/ly-domain-reseller/
