Verify a domain
Prove you control a destination domain so you can deliver to it.
Harepost only delivers to domains your account has verified. This prevents Harepost from being pointed at endpoints you do not control. Verification is a one-time DNS check per domain, and once verified you can deliver to that domain and any subdomain of it.
Add a domain
POST https://api.harepost.com/v1/domains
Authorization: Bearer hp_live_YOUR_KEY
Content-Type: application/json
{ "domain": "your-app.com" }
The response gives you a TXT record to add at your DNS provider:
{
"domain": "your-app.com",
"status": "pending",
"record": {
"type": "TXT",
"name": "_harepost-challenge.your-app.com",
"value": "harepost-verify=abc123..."
}
}
Add that exact TXT record at your DNS provider. The name is a subdomain of the domain you are verifying, and the value is the full harepost-verify=... string.
Verify the domain
Once the record is live, ask Harepost to check it:
POST https://api.harepost.com/v1/domains/verify
Authorization: Bearer hp_live_YOUR_KEY
Content-Type: application/json
{ "domain": "your-app.com" }
A successful check returns:
{
"domain": "your-app.com",
"status": "verified",
"verified_at": "2026-06-10T14:30:00Z"
}
If the record is not visible yet, you get status: "pending" with a 409. DNS can take a few minutes to propagate, so wait and try again.
List your domains
GET https://api.harepost.com/v1/domains
Authorization: Bearer hp_live_YOUR_KEY
{
"data": [
{
"domain": "your-app.com",
"status": "verified",
"created_at": "...",
"verified_at": "..."
}
]
}
How coverage works
A verified domain covers itself and all of its subdomains. Verifying your-app.com lets you deliver to your-app.com, api.your-app.com, hooks.your-app.com, and so on. You do not need to verify each subdomain separately.
Status codes
| Code | Meaning |
|---|---|
201 | Domain added; returns the TXT record to create. |
200 | Verify succeeded, or the domain was already verified. |
400 | The domain is missing or malformed. |
401 | Missing or invalid API key. |
404 | Verify was called for a domain you have not added. |
409 | The TXT record was not found yet. Wait for DNS and retry. |