Interface
The trash.de API
Mailboxes and domains can be managed without a browser – from a script or your own application.
Access
The API authenticates over HTTP Basic with your account username and password. You turn access on yourself and can limit it to specific IP addresses.
You need an account to use the API.
Example
A call with curl looks like this:
curl -u BENUTZER:PASSWORT \
https://trash.de/api/mailboxes
Overview
| Method | Path | Purpose |
|---|---|---|
| GET | /api/account | Account, balance and what things cost |
| GET | /api/transactions | Transactions, page by page |
| GET | /api/pricing | Credit packages and prices per domain ending |
| GET | /api/domains | Assigned domains, shared and your own |
| POST | /api/domains | Assign another shared domain |
| POST | /api/domains/register | Register your own domain |
| POST | /api/domains/{id}/renew | Renew your own domain for a year |
| GET | /api/mailboxes | Mailboxes of the account |
| POST | /api/mailboxes | Create a mailbox |
| GET | /api/mailboxes/{id} | A single mailbox |
| GET | /api/mailboxes/{id}/messages | Messages in the inbox |
| GET | /api/mailboxes/{id}/messages/{uid} | A single message as plain text |
Rate limit
Each account may make 60 requests per minute. Once the limit is reached the interface answers with status 429 and gives the waiting time in seconds in the Retry-After header. Failed sign-ins are counted separately and lead to a block sooner.
Full documentation
Every endpoint with its parameters and response schema is available as an OpenAPI description, where calls can also be tried out directly.
What the API does not do
Changing your password, managing two-factor authentication, switching API access itself and topping up credits stay on the website. The first three protect the account itself; topping up runs through our payment provider.