Introductie
De Imply API biedt programmatische toegang tot je email hosting service. Beheer domeinen, mailboxen, aliassen en monitor email verkeer.
https://imply.nl/api/v1
Authenticatie
De API gebruikt JWT Bearer tokens. Voeg je token toe in de Authorization header:
Authorization: Bearer YOUR_ACCESS_TOKEN
Rate Limiting
API verzoeken zijn gelimiteerd tot:
- 60 verzoeken per minuut voor geauthenticeerde gebruikers
- 20 verzoeken per minuut voor niet-geauthenticeerde verzoeken
- Burst allowance van 10 verzoeken
Authenticatie
Authenticeer en ontvang access tokens
Request Body
| Veld | Type | Verplicht | Beschrijving |
|---|---|---|---|
email |
string | Verplicht | Gebruiker email adres |
password |
string | Verplicht | Gebruiker wachtwoord |
totp_code |
string | Optioneel | TOTP code als 2FA actief is |
Response Voorbeeld
{
"success": true,
"message": "Login successful",
"data": {
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGc...",
"refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGc...",
"token_type": "Bearer",
"expires_in": 3600,
"user": {
"id": 123,
"email": "user@example.com",
"role": "user"
}
}
}
Refresh access token met refresh token
Verifieer huidige token geldigheid
Domeinen
Lijst alle domeinen voor geauthenticeerde gebruiker
Query Parameters
| Parameter | Type | Beschrijving |
|---|---|---|
page |
integer | Pagina nummer (standaard: 1) |
per_page |
integer | Items per pagina (standaard: 20, max: 100) |
search |
string | Zoek domeinen op naam |
verified |
boolean | Filter op DNS verificatie status |
Haal specifieke domein details op inclusief DNS records
Creëer een nieuw domein
Request Body
{
"domain": "example.com",
"catch_all": "admin@example.com"
}
Update domein instellingen
Verwijder een domein
Mailboxen
Lijst alle mailboxen
Haal specifieke mailbox details op
Creëer een nieuwe mailbox
Request Body
{
"email": "john@example.com",
"password": "SecurePassword123!",
"storage_quota_mb": 5120,
"name": "John Doe"
}
Update mailbox instellingen
Verwijder een mailbox
Email Aliassen
Lijst alle email aliassen
Creëer een nieuwe alias
Request Body
{
"alias": "info@example.com",
"destination": "john@example.com"
}
Verwijder een alias
Webhooks
Ontvang real-time notificaties voor belangrijke events in je account.
Lijst alle webhooks
Registreer een nieuwe webhook
Beschikbare Events
domain.created- Nieuw domein aangemaaktdomain.verified- Domein geverifieerdmailbox.created- Nieuwe mailbox aangemaaktmailbox.quota_exceeded- Mailbox quota overschredenemail.received- Email ontvangenemail.sent- Email verzonden
Webhook Payload Voorbeeld
{
"event": "mailbox.created",
"timestamp": "2025-01-15T10:30:00Z",
"data": {
"mailbox_id": 456,
"email": "john@example.com",
"domain_id": 123
}
}
Statistieken
Haal email verkeer statistieken op
Query Parameters
| Parameter | Type | Beschrijving |
|---|---|---|
start_date |
date | Start datum (YYYY-MM-DD) |
end_date |
date | Eind datum (YYYY-MM-DD) |
domain_id |
integer | Filter op specifiek domein |
Haal opslag statistieken op
Error Responses
De API gebruikt standaard HTTP status codes en retourneert errors in JSON formaat.
HTTP Status Codes
| Code | Betekenis |
|---|---|
200 |
OK - Verzoek succesvol |
201 |
Created - Resource aangemaakt |
400 |
Bad Request - Ongeldige parameters |
401 |
Unauthorized - Authenticatie vereist |
403 |
Forbidden - Geen toegang |
404 |
Not Found - Resource niet gevonden |
429 |
Too Many Requests - Rate limit overschreden |
500 |
Internal Server Error - Server fout |
Error Response Voorbeeld
{
"success": false,
"error": {
"code": "INVALID_DOMAIN",
"message": "The domain name is invalid or already exists",
"details": {
"field": "domain",
"value": "invalid-domain"
}
}
}
Code Voorbeelden
cURL
curl -X POST https://imply.nl/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "password123"
}'
JavaScript (Fetch)
const response = await fetch('https://imply.nl/api/v1/domains', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);
Python (Requests)
import requests
headers = {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
}
response = requests.get('https://imply.nl/api/v1/domains', headers=headers)
data = response.json()
print(data)
PHP
$ch = curl_init('https://imply.nl/api/v1/domains');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_ACCESS_TOKEN',
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$data = json_decode($response, true);
curl_close($ch);
print_r($data);