Kembali ke Home

📡 API Documentation

Public REST API untuk layanan temporary email Jebray

Base URL https://yourdomain.com
â„šī¸ Info: This API is free and open. All responses are in JSON format. No authentication required.
GET /api/domains

Get list of active available domains.

cURL

Request
curl -X GET https://yourdomain.com/api/domains

Response

200 OK
{
  "success": true,
  "domains": ["jebray.com", "zeystair.sbs"]
}
POST /api/mailbox

Create a new mailbox. Random (no parameters) or custom address.

Parameters (JSON Body)

Field Type Description
address string optional Username custom. Kosongkan untuk random.
domain string optional Domain to use. Default: first domain.

cURL — Random

Request
curl -X POST https://yourdomain.com/api/mailbox \
  -H "Content-Type: application/json" \
  -d '{}'

cURL — Custom

Request
curl -X POST https://yourdomain.com/api/mailbox \
  -H "Content-Type: application/json" \
  -d '{"address": "john.doe", "domain": "jebray.com"}'

Response

200 OK
{
  "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"
  }
}
GET /api/mailbox/{email}

Check if a mailbox exists and is still active.

cURL

Request
curl -X GET https://yourdomain.com/api/mailbox/brave.falcon.42@jebray.com

Response

200 OK
{
  "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 /api/mailbox/{email}/emails

Get list of all emails in the inbox.

cURL

Request
curl -X GET https://yourdomain.com/api/mailbox/brave.falcon.42@jebray.com/emails

Response

200 OK
{
  "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 /api/mailbox/{email}/emails/{id}

Get a single email by its ID.

cURL

Request
curl -X GET https://yourdomain.com/api/mailbox/brave.falcon.42@jebray.com/emails/1

Response

200 OK
{
  "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 /api/mailbox/{email}/emails/{id}

Delete a single email by its ID.

cURL

Request
curl -X DELETE https://yourdomain.com/api/mailbox/brave.falcon.42@jebray.com/emails/1

Response

200 OK
{
  "success": true,
  "message": "Email deleted"
}
DELETE /api/mailbox/{email}

Delete a mailbox and all its emails.

cURL

Request
curl -X DELETE https://yourdomain.com/api/mailbox/brave.falcon.42@jebray.com

Response

200 OK
{
  "success": true,
  "message": "Mailbox deleted"
}
INFO Error Responses

Semua error response mengikuti format yang sama:

400 / 404 / 500
{
  "success": false,
  "error": "Deskripsi error"
}

HTTP Status Codes

Code Description
200 Request successful
400 Parameter tidak valid
404 Mailbox atau email tidak ditemukan
500 Server error