API v1

API documentation

Everything the dashboard does, your code can do too. JSON in, JSON out.

Authentication

Create a key in the dashboard under API keys and send it as a Bearer token.

Scopes

A read-only key can call every GET. Writing requires a read-write key.

Limits

600 requests per hour per key. Exceeding it returns HTTP 429.

Quick start

# 1. Who am I, and how much storage is left? curl -H "Authorization: Bearer $AMH_KEY" \ https://business.alaniver.fi/api/v1/me # 2. Add a domain — publish the returned TXT record, then verify curl -X POST -H "Authorization: Bearer $AMH_KEY" \ -H "Content-Type: application/json" \ -d '{"domain":"yritys.fi"}' \ https://business.alaniver.fi/api/v1/domains curl -X POST -H "Authorization: Bearer $AMH_KEY" \ https://business.alaniver.fi/api/v1/domains/yritys.fi/verify # 3. Create a mailbox curl -X POST -H "Authorization: Bearer $AMH_KEY" \ -H "Content-Type: application/json" \ -d '{"address":"info@yritys.fi","name":"Info","quota_mb":2048,"password":"…"}' \ https://business.alaniver.fi/api/v1/mailboxes

Account

GET /api/v1/me Account, subscription and storage usage. read

Domains

GET /api/v1/domains List domains and their verification status. read
POST /api/v1/domains Add a domain. Returns the TXT record to publish. read_write
POST /api/v1/domains/{domain}/verify Check the TXT record and activate mail. read_write
GET /api/v1/domains/{domain}/dns All required DNS records with live status. read
DELETE /api/v1/domains/{domain} Delete a domain and all of its mailboxes. read_write

Mailboxes

GET /api/v1/mailboxes List mailboxes with quota and usage. read
POST /api/v1/mailboxes Create a mailbox (address, quota_mb, password, name). read_write
PATCH /api/v1/mailboxes/{address} Change quota_mb, password or active. read_write
DELETE /api/v1/mailboxes/{address} Delete a mailbox permanently. read_write

Aliases

GET /api/v1/aliases List aliases. read
POST /api/v1/aliases Create an alias (address, goto). read_write
DELETE /api/v1/aliases/{id} Delete an alias. read_write

Support

GET /api/v1/tickets List your tickets. read
POST /api/v1/tickets Open a ticket (subject, message, priority). read_write
GET /api/v1/tickets/{id} Ticket with its messages. read
POST /api/v1/tickets/{id}/reply Reply to a ticket (message). read_write

Errors

Errors come back with the matching HTTP status and a body of this shape:

{ "error": { "type": "invalid", "message": "Not enough storage. 2 GB free…" } }