Public REST API untuk layanan temporary email Jebray
https://yourdomain.com
Get list of active available domains.
curl -X GET https://yourdomain.com/api/domains
{
"success": true,
"domains": ["jebray.com", "zeystair.sbs"]
}
Create a new mailbox. Random (no parameters) or custom address.
| Field | Type | Description |
|---|---|---|
| address | string optional | Username custom. Kosongkan untuk random. |
| domain | string optional | Domain to use. Default: first domain. |
curl -X POST https://yourdomain.com/api/mailbox \
-H "Content-Type: application/json" \
-d '{}'
curl -X POST https://yourdomain.com/api/mailbox \
-H "Content-Type: application/json" \
-d '{"address": "john.doe", "domain": "jebray.com"}'
{
"success": true,
"mailbox": {
"address": "brave.falcon.42",
"domain": "jebray.com",
"full_email": "brave.falcon.42@jebray.com",
"created_at": "2025-01-01T12:00:00",
"expires_at": "2025-01-02T12:00:00"
}
}
Check if a mailbox exists and is still active.
curl -X GET https://yourdomain.com/api/mailbox/brave.falcon.42@jebray.com
{
"success": true,
"mailbox": {
"id": 1,
"address": "brave.falcon.42",
"domain": "jebray.com",
"full_email": "brave.falcon.42@jebray.com",
"created_at": "2025-01-01T12:00:00",
"expires_at": "2025-01-02T12:00:00"
}
}
Get list of all emails in the inbox.
curl -X GET https://yourdomain.com/api/mailbox/brave.falcon.42@jebray.com/emails
{
"success": true,
"count": 2,
"emails": [
{
"id": 1,
"from": "noreply@example.com",
"subject": "Verification Code",
"body_text": "Your code is 123456",
"body_html": "<p>Your code is <b>123456</b></p>",
"received_at": "2025-01-01T12:05:00"
}
]
}
Get a single email by its ID.
curl -X GET https://yourdomain.com/api/mailbox/brave.falcon.42@jebray.com/emails/1
{
"success": true,
"email": {
"id": 1,
"from": "noreply@example.com",
"subject": "Verification Code",
"body_text": "Your code is 123456",
"body_html": "<p>Your code is <b>123456</b></p>",
"received_at": "2025-01-01T12:05:00"
}
}
Delete a single email by its ID.
curl -X DELETE https://yourdomain.com/api/mailbox/brave.falcon.42@jebray.com/emails/1
{
"success": true,
"message": "Email deleted"
}
Delete a mailbox and all its emails.
curl -X DELETE https://yourdomain.com/api/mailbox/brave.falcon.42@jebray.com
{
"success": true,
"message": "Mailbox deleted"
}
Semua error response mengikuti format yang sama:
{
"success": false,
"error": "Deskripsi error"
}
| Code | Description |
|---|---|
| 200 | Request successful |
| 400 | Parameter tidak valid |
| 404 | Mailbox atau email tidak ditemukan |
| 500 | Server error |