Komplett guide för att integrera med Redirects API
Redirects API lÄter dig hantera dina domÀn-redirects programmatiskt. Perfekt för automation, integrationer och custom dashboards.
https://portal.eazy.direct/api
Alla API-requests krÀver en API-nyckel som skickas i request headers.
1. Logga in pÄ portalen
2. GĂ„ till "đ API Keys"
3. Klicka "Skapa ny API Key"
4. Spara nyckeln sÀkert (visas bara en gÄng!)
LĂ€gg till header X-API-Key i alla requests:
curl -H "X-API-Key: redir_din_nyckel_hÀr" https://portal.eazy.direct/api/domains
| Plan | Requests/mÄnad | Burst limit |
|---|---|---|
| Basic | 1,000 | 10/minut |
| Pro | 10,000 | 50/minut |
Beskrivning: HÀmta alla dina domÀner
Request:
curl -H "X-API-Key: redir_din_nyckel" \
https://portal.eazy.direct/api/domains
Response:
{
"domains": [
{
"id": 1,
"domain": "exempel.se",
"target_url": "https://mÄlsida.se",
"redirect_type": "301",
"status": "active",
"created_at": "2026-01-17T12:00:00Z"
}
]
}
Beskrivning: LÀgg till en ny domÀn
Request Body:
| Parameter | Typ | Beskrivning |
|---|---|---|
domain |
string | DomÀnnamn (t.ex. "exempel.se") |
target_url |
string | MÄlwebbplats (inkl. https://) |
redirect_type |
string | "301" eller "frame" |
Request:
curl -X POST \
-H "X-API-Key: redir_din_nyckel" \
-H "Content-Type: application/json" \
-d '{
"domain": "exempel.se",
"target_url": "https://mÄlsida.se",
"redirect_type": "301"
}' \
https://portal.eazy.direct/api/domains
Response:
{
"message": "Domain added successfully",
"domain": {
"id": 2,
"domain": "exempel.se",
"target_url": "https://mÄlsida.se",
"redirect_type": "301",
"status": "pending",
"dns_instructions": {
"ip": "206.81.27.176",
"records": [
{"type": "A", "name": "@", "value": "206.81.27.176"},
{"type": "A", "name": "www", "value": "206.81.27.176"}
]
}
}
}
Beskrivning: Uppdatera en befintlig domÀn
Request:
curl -X PUT \
-H "X-API-Key: redir_din_nyckel" \
-H "Content-Type: application/json" \
-d '{
"target_url": "https://ny-mÄlsida.se",
"redirect_type": "frame"
}' \
https://portal.eazy.direct/api/domains/2
Response:
{
"message": "Domain updated successfully",
"domain": "exempel.se",
"new_target": "https://ny-mÄlsida.se",
"redirect_type": "frame"
}
Beskrivning: Ta bort en domÀn
Request:
curl -X DELETE \
-H "X-API-Key: redir_din_nyckel" \
https://portal.eazy.direct/api/domains/2
Response:
{
"message": "Domain deleted successfully",
"domain": "exempel.se"
}
Beskrivning: Verifiera DNS-konfiguration
Request:
curl -H "X-API-Key: redir_din_nyckel" \
https://portal.eazy.direct/api/domains/2/check-dns
Response:
{
"domain": "exempel.se",
"dns_ok": true,
"current_ip": "206.81.27.176",
"expected_ip": "206.81.27.176",
"status": "active"
}
| Status Code | Betydelse |
|---|---|
200 |
Success |
400 |
Bad Request (ogiltig data) |
401 |
Unauthorized (ogiltig API-nyckel) |
403 |
Forbidden (ej tillÄten funktion i din plan) |
404 |
Not Found (domÀn finns inte) |
429 |
Rate Limit Exceeded |
500 |
Server Error |
Fel-response exempel:
{
"error": "API key required"
}
Behöver du hjÀlp? Kontakta oss:
© 2026 Redirects API · Version 1.0