# Introduction

Base URL, authentication, request and response formats for the Hostraha Domain Reseller API.

The Hostraha Domain Reseller API is an HTTPS API with a single base URL. You append an action path to that URL, authenticate with two headers, and send form-encoded parameters.

## Base URL

```
https://portal.hostraha.com/modules/addons/DomainsReseller/api/index.php
```

## Actions

Each endpoint is an action appended to the base URL. Some actions include the domain as a path segment.

- `GET /version` → `.../index.php/version`
- `POST /domains/lookup` → `.../index.php/domains/lookup`
- `GET /domains/example.com/information` → `.../index.php/domains/example.com/information`

The HTTP method (`GET` or `POST`) is listed with each endpoint in this reference.

## Authentication

Every request sends two headers:

- `username` — the reseller client's WHMCS email.
- `token` — an HMAC-SHA256 value that rotates every UTC hour.

See [Authentication](/guides/authentication) for the token formula, clock-skew guidance, the Cloudflare User-Agent note, and validated snippets in five languages.

## Request format

`POST` bodies are `application/x-www-form-urlencoded`, encoded the way PHP's `http_build_query` produces. Nested objects and arrays use bracket notation:

| Shape | Encoding |
| --- | --- |
| Array | `tldsToInclude[]=.com` |
| Nested map | `nameservers[ns1]=ns1.hostraha.com` |
| Nested object in a map | `contacts[registrant][firstname]=Jane` |
| Capitalized contact map | `contactdetails[Registrant][firstname]=Jane` |
| Addons | `addons[dnsmanagement]=1` |
| Array of objects | `dnsrecords[0][hostname]=@&dnsrecords[0][type]=A&dnsrecords[0][address]=192.0.2.1&dnsrecords[0][priority]=0` |
| Parallel arrays | `prefix[]=info&forwardto[]=me@example.com` |

See [Models](/api-reference/models) for the full shape of each nested parameter.

## Response format

Responses are JSON. The shape varies by endpoint:

- A bare string, such as `"2.3.0"`, `"success"`, or `"unlocked"`.
- A small object, such as `{"success":true}` or `{"status":"success","message":"","success":"success"}`.
- An array of objects, such as availability or DNS results.

Errors return an object with an `error` key and a non-`2xx` status. See [Errors](/guides/errors) for the full list.

## Explore the reference

<Columns cols={2}>
  <Card title="Availability & pricing" href="/api-reference/availability">
    Look up domains, get suggestions, and read TLD and cart pricing.
  </Card>
  <Card title="Ordering" href="/api-reference/register">
    Register, transfer, and renew domains.
  </Card>
  <Card title="Domain management" href="/api-reference/information">
    Contacts, nameservers, DNS, locks, EPP, transfer out, and deletion.
  </Card>
  <Card title="Account" href="/api-reference/account">
    Read your credit balance and the API version.
  </Card>
  <Card title="Models" href="/api-reference/models">
    Shared shapes: contacts, nameservers, DNS records, and addons.
  </Card>
</Columns>
