Inboxes
Create Inbox
Creates a new inbox with a unique email address.
POST /inboxes
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name for the inbox |
address | string | No | Custom email address (requires verified domain) |
webhookUrl | string | No | URL to receive webhook notifications |
Examples
Basic inbox (auto-generated address):
bash
curl -X POST https://api.emailhook.com/v1/inboxes \
-H "Authorization: Bearer apk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Support",
"webhookUrl": "https://yourapp.com/webhooks/inbox"
}'Custom address (requires verified domain):
bash
curl -X POST https://api.emailhook.com/v1/inboxes \
-H "Authorization: Bearer apk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Support",
"address": "support@mycompany.emhook.com",
"webhookUrl": "https://yourapp.com/webhooks/inbox"
}'Custom Address Requirements
To use a custom address, you must:
- Own the domain (add it via the dashboard first)
- Have the domain verified (subdomains of emhook.com are auto-verified, custom domains require DNS verification)
- The address must not already be in use
If address is omitted, a random address at emhook.com will be generated automatically.
List Inboxes
Returns a list of your inboxes.
GET /inboxes
bash
curl -H "Authorization: Bearer apk_your_api_key_here" \
"https://api.emailhook.com/v1/inboxes?limit=10"Get Inbox
Retrieves a specific inbox.
GET /inboxes/{inboxId}
bash
curl -H "Authorization: Bearer apk_your_api_key_here" \
https://api.emailhook.com/v1/inboxes/inbx_123Update Inbox
Updates an existing inbox.
PATCH /inboxes/{inboxId}
bash
curl -X PATCH https://api.emailhook.com/v1/inboxes/inbx_123 \
-H "Authorization: Bearer apk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"name": "Support (Tier 2)"}'Delete Inbox
Permanently deletes an inbox and all its emails.
DELETE /inboxes/{inboxId}
bash
curl -X DELETE https://api.emailhook.com/v1/inboxes/inbx_123 \
-H "Authorization: Bearer apk_your_api_key_here"