# Add domain

### **Domain Verification**

The app compares the domain you’ve registered on the site with the one used in the subscription to avoid collisions and prevent spoofing of the domain or ProviderID. The domain is stored in our database as a SHA‑256 hash—this measure protects user data and enhances security. Learn more about SHA‑256 on [Wikipedia](https://en.wikipedia.org/wiki/SHA-2).

### **Adding a Domain**

You can add a domain in three ways:

* Via the **domain addition form** on the website
* **Automatically** when creating a limited link
* Through the **API**

***

### **Adding via API**

Send a GET request to:

```
https://api.happ-proxy.com/api/add-domain?
  provider_code={provider_code}&
  auth_key={auth_key}&
  domain_name={domain_name}&
  domain_hash={domain_hash}
```

* **domain\_name** is optional. If omitted, it will be generated automatically (using the first 10 characters of domain\_hash).

### **Example Responses**

* **Success**

  ```json
  {
    "rc": 1,
    "msg": "Ok"
  }
  ```
* **Domain Already Exists**

  ```json
  {
    "rc": 2,
    "msg": "Domain hash exists"
  }
  ```
* **Error**

  ```json
  {
    "rc": 0,
    "msg": "Error description"
  }
  ```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.happ-proxy.com/getting-started/publish-your-docs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
