REST API

API Documentation

Programmatic access to your mailboxes — create addresses and read received mail over a simple REST API. All responses are JSON.

Your API Key
YOUR_API_KEY
Replace YOUR_API_KEY with the key provided by the site administrator.

Authentication

Every request is authenticated with an API key passed as the last segment of the URL path — no headers or tokens to set.

https://digistallone.com/api/domains/YOUR_API_KEY

A missing or invalid key returns 401 Unauthorized. Keys are managed by the administrator under Settings → Advanced.

GET /api/domains/{key}

Returns every active domain available on this server.

Parameters
NameRequiredDescription
key required Your API key.
Example Request
curl "https://digistallone.com/api/domains/YOUR_API_KEY"
Example Response
[
    "example.com",
    "mail.example.org"
]
GET /api/email/{email}/{key}

Creates an address. Pass a full address like user@domain.com. The username is validated against forbidden usernames and the allowed length; if it cannot be parsed, a random address is returned.

Parameters
NameRequiredDescription
email required Full address to create, e.g. user@domain.com.
key required Your API key.
Example Request
curl "https://digistallone.com/api/email/john@example.com/YOUR_API_KEY"
Example Response
"john@example.com"
GET /api/messages/{email}/{key}

Returns all messages in the inbox of the given address. This is the main endpoint for reading received mail.

Parameters
NameRequiredDescription
email required Full email address whose inbox to read.
key required Your API key.
Example Request
curl "https://digistallone.com/api/messages/john@example.com/YOUR_API_KEY"
Example Response
[
    {
        "subject": "Welcome",
        "sender_name": "Example Team",
        "sender_email": "no-reply@example.com",
        "timestamp": "2026-06-15T09:30:00+00:00",
        "date": "15 Jun 2026 09:30 AM",
        "datediff": "5 minutes ago",
        "id": 12,
        "content": "<p>Hello!</p>",
        "attachments": []
    }
]
GET /api/message/{message_id}/{key}

Returns a single message by its id (the "id" field from List Messages), including the full HTML body and attachments.

Parameters
NameRequiredDescription
message_id required Id of the message to fetch.
key required Your API key.
Example Request
curl "https://digistallone.com/api/message/12/YOUR_API_KEY"
Example Response
{
    "subject": "Welcome",
    "sender_email": "no-reply@example.com",
    "id": 12,
    "content": "<p>Hello!</p>",
    "attachments": []
}
DELETE /api/message/{message_id}/{key}

Permanently deletes a single message by its id. Returns an empty body on success.

Parameters
NameRequiredDescription
message_id required Id of the message to delete.
key required Your API key.
Example Request
curl -X DELETE "https://digistallone.com/api/message/12/YOUR_API_KEY"
Example Response

Empty body with HTTP 200 on success.

Code Examples

A minimal client for reading an inbox. Reuse the same pattern for the other endpoints.

cURL JavaScript PHP Python
# List available domains
curl "https://digistallone.com/api/domains/YOUR_API_KEY"

# List messages in an inbox
curl "https://digistallone.com/api/messages/john@example.com/YOUR_API_KEY"

# Read one message by id
curl "https://digistallone.com/api/message/12/YOUR_API_KEY"

# Delete a message
curl -X DELETE "https://digistallone.com/api/message/12/YOUR_API_KEY"

Message Object

FieldTypeDescription
idintegerMessage id — use with Read and Delete.
subjectstringEmail subject line.
sender_namestringDisplay name of the sender.
sender_emailstringEmail address of the sender.
timestampstring|nullRaw ISO-8601 date, may be null.
datestringFormatted date.
datediffstringRelative time, e.g. "5 minutes ago".
contentstringMessage body as HTML.
attachmentsarrayList of { file, url } objects.

Error Handling

CodeMeaning
200Success.
204No content — a required parameter was missing.
401Unauthorized — the API key is missing or invalid.
406Not acceptable — the username is forbidden or outside the allowed length.
500Server error — the mailbox could not be reached or parsed.
Notes
  • The content field is raw HTML — sanitize it before rendering in your own app.
  • Treat your API key like a password. Anyone with it can read and delete mail for any address.
  • Messages are temporary and cleaned up automatically based on server retention settings.