Skip to content

Mail2Webhook Service

The Mail2Webhook service assigns each wallet a dedicated email address at <token>@hook.echovalue.dev. Emails sent to that address are forwarded as JSON POST requests to your configured webhook URL.

Each wallet supports one webhook configuration.


POST https://api.echovalue.dev/webhook

Creates or updates the webhook for your wallet (upsert).

Request headers:

HeaderDescription
x-tokenYour API token
Content-TypeMust be application/json

Request body (application/json):

FieldTypeDescriptionRequired
urlstringCallback URL (must be HTTPS, publicly reachable)Yes
headersobjectCustom headers to include in the callback requestNo

Response: 200 OK

OK

HTTP status codes:

StatusMeaning
200Webhook saved
400Invalid URL or malformed request
401Invalid token
402Insufficient credits
Terminal window
curl 'https://api.echovalue.dev/webhook' \
-H 'x-token: mytoken' \
-H 'Content-Type: application/json' \
-d '{"url":"https://yourdomain.com/webhook","headers":{"Authorization":"Bearer secret"}}'

GET https://api.echovalue.dev/webhook

Returns the current webhook configuration for your wallet.

Request headers:

HeaderDescription
x-tokenYour API token

Response: 200 — JSON object.

If a webhook is configured:

{
"webhook": "https://yourdomain.com/webhook",
"headers": { "Authorization": "<redacted>" },
"email": "mytoken@hook.echovalue.dev",
"hash": "a1b2c3d4e5f6..."
}

If no webhook is configured, only email and hash are returned:

{
"email": "mytoken@hook.echovalue.dev",
"hash": "a1b2c3d4e5f6..."
}
FieldTypeDescription
webhookstringYour configured callback URL
headersobjectCustom headers (values are redacted)
emailstringThe email address that triggers this webhook
hashstringSHA256 hash of your token — use this to identify incoming payloads

HTTP status codes:

StatusMeaning
200Configuration returned
401Invalid token
402Insufficient credits
Terminal window
curl 'https://api.echovalue.dev/webhook' \
-H 'x-token: mytoken'

DELETE https://api.echovalue.dev/webhook

Removes the webhook configuration from your wallet.

Request headers:

HeaderDescription
x-tokenYour API token

Response: 200 OK

OK

HTTP status codes:

StatusMeaning
200Webhook deleted
401Invalid token
402Insufficient credits
404No webhook configured
Terminal window
curl 'https://api.echovalue.dev/webhook' \
-H 'x-token: mytoken' \
-X DELETE

When an email arrives at <token>@hook.echovalue.dev, echoValue sends a POST request to your webhook URL with this JSON body:

{
"externalMessageId": "<CA+abc123@mail.gmail.com>",
"receivedAt": "2026-04-04T09:21:35.218Z",
"from": { "email": "john@gmail.com", "name": "John Snow" },
"to": { "hash": "a1b2c3d4e5f6..." },
"subject": "Alert: Server down",
"text": "Server #3 is not responding",
"html": "<div>Server #3 is not responding</div>",
"headers": {},
"attachments": [
{
"filename": "attachment.pdf",
"contentType": "application/pdf",
"size": 33380,
"downloadUrl": "<presigned_url>",
"downloadUrlExpiresAt": "2026-04-04T09:26:35.218Z"
}
]
}
FieldTypeDescription
externalMessageIdstringUnique identifier for the email message
receivedAtstring (ISO 8601)When the email was received
fromobjectSender: email and optional name
toobjectRecipient: hash (SHA256 of your token)
subjectstringEmail subject line
textstringPlain text body
htmlstringHTML body (if present)
headersobjectRaw email headers as key-value pairs
attachmentsarrayFile attachments (empty array if none)
FieldTypeDescription
filenamestringOriginal filename
contentTypestringMIME type
sizeintegerFile size in bytes
downloadUrlstringPresigned URL to download the file
downloadUrlExpiresAtstring (ISO 8601)When the download URL expires (1 hour)